[SCM] Installer for game data files branch, rott, updated. 86c4002c57b43957f8cf8278cce4edfecaf53bb3

Jon Dowland jmtd at debian.org
Wed Dec 16 17:34:54 UTC 2009


The following commit has been merged in the rott branch:
commit a6dc3ee082e8651c3e22c139db0051ff521b6ce4
Author: Jon Dowland <jmtd at debian.org>
Date:   Wed Dec 16 16:36:02 2009 +0000

    factor rott stuff out of Makefile into rott.mk

diff --git a/Makefile b/Makefile
index 7ce5af5..33c5f71 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
 VERSION := $(shell dpkg-parsechangelog | grep ^Version | cut -d' ' -f2-)
 
-default: rott-data_$(VERSION)_all.deb
+default:
 	make -f doom-common.mk IWAD=doom  LONG="Doom"   VERSION=$(VERSION)
 	make -f doom-common.mk IWAD=doom2 \
 		LONG="Doom 2: Hell on Earth" VERSION=$(VERSION)
@@ -8,24 +8,9 @@ default: rott-data_$(VERSION)_all.deb
 		LONG="Final Doom: TNT: Evilution" VERSION=$(VERSION)
 	make -f doom-common.mk IWAD=plutonia \
 		LONG="Final Doom: The Plutonia Experiment" VERSION=$(VERSION)
+	make -f rott.mk VERSION=$(VERSION)
 
-rott-data_$(VERSION)_all.deb: rott-data/DEBIAN/control rott-dirs
-	if [ `id -u` -eq 0 ]; then \
-		dpkg-deb -b rott-data $@ ; \
-	else \
-		fakeroot dpkg-deb -b rott-data $@; \
-	fi
-
-rott-dirs:
-	mkdir -p rott-data/usr/share/games/rott
-
-rott-data/DEBIAN/control: rott-data/DEBIAN/control.in
-	m4 -DPACKAGE=rott-data -DVERSION=$(VERSION) $< > $@ 
-
-rottclean:
-	rm -f rott-data/DEBIAN/control rott-data_$(VERSION)_all.deb
-
-clean: rottclean
+clean:
 	make -f doom-common.mk IWAD=doom  LONG="Doom"   VERSION=$(VERSION) clean
 	make -f doom-common.mk IWAD=doom2 \
 		LONG="Doom 2: Hell on Earth" VERSION=$(VERSION) clean
@@ -33,5 +18,6 @@ clean: rottclean
 		LONG="Final Doom: TNT: Evilution" VERSION=$(VERSION) clean
 	make -f doom-common.mk IWAD=plutonia \
 		LONG="Final Doom: The Plutonia Experiment" VERSION=$(VERSION) clean
+	make -f rott.mk VERSION=$(VERSION) clean
 
-.PHONY: default clean rottclean rott-dirs
+.PHONY: default clean
diff --git a/rott.mk b/rott.mk
new file mode 100644
index 0000000..984d8ac
--- /dev/null
+++ b/rott.mk
@@ -0,0 +1,21 @@
+# VERSION is defined by the parent make
+rott-data_$(VERSION)_all.deb: rott-data/DEBIAN/control dirs
+	if [ `id -u` -eq 0 ]; then \
+		dpkg-deb -b rott-data $@ ; \
+	else \
+		fakeroot dpkg-deb -b rott-data $@; \
+	fi
+
+dirs:
+	mkdir rott-data/usr/share/games
+	mkdir rott-data/usr/share/games/rott
+
+rott-data/DEBIAN/control: rott-data/DEBIAN/control.in
+	m4 -DPACKAGE=rott-data -DVERSION=$(VERSION) $< > $@ 
+
+clean:
+	rm -f rott-data/DEBIAN/control rott-data_$(VERSION)_all.deb
+	[ ! -d rott-data/usr/share/games/rott ] || rmdir rott-data/usr/share/games/rott
+	[ ! -d rott-data/usr/share/games ] || rmdir rott-data/usr/share/games
+
+.PHONY: clean

-- 
Installer for game data files



More information about the Pkg-games-commits mailing list