rules to autogenerate swigwarn.swg
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@8558 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
69cefbe92d
commit
9f58307dbb
1 changed files with 15 additions and 10 deletions
25
Makefile.in
25
Makefile.in
|
|
@ -16,12 +16,14 @@ BIN_DIR = @bindir@
|
|||
TARGET = swig@release_suffix@@EXEEXT@
|
||||
SOURCE = Source
|
||||
|
||||
swig: source
|
||||
swig: libfiles source
|
||||
|
||||
source:
|
||||
@cd $(SOURCE) && $(MAKE)
|
||||
|
||||
.PHONY: source
|
||||
libfiles: Lib/swigwarn.swg
|
||||
|
||||
.PHONY: source libfiles
|
||||
|
||||
#####################################################################
|
||||
# All the languages SWIG speaks (when it wants to)
|
||||
|
|
@ -253,7 +255,7 @@ broken-%-test-suite:
|
|||
# CLEAN
|
||||
#####################################################################
|
||||
|
||||
clean: clean-objects clean-examples clean-gifplot clean-test-suite
|
||||
clean: clean-objects clean-libfiles clean-examples clean-gifplot clean-test-suite
|
||||
|
||||
clean-objects: clean-source
|
||||
|
||||
|
|
@ -262,6 +264,9 @@ clean-source:
|
|||
@cd $(SOURCE) && $(MAKE) -s clean
|
||||
@rm -f $(TARGET)
|
||||
|
||||
clean-libfiles:
|
||||
@rm -f Lib/swigwarn.swg
|
||||
|
||||
clean-examples:
|
||||
@$(MAKE) -k -s check-examples ACTION=clean
|
||||
|
||||
|
|
@ -330,16 +335,16 @@ noskip-%-test-suite:
|
|||
distclean-dead:
|
||||
rm -f $(DISTCLEAN-DEAD)
|
||||
|
||||
############################################################################
|
||||
#####################################################################
|
||||
# Update the Lib/swigwarn.swg file
|
||||
############################################################################
|
||||
#####################################################################
|
||||
|
||||
Lib/swigwarn.swg: Source/Include/swigwarn.h
|
||||
@echo "/* Automatically generated file containing all the swig warning codes. */" > $@
|
||||
@echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h' */" >> $@
|
||||
@echo "/* and use the command 'make Lib/swigwarn.swg' instead. */" >> $@
|
||||
@echo >> $@; echo >> $@
|
||||
@awk '/#define WARN/{$$1="%define"; $$2="SWIG"$$2; $$3=sprintf("%d %%enddef", $$3); print $$0; next;}\
|
||||
echo "/* Automatically generated file containing all the swig warning codes. */" > $@
|
||||
echo "/* Do not modify this file by hand, change 'Source/Include/swigwarn.h' */" >> $@
|
||||
echo "/* and use the command 'make Lib/swigwarn.swg' instead. */" >> $@
|
||||
echo >> $@; echo >> $@
|
||||
awk '/#define WARN/{$$1="%define"; $$2="SWIG"$$2; $$3=sprintf("%d %%enddef", $$3); print $$0; next;}\
|
||||
/#/{next;} {print $0}' < $? >> $@
|
||||
|
||||
#####################################################################
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue