carbon-config

config submodule of carbon-core-system
git clone https://ccx.te2000.cz/git/carbon-config
Log | Files | Refs

Makefile (1594B)


      1 .PHONY: all clean
      2 
      3 ALL_TARGETS:= s6-rc.fileset postinstall.fileset postinstall.rsfilter static/etc/fstab
      4 AWK:=awk
      5 SED:=sed
      6 #FILESET_BIN_DIR:=$(dir $(realpath $(shell which fileset.awk)))
      7 AAT_BIN_DIR:=$(realpath $(dir $(realpath $(shell which aat.awk))))
      8 #DATA_AWK:=/current/bzr/aat/data.awk
      9 DATA_AWK:=$(realpath $(AAT_BIN_DIR)/..)/data.awk
     10 all: $(ALL_TARGETS)
     11 
     12 clean:
     13 	rm -rf build $(ALL_TARGETS)
     14 
     15 build/%.awk: %.aat common.aat
     16 	mkdir -p build
     17 	$(AWK) -f $(AAT_BIN_DIR)/aat.awk "$<" >"$@.new"
     18 	$(SED) -f $(AAT_BIN_DIR)/aat_macros.sed -i "$@.new"
     19 	mv "$@.new" "$@"
     20 
     21 %.qawk: %.awk $(DATA_AWK)
     22 	cat $(DATA_AWK) >"$@.new"
     23 	$(AWK) -f $(AAT_BIN_DIR)/query.awk "$<" >>"$@.new"
     24 	mv "$@.new" "$@"
     25 
     26 %.rsfilter: %.fileset
     27 	RSFILTER="$@.new" fileset "$<" >/dev/null
     28 	mv "$@.new" "$@"
     29 
     30 build/s6-rc-mount.awk: s6-rc-mount.aat parse_fs.include.awk rc-common.aat
     31 build/s6-rc.awk: s6-rc.aat parse_fs.include.awk rc-common.aat rc-builder.include.awk
     32 build/fstab.awk: fstab.aat parse_fs.include.awk rc-common.aat
     33 
     34 s6-rc.fileset: build/s6-rc.qawk build/s6-rc-mount.awk fs build/config
     35 	$(AWK) -v sort_tmpfile="./build/s6-rc-mount.awk.tmp_sort" -f build/s6-rc-mount.awk fs >"$@.new"
     36 	$(AWK) -v sort_tmpfile="./build/s6-rc.qawk.tmp_sort" -f build/s6-rc.qawk build/config >>"$@.new"
     37 	mv "$@.new" "$@"
     38 
     39 static/etc/fstab: build/fstab.awk fs
     40 	$(AWK) -f build/fstab.awk fs >"$@.new"
     41 	mv "$@.new" "$@"
     42 
     43 build/config: build/config.awk
     44 	$(AWK) -f "$<" </dev/null >"$@.new"
     45 	mv "$@.new" "$@"
     46 
     47 postinstall.fileset: build/config build/postinstall.qawk
     48 	$(AWK) -f build/postinstall.qawk build/config >"$@.new"
     49 	mv "$@.new" "$@"