diff options
author | William S Fulton <wsf@fultondesigns.co.uk> | 2013-04-12 20:07:54 +0100 |
---|---|---|
committer | William S Fulton <wsf@fultondesigns.co.uk> | 2013-04-19 22:28:02 +0100 |
commit | 635a90c91c4eea575b47c6453ccbd501e935cdf6 (patch) | |
tree | 556cf9784af71784f7f73b1f6ae85bf7e8bdaf39 | |
parent | 9f9eb66fa4dbe2c32684c532c7875c1b0ae14b6f (diff) | |
download | swig-635a90c91c4eea575b47c6453ccbd501e935cdf6.tar.gz |
Add RUNPIPE in makefiles - a generic mechanism for suppressing stdout when running the examples - the idea is to run 'make check-examples' which runs the examples but suppresses the output except for errors. Initial implementation for Java.
-rw-r--r-- | Examples/Makefile.in | 13 | ||||
-rw-r--r-- | Makefile.in | 2 |
2 files changed, 13 insertions, 2 deletions
diff --git a/Examples/Makefile.in b/Examples/Makefile.in index c234c41ab..535ea55ae 100644 --- a/Examples/Makefile.in +++ b/Examples/Makefile.in @@ -46,6 +46,10 @@ LIBPREFIX = RUNTOOL = # COMPILETOOL is a way to run the compiler under another tool, or more commonly just to stop the compiler executing COMPILETOOL= +# RUNPIPE is for piping output of running interpreter/compiled code somewhere, eg RUNPIPE=\>/dev/null +RUNPIPE= + +RUNME = runme # X11 options @@ -544,6 +548,13 @@ java_cpp: $(SRCS) $(JAVACXXSHARED) $(CFLAGS) $(OBJS) $(IOBJS) $(JAVA_DLNK) $(LIBS) $(CPP_DLLIBS) -o $(JAVA_LIBPREFIX)$(TARGET)$(JAVASO) # ----------------------------------------------------------------- +# Run java example +# ----------------------------------------------------------------- + +java_run: + env LD_LIBRARY_PATH=.:$$LD_LIBRARY_PATH $(RUNTOOL) $(JAVA) $(RUNME) $(RUNPIPE) + +# ----------------------------------------------------------------- # Version display # ----------------------------------------------------------------- @@ -556,7 +567,7 @@ java_version: # ----------------------------------------------------------------- java_clean: - rm -f *_wrap* *~ .~* *.class `find . -name \*.java | grep -v runme.java` + rm -f *_wrap* *~ .~* *.class `find . -name \*.java | grep -v $(RUNME).java` rm -f core @EXTRA_CLEAN@ rm -f *.@OBJEXT@ *@JAVASO@ diff --git a/Makefile.in b/Makefile.in index 8a6776bf8..04d65a107 100644 --- a/Makefile.in +++ b/Makefile.in @@ -229,7 +229,7 @@ check-%-examples : # individual example %.actionexample: @echo $(ACTION)ing Examples/$(LANGUAGE)/$* - @(cd Examples/$(LANGUAGE)/$* && $(MAKE) -s $(chk-set-env) $(ACTION)) + @(cd Examples/$(LANGUAGE)/$* && $(MAKE) -s $(chk-set-env) $(ACTION) RUNPIPE=\>/dev/null) # gcj individual example java.actionexample: |