From d334508b86f84e72ffd709233260328c7788abf6 Mon Sep 17 00:00:00 2001 From: Laurent Mazet Date: Tue, 15 Sep 2015 10:18:55 +0200 Subject: [PATCH] add makefile --- Makefile | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 Makefile diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..2c2a28a --- /dev/null +++ b/Makefile @@ -0,0 +1,31 @@ +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) -- 2.30.2