SHELL=/bin/bash MASTERFILE = trc6500-master-file VERSION = $(shell awk '/^$(MASTERFILE)/ {gsub(/[()]/, ""); print $$2; exit}' $(MASTERFILE)/debian/debian-changelog) ISOVER = $(shell echo $(VERSION) | sed 's/-.*$$//') ISO = simple-cdd/images/debian-7.8-amd64-CD-1.iso TARGET_ISO = debian-trc6500-$(ISOVER).iso TARGET_DEB = $(MASTERFILE)_$(VERSION)_all.deb all: iso masterfile iso: $(TARGET_ISO) $(TARGET_ISO): $(ISO) mv $< $@ $(ISO): $(TARGET_DEB) cd simple-cdd && build-simple-cdd --dist wheezy --conf ./simple-cdd.conf masterfile: $(TARGET_DEB) $(TARGET_DEB): make -C $(MASTERFILE) clean: rm -f $(TARGET_DEB) $(TARGET_ISO)