PREFIX?=/usr SUCMD?=sudo CFLAGS?=-O2 -Wall -ggdb3 -gstabs+ EXTRA_PACKAGE_ARGS=-us -uc modules:=\ beryl-core \ beryl-plugins \ beryl-settings \ beryl-manager \ emerald \ emerald-themes 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: rm -f *.build-stamp usrlocalcheck: for i in beryl beryl-xgl beryl-settings beryl-manager \ beryl-settings-dump \ emerald emerald-theme-manager; do \ if [ -f /usr/local/bin/$$i ]; then \ echo "Found probably old $$i in /usr/local/bin/$$i"; \ echo " you should remove that, if you don't know exactly why it is there"; \ fi; \ done; update: svn up packages: $(packagemodules) %.package-stamp: %.cfg-stamp sh -c 'cd $*; dpkg-buildpackage -rfakeroot $(EXTRA_PACKAGE_ARGS)' $(SUCMD) dpkg -i *.deb touch $@ touch $*.inst-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 $@ %.inst-stamp: %.build-stamp $(SUCMD) make -C $* install touch $@ %.cfg-stamp: sh -c 'cd $*;./autogen.sh --prefix=$(PREFIX) CFLAGS="$(CFLAGS)"' rm -f $*.build-stamp rm -f $*.inst-stamp touch $@ configure: $(cfgmodules) configure-beryl: beryl-core.cfg-stamp beryl-plugins.cfg-stamp install: $(installmodules) clean: $(cleanmodules) distclean: clean rm -f *.changes *.deb *.tar.gz *.dsc cfg-clean: rm -f *.cfg-stamp