profiles = desktop desktoptopics = email office web desktoptopiclists = $(patsubst %,profiles/desktop-%,$(desktoptopics)) basefiles = $(patsubst %,content/%/base/preseed.cfg,$(profiles)) topicfiles = $(patsubst %,content/desktop/%/preseed.cfg,$(desktoptopics)) profilefiles = $(patsubst %,content/%/preseed.cfg,$(profiles)) all: $(basefiles) $(topicfiles) $(profilefiles) $(basefiles): content/%/base/preseed.cfg : profiles/% profiles/%-z bin/pkglist2preseed skel/preseed.cfg.in $^ > $@ $(topicfiles): content/desktop/%/preseed.cfg : profiles/desktop profiles/desktop-% profiles/desktop-z bin/pkglist2preseed skel/preseed.cfg.in $^ > $@ $(profilefiles): content/%/preseed.cfg : profiles/% profiles/%-email $(desktoptopiclists) profiles/%-z bin/pkglist2preseed skel/preseed.cfg.in $^ > $@