[pooma-dev] [PATCH] Fix dependency generation

Jeffrey D. Oldham oldham at codesourcery.com
Thu Jan 29 16:22:19 UTC 2004


Richard Guenther wrote:
> Hi!
> 
> This patch fixes long standing possibility of ending up with recursive
> makefile inclusion... basically, if the dependency making failed somehow,
> we ended up including it forever on the next invocation of make. Ugh.
> It also brings dependencies for the testsuite.
> 
> Ok?

OK.

> Richard.
> 
> 
> 2004Jan29  Richard Guenther <richard.guenther at uni-tuebingen.de>
> 
> 	* config/Shared/rules.mk: don't repeat the toplevel makefile in
> 	the initial depend.mk.  Ignore SCCS and CVS directories for depend
> 	files, add testsuite files for depend.
> 
> ===== rules.mk 1.3 vs edited =====
> *** /tmp/rules.mk-1.3-9804	Mon Jun 23 14:50:41 2003
> --- edited/rules.mk	Thu Jan 29 11:39:35 2004
> ***************
> *** 3,14 ****
>   .PHONY : showtimes showenv clean cleansuite realclean realcleansuite realrealcleansuite tar makestuff dirs
>   .PHONY : showalias echopoomaroot suiteinfo
> 
> ! depend:
>   	@echo "Making Dependencies for suite=$(SUITE)."; \
>   	cd $(PROJECT_ROOT);\
> ! 	filelist=`$(FIND) $(PROJECT_ROOT)/src -type f -name "*.cc" -o -name "*.C" -o -name "*.cpp" | grep -v tests`;\
> ! 	cp $(PROJECT_ROOT)/makefile $(LIBRARY_ROOT)/depend.mk ; \
> ! 	$(MAKEDEPEND) -f $(LIBRARY_ROOT)/depend.mk $(shell echo $(SUITE_DEFINES) | $(TR) ' ' ',' ) $(SUITE_INCLUDES) $$filelist 2> $(LIBRARY_ROOT)/depend.err;\
>   	$(PERL) $(SHARED_ROOT)/dependo.pl $(LIBRARY_ROOT)/depend.mk $(PROJECT_ROOT) $$filelist;\
>   	rm -f $(LIBRARY_ROOT)/depend.mk.bak
> 
> --- 3,15 ----
>   .PHONY : showtimes showenv clean cleansuite realclean realcleansuite realrealcleansuite tar makestuff dirs
>   .PHONY : showalias echopoomaroot suiteinfo
> 
> ! depend: cleandepend
>   	@echo "Making Dependencies for suite=$(SUITE)."; \
>   	cd $(PROJECT_ROOT);\
> ! 	filelist=`$(FIND) $(PROJECT_ROOT)/src -type f -name "*.cmpl.cpp" -o -name "*.inst.cpp" | grep -v "tests\|FileTemplates\|SCCS\|CVS"`;\
> ! 	filelisttests=`$(FIND) $(PROJECT_ROOT)/src -type f -name "*.cpp" | grep -v "SCCS\|CVS" | grep "tests/.*\.cpp"`;\
> ! 	touch $(LIBRARY_ROOT)/depend.mk ; \
> ! 	$(MAKEDEPEND) -f $(LIBRARY_ROOT)/depend.mk $(shell echo $(SUITE_DEFINES) | $(TR) ' ' ',' ) $(SUITE_INCLUDES) $$filelist $$filelisttests 2> $(LIBRARY_ROOT)/depend.err;\
>   	$(PERL) $(SHARED_ROOT)/dependo.pl $(LIBRARY_ROOT)/depend.mk $(PROJECT_ROOT) $$filelist;\
>   	rm -f $(LIBRARY_ROOT)/depend.mk.bak
> 


-- 
Jeffrey D. Oldham
oldham at codesourcery.com




More information about the pooma-dev mailing list