Author: sebor
Date: Fri May 18 10:30:03 2007
New Revision: 539530
URL: http://svn.apache.org/viewvc?view=rev&rev=539530
Log:
2007-05-18 Martin Sebor <[EMAIL PROTECTED]>
* makefile.rules (run): To avoid filling up disk space with junk files
left
behind by bad programs, created and set TMP to a temporary directory
before
running the programs, and then removed it when done.
Modified:
incubator/stdcxx/trunk/etc/config/makefile.rules
Modified: incubator/stdcxx/trunk/etc/config/makefile.rules
URL:
http://svn.apache.org/viewvc/incubator/stdcxx/trunk/etc/config/makefile.rules?view=diff&rev=539530&r1=539529&r2=539530
==============================================================================
--- incubator/stdcxx/trunk/etc/config/makefile.rules (original)
+++ incubator/stdcxx/trunk/etc/config/makefile.rules Fri May 18 10:30:03 2007
@@ -105,6 +105,10 @@
# a report (set to ALL to run all executables)
# hung or runaway processes are killed after a customizable timeout period
#
+# to avoid filling up disk space with junk files left behind by bad programs
+# creates and sets TMP to a temporary directory before running the programs
+# which is then removed when done
+#
# PlumHall specific:
# for all "top level" tests that failed to build, find and build all
# subtests (the little tests the main test consists of)
@@ -112,7 +116,11 @@
@(LD_LIBRARY_PATH=$$LD_LIBRARY_PATH:$(LIBDIR); \
PATH=$$PATH:.; \
TOPDIR=$(TOPDIR); \
- export LD_LIBRARY_PATH PATH TOPDIR; \
+ TMP=$${TMP:-/tmp}/stdcxx-run-$$$$; \
+ export TMP; \
+ export LD_LIBRARY_PATH PATH TMP TOPDIR; \
+ trap "rm -rf $$TMP" HUP INT QUIT TERM EXIT; \
+ mkdir -p $$TMP; \
./run $(RUNFLAGS) $(RUNTARGET); \
exit 0)