From: <as...@us...> - 2003-10-26 22:11:46
|
Update of /cvsroot/gtk2hs/gtk2hs/mk In directory sc8-pr-cvs1:/tmp/cvs-serv18041/mk Modified Files: common.mk Added Files: recurse.mk Log Message: Automated the decent into subdirs. --- NEW FILE: recurse.mk --- # --*Makefile*-- # The variables MAKE_TOOLS, MAKE_LIBS or MAKE_APPS determine on which # subdirectories the following standard targets work. MAKE_VERB points # to extra directories that are included when cleaning and tarring. all : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) all : make-all inplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) inplace : make-inplace noinplace : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) noinplace : make-noinplace tarsource : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) tarsource : make-tarsource clean : MAKE_GOALS=$(MAKE_TOOLS) $(MAKE_LIBS) $(MAKE_APPS) $(MAKE_VERB) clean : make-clean install : MAKE_GOALS=$(MAKE_LIBS) $(MAKE_APPS) install : make-install uninstall : MAKE_GOALS=$(MAKE_LIBS) $(MAKE_APPS) uninstall : make-uninstall make-% : for dir in $(MAKE_GOALS); do $(MAKE) $* -C$$dir ; done; Index: common.mk =================================================================== RCS file: /cvsroot/gtk2hs/gtk2hs/mk/common.mk,v retrieving revision 1.23 retrieving revision 1.24 diff -u -d -r1.23 -r1.24 --- common.mk 21 Oct 2003 23:32:10 -0000 1.23 +++ common.mk 26 Oct 2003 22:11:42 -0000 1.24 @@ -159,7 +159,7 @@ @if test -f .depend; then \ echo "$(C2HSFLAGGED) -o : $(HEADER)" `cat .depend` && \ ($(C2HSFLAGGED) -o : $(HEADER) `cat .depend` || \ - (echo removing `cat .depend | $(SED) s/\(.*\)\.chs/\1.hs/`; \ + (echo removing `cat .depend | "$(SED) s/\(.*\)\.chs/\1.hs/"`; \ $(RM) `cat .depend | $(SED) "s/\(.*\)\.chs/\1.hs/"` .depend; \ exit 1)) && \ echo "$(TOP)/mk/chsDepend -i$(HIDIRSOK)" `cat .depend` && \ @@ -197,7 +197,8 @@ $(HSCFILES:.hsc=.hs) : %.hs : %.hsc $(HSCFLAGGED) $< -# Set up include file for either applications or libraries. + +# Goals for applications and libraries. .PHONY: errorNoTarget noTarget @@ -205,7 +206,6 @@ @echo You need to set PACKAGENAME to build a library or @echo APPNAME to build an executable. -inplace : all inplaceinit : @if test ! -f $(LOCALPKGCONF); then \ @@ -229,11 +229,17 @@ include $(TOP)/mk/library.mk +inplace : $(TARGETOK) + +all : inplace + else ifneq ($(strip $(APPNAME)),) include $(TOP)/mk/application.mk +all : $(TARGETOK) + else TARGETOK = errorNoTarget @@ -241,8 +247,6 @@ endif endif - -all : $(TARGETOK) targets : @echo all in subdirs: builds libraries/applications |