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.
This commit is contained in:
parent
9f9eb66fa4
commit
635a90c91c
2 changed files with 13 additions and 2 deletions
|
|
@ -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
|
||||
|
||||
|
|
@ -543,6 +547,13 @@ java_cpp: $(SRCS)
|
|||
$(CXX) -c $(CCSHARED) $(CFLAGS) $(JAVACFLAGS) $(SRCS) $(CXXSRCS) $(ICXXSRCS) $(INCLUDES) $(JAVA_INCLUDE)
|
||||
$(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@
|
||||
|
||||
|
|
|
|||
|
|
@ -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:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue