From: <ai...@us...> - 2008-12-18 00:37:43
|
Revision: 9176 http://plplot.svn.sourceforge.net/plplot/?rev=9176&view=rev Author: airwin Date: 2008-12-18 00:37:32 +0000 (Thu, 18 Dec 2008) Log Message: ----------- Configure install-tree examples overall Makefile to have a test_interactive target (to run automatic tests) and a test target (to run the same plplot-test.sh combinations that ctest does in the build tree). The advantage here for multiprocessor boxes is you can do these tests in parallel by using the -j option on the "make test" command. Modified Paths: -------------- trunk/examples/CMakeLists.txt trunk/examples/Makefile.examples.in Modified: trunk/examples/CMakeLists.txt =================================================================== --- trunk/examples/CMakeLists.txt 2008-12-17 21:53:57 UTC (rev 9175) +++ trunk/examples/CMakeLists.txt 2008-12-18 00:37:32 UTC (rev 9176) @@ -84,6 +84,74 @@ add_subdirectory(ocaml) endif(ENABLE_ocaml) +# Configure Makefile.examples with some specific variables + +if(PLD_ps) + set(PSC_ALL x01c.psc) +else(PLD_ps) + set(PSC_ALL_COMMENT "#") +endif(PLD_ps) + +if(PLD_pdfcairo) + set(PDFCAIRO x01c.pdfcairo) +else(PLD_pdfcairo) + set(PDFCAIRO_COMMENT "#") +endif(PLD_pdfcairo) + +if(PLD_pngcairo) + set(PNGCAIRO x01c01.pngcairo) +else(PLD_pngcairo) + set(PNGCAIRO_COMMENT "#") +endif(PLD_pngcairo) + +if(PLD_pscairo) + set(PSCAIRO x01c.pscairo) +else(PLD_pscairo) + set(PSCAIRO_COMMENT "#") +endif(PLD_pscairo) + +if(PLD_svgcairo) + set(SVGCAIRO x01c01.svgcairo) +else(PLD_svgcairo) + set(SVGCAIRO_COMMENT "#") +endif(PLD_svgcairo) + +if(PLD_gif) + set(GIF x01c01.gif) +else(PLD_gif) + set(GIF_COMMENT "#") +endif(PLD_gif) + +if(PLD_jpeg) + set(JPEG x01c01.jpeg) +else(PLD_jpeg) + set(JPEG_COMMENT "#") +endif(PLD_jpeg) + +if(PLD_png) + set(PNG x01c01.png) +else(PLD_png) + set(PNG_COMMENT "#") +endif(PLD_png) + +if(PLD_psttf) + set(PSTTFC x01c.psttfc) +else(PLD_psttf) + set(PSTTFC_COMMENT "#") +endif(PLD_psttf) + +if(PLD_svg) + set(SVG x01c01.svg) +else(PLD_svg) + set(SVG_COMMENT "#") +endif(PLD_svg) + +if(PLD_xfig) + set(XFIG x01c01.xfig) +else(PLD_xfig) + set(XFIG_COMMENT "#") +endif(PLD_xfig) + configure_file( ${CMAKE_CURRENT_SOURCE_DIR}/Makefile.examples.in ${CMAKE_CURRENT_BINARY_DIR}/Makefile.examples Modified: trunk/examples/Makefile.examples.in =================================================================== --- trunk/examples/Makefile.examples.in 2008-12-17 21:53:57 UTC (rev 9175) +++ trunk/examples/Makefile.examples.in 2008-12-18 00:37:32 UTC (rev 9176) @@ -1,8 +1,8 @@ # examples/Makefile.examples.in for PLplot -### -### Process this file with configure to produce Makefile.examples -### -# Copyright (C) 2004 Alan W. Irwin +# configured by our CMake-based build system to examples/Makefile.examples +# in the build tree and installed as examples/Makefile in the install tree. + +# Copyright (C) 2004, 2008 Alan W. Irwin # # This file is part of PLplot. # @@ -26,11 +26,81 @@ # to invoke make in the individual sub-directories of examples. SUBDIRS = c c++ f77 f95 tk java ada ocaml -all clean: +all: c/x01c@EXEEXT@ + +# Need real file here as target so that tests don't depend on all (which means +# they would always be out of date). + +c/x01c@EXEEXT@: target=`echo $@`; \ list='$(SUBDIRS)'; for subdir in $$list; do \ if test -d "$$subdir"; then \ echo "Making $$target in $$subdir"; \ + (cd $$subdir && $(MAKE)); \ + fi; \ + done + +test: @PSC_ALL@ @PDFCAIRO@ @PNGCAIRO@ @PSCAIRO@ @SVGCAIRO@ \ + @GIF@ @JPEG@ @PNG@ @PSTTFC@ @SVG@ @XFIG@ + +@PSC_ALL_COMMENT@@PSC_ALL@: c/x01c@EXEEXT@ +@PSC_ALL_COMMENT@ echo psc all front-ends +@PSC_ALL_COMMENT@ ./plplot-test.sh --device=psc + +@PDFCAIRO_COMMENT@@PDFCAIRO@: c/x01c@EXEEXT@ +@PDFCAIRO_COMMENT@ echo pdfcairo +@PDFCAIRO_COMMENT@ ./plplot-test.sh --front-end=c --device=pdfcairo + +@PNGCAIRO_COMMENT@@PNGCAIRO@: c/x01c@EXEEXT@ +@PNGCAIRO_COMMENT@ echo pngcairo +@PNGCAIRO_COMMENT@ ./plplot-test.sh --front-end=c --device=pngcairo + +@PSCAIRO_COMMENT@@PSCAIRO@: c/x01c@EXEEXT@ +@PSCAIRO_COMMENT@ echo pscairo +@PSCAIRO_COMMENT@ ./plplot-test.sh --front-end=c --device=pscairo + +@SVGCAIRO_COMMENT@@SVGCAIRO@: c/x01c@EXEEXT@ +@SVGCAIRO_COMMENT@ echo svgcairo +@SVGCAIRO_COMMENT@ ./plplot-test.sh --front-end=c --device=svgcairo + +@GIF_COMMENT@@GIF@: c/x01c@EXEEXT@ +@GIF_COMMENT@ echo gif +@GIF_COMMENT@ ./plplot-test.sh --front-end=c --device=gif + +@JPEG_COMMENT@@JPEG@: c/x01c@EXEEXT@ +@JPEG_COMMENT@ echo jpeg +@JPEG_COMMENT@ ./plplot-test.sh --front-end=c --device=jpeg + +@PNG_COMMENT@@PNG@: c/x01c@EXEEXT@ +@PNG_COMMENT@ echo png +@PNG_COMMENT@ ./plplot-test.sh --front-end=c --device=png + +@PSTTFC_COMMENT@@PSTTFC@: c/x01c@EXEEXT@ +@PSTTFC_COMMENT@ echo psttfc +@PSTTFC_COMMENT@ ./plplot-test.sh --front-end=c --device=psttfc + +@SVG_COMMENT@@SVG@: c/x01c@EXEEXT@ +@SVG_COMMENT@ echo svg +@SVG_COMMENT@ ./plplot-test.sh --front-end=c --device=svg + +@XFIG_COMMENT@@XFIG@: c/x01c@EXEEXT@ +@XFIG_COMMENT@ echo xfig +@XFIG_COMMENT@ ./plplot-test.sh --front-end=c --device=xfig + +test_interactive: + ./plplot-test-interactive.sh + +clean: test_clean + target=`echo $@`; \ + list='$(SUBDIRS)'; for subdir in $$list; do \ + if test -d "$$subdir"; then \ + echo "Making $$target in $$subdir"; \ (cd $$subdir && $(MAKE) $$target); \ fi; \ done + +test_clean: + rm -f *.psc *.pdfcairo *.pngcairo *.pscairo *.svgcairo \ + *.gif *.jpeg *.png *.psttfc *.svg *.xfig *.txt test.error + +.PHONY : all clean test test_clean test_interactive This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |