Fix out of source builds #1544718

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@9311 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
William S Fulton 2006-09-20 20:14:53 +00:00
commit 375ab4eb93

View file

@ -24,7 +24,7 @@ swig: libfiles source
source: source:
@cd $(SOURCE) && $(MAKE) @cd $(SOURCE) && $(MAKE)
libfiles: Lib/swigwarn.swg libfiles: $(srcdir)/Lib/swigwarn.swg
.PHONY: source libfiles .PHONY: source libfiles
@ -274,7 +274,7 @@ clean-source:
@rm -f $(TARGET) @rm -f $(TARGET)
clean-libfiles: clean-libfiles:
@rm -f Lib/swigwarn.swg @rm -f $(srcdir)/Lib/swigwarn.swg
clean-examples: clean-examples:
@$(MAKE) -k -s check-examples ACTION=clean @$(MAKE) -k -s check-examples ACTION=clean
@ -296,7 +296,7 @@ clean-%-gifplot:
clean-docs: clean-docs:
@echo cleaning Docs @echo cleaning Docs
@cd $(DOCS) && $(MAKE) -s clean @test -d $(DOCS) || exit 0; cd $(DOCS) && $(MAKE) -s clean
##################################################################### #####################################################################
# DISTCLEAN # DISTCLEAN
@ -343,6 +343,7 @@ noskip-%-test-suite:
if [ ! -d $$dir ]; then \ if [ ! -d $$dir ]; then \
echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\ echo warning: cannot $(ACTION) $* test-suite "(no dir $$dir)";\
else \ else \
echo $(ACTION)ing $$dir; \
(cd $$dir && $(MAKE) -k -s $(ACTION)) \ (cd $$dir && $(MAKE) -k -s $(ACTION)) \
fi; fi;
@ -351,9 +352,11 @@ distclean-dead:
##################################################################### #####################################################################
# Update the Lib/swigwarn.swg file # Update the Lib/swigwarn.swg file
# Note: Generated into the source tree rather than build tree
##################################################################### #####################################################################
Lib/swigwarn.swg: Source/Include/swigwarn.h $(srcdir)/Lib/swigwarn.swg: $(srcdir)/Source/Include/swigwarn.h
mkdir -p Lib
echo "/* Automatically generated file containing all the swig warning codes. */" > $@ echo "/* Automatically generated file containing all the swig warning codes. */" > $@
echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h' */" >> $@ echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h' */" >> $@
echo "/* and use the command 'make Lib/swigwarn.swg' instead. */" >> $@ echo "/* and use the command 'make Lib/swigwarn.swg' instead. */" >> $@