summaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authornigel <nigel@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-10 23:07:39 +0000
committernigel <nigel@d7aaf104-2d23-0410-ae22-9d23157bf5a3>2006-10-10 23:07:39 +0000
commit17c64e23cfaeb8e3f4cbad6f61a277657f7c5ba3 (patch)
treecd7c0e581164287ddd904fbd4e854ba21cd0b00b /Makefile
parentc0093c266b934a17b33e2f5bae4c0a71afa2b3d5 (diff)
downloadmarex-dev-17c64e23cfaeb8e3f4cbad6f61a277657f7c5ba3.tar.gz
marex-dev-17c64e23cfaeb8e3f4cbad6f61a277657f7c5ba3.tar.bz2
Some improvements to the main Makefile:
- Initial support for package building. - Make configuring plugins, settings and emerald depend on having installed core. (Will extend into make -j support). - Make clean target not care if package is already clean, and remove other stamps as well. - Add distclean target. git-svn-id: file:///beryl/trunk@585 d7aaf104-2d23-0410-ae22-9d23157bf5a3
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile30
1 files changed, 22 insertions, 8 deletions
diff --git a/Makefile b/Makefile
index 9c6daaf..70527c8 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,7 @@
PREFIX?=/usr
SUCMD?=sudo
CFLAGS?=
+EXTRA_PACKAGE_ARGS=-k53379A8D
modules:=\
beryl-core \
@@ -14,9 +15,12 @@ cfgmodules:=$(patsubst %,%.cfg-stamp,$(modules))
buildmodules:=$(patsubst %,%.build-stamp,$(modules))
installmodules:=$(patsubst %,%.inst-stamp,$(modules))
cleanmodules:=$(patsubst %,%.clean-stamp,$(modules))
+packagemodules:=$(patsubst %,%.package-stamp,$(modules))
all: update rebuild $(buildmodules)
+beryl-plugins.cfg-stamp beryl-settings.cfg-stamp emerald.cfg-stamp: beryl-core.inst-stamp
+
beryl: update rebuild beryl-core.build-stamp beryl-plugins.build-stamp
rebuild:
@@ -25,19 +29,28 @@ rebuild:
update:
svn up
-%.clean-stamp:
- make -C $* clean
+packages: $(packagemodules)
+
+%.package-stamp: %.cfg-stamp
+ sh -c 'cd $*; fakeroot dpkg-buildpackage $(EXTRA_PACKAGE_ARGS)'
+ $(SUCMD) dpkg -i *.deb
touch $@
+ touch $*.inst-stamp
-%.build-stamp:
+%.clean-stamp:
+ make -C $* clean || /bin/true
+ rm -f $*.cfg-stamp
+ rm -f $*.build-stamp
+ rm -f $*.inst-stamp
+ rm -f $*.package-stamp
+
+%.build-stamp: %.cfg-stamp
rm -f $*.inst-stamp
make -C $*
touch $@
- $(SUCMD) make -C $* install
- touch $*.inst-stamp
%.inst-stamp: %.build-stamp
- make -C $* install
+ $(SUCMD) make -C $* install
touch $@
%.cfg-stamp:
@@ -53,8 +66,9 @@ configure-beryl: beryl-core.cfg-stamp beryl-plugins.cfg-stamp
install: $(installmodules)
clean: $(cleanmodules)
- rm -f *.build-stamp
- rm -f *.clean-stamp
+
+distclean: clean
+ rm -f *.changes *.deb *.tar.gz *.dsc
cfg-clean:
rm -f *.cfg-stamp