Makefile (908B)
1 # default to homedir if not root 2 VERSIONS:=$(patsubst /root/%,/%,$(HOME)/versions) 3 4 export PATH:=$(CURDIR)/command:$(PATH) 5 export pthbs_versions:=$(VERSIONS) 6 7 default: default.environment userspace.environment containers.environment mdevd.environment 8 9 $(VERSIONS)/environment.%/.env: 10 @echo mkdir "$$(dirname '$@')" 11 @echo touch '$@' 12 13 14 %/.exists: 15 mkdir -p '$*' 16 touch '$@' 17 18 make/package.%.mk: packages/% make/.exists command/pthbs-makegen 19 pthbs-makegen 'packages/$*' >'$@.new' 20 mv '$@.new' '$@' 21 22 make/downloads.%.mk: downloadlist.% make/.exists command/pthbs-makegen-downloads 23 pthbs-makegen-downloads '$*' 'downloadlist.$*' >'$@.new' 24 mv '$@.new' '$@' 25 26 include make/downloads.sha256.mk 27 28 pkg_files=$(wildcard packages/*) 29 #env_files=$(wildcard environments/*) 30 mk_files=$(patsubst packages/%,make/package.%.mk,$(pkg_files)) 31 include $(mk_files) 32 33 ifneq (,$(filter py%,$(MAKECMDGOALS))) 34 include python.mk 35 endif