# $Id$ # # A snippet for a toplevel directory makefile, which delegates to subdirectories. # # Variables: # SUBDIRS ... list of subdirectories to build in. # include /usr/share/pba-cbs/mk/common-targets.mk SUBDIRS_FLAT=$(subst /,--,$(SUBDIRS)) subdir-compile--%: make -C $(subst --,/,$*) compile compile:: $(addprefix subdir-compile--,$(SUBDIRS_FLAT)) subdir-link--%: make -C $(subst --,/,$*) link link:: $(addprefix subdir-link--,$(SUBDIRS_FLAT)) subdir-pot--%: make -C $(subst --,/,$*) pot pot:: $(addprefix subdir-pot--,$(SUBDIRS_FLAT)) subdir-install-bin--%: make -C $(subst --,/,$*) install-bin install-bin:: $(addprefix subdir-install-bin--,$(SUBDIRS_FLAT)) subdir-install-dev--%: make -C $(subst --,/,$*) install-dev install-dev:: $(addprefix subdir-install-dev--,$(SUBDIRS_FLAT)) subdir-install-mo--%: make -C $(subst --,/,$*) install-mo install-mo:: $(addprefix subdir-install-mo--,$(SUBDIRS_FLAT)) subdir-update-po--%: make -C $(subst --,/,$*) update-po update-po:: $(addprefix subdir-update-po--,$(SUBDIRS_FLAT)) subdir-clean--%: make -C $(subst --,/,$*) clean clean:: $(addprefix subdir-clean--,$(SUBDIRS_FLAT))