maintopics = desktop desktoptopics = email media mobile office scheduling web lcdesktoptopics = email office web lcgroups = all eu desktoptopiclists = $(patsubst %,profiles/desktop-%,$(desktoptopics)) desktoptopiclcgrouplists = $(foreach topic,$(lcdesktoptopics),\ profiles/desktop-$(topic)-%) desktoptweaks = tweaks/base tweaks/desktop mainfiles = $(patsubst %,content/%/preseed.cfg,$(maintopics)) mainlcgroupfiles = $(patsubst %,content/desktop/%/preseed.cfg,$(lcgroups)) profiles-di = $(mainfiles) $(mainlcgroupfiles) profiles-script = $(patsubst %/preseed.cfg,%/script.sh,$(profiles-di)) profiles = $(profiles-di) $(profiles-script) signfiles = $(patsubst %,%.sig,$(profiles)) info = content/NEWS content/TODO all: $(profiles) $(info) sign: $(signfiles) $(mainfiles): content/%/preseed.cfg : skel/preseed.cfg.in profiles/% $(desktoptopiclists) profiles/%-z $(desktoptweaks) bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)" $(mainlcgroupfiles): content/desktop/%/preseed.cfg : skel/preseed.cfg.in profiles/desktop $(desktoptopiclists) $(desktoptopiclcgrouplists) profiles/desktop-z $(desktoptweaks) bin/pkglist2preseed $(filter skel/%,$^) $@ "$(filter profiles/%,$^)" "$(filter tweaks/%,$^)" $(profiles-script): %script.sh : %preseed.cfg $(signfiles): %.sig: % rm -f $@ gpg --detach-sign -a -o $@ $< $(info): content/% : % mkdir -p content cp -f $< $@ clean: rm -f $(profiles) $(info) $(signfiles)