http://nagoya.apache.org/bugzilla/show_bug.cgi?id=2715

*** shadow/2715 Fri Jul 20 11:06:13 2001
--- shadow/2715.tmp.24770       Fri Jul 20 11:06:13 2001
***************
*** 0 ****
--- 1,38 ----
+ +============================================================================+
+ | Build recursion suppresses make failures                                   |
+ +----------------------------------------------------------------------------+
+ |        Bug #: 2715                        Product: Xerces-C++              |
+ |       Status: NEW                         Version: 1.5.1                   |
+ |   Resolution:                            Platform: All                     |
+ |     Severity: Normal                   OS/Version: All                     |
+ |     Priority: Other                     Component: Build                   |
+ +----------------------------------------------------------------------------+
+ |  Assigned To: [EMAIL PROTECTED]                                  |
+ |  Reported By: [EMAIL PROTECTED]                                              |
+ |      CC list: Cc:                                                          |
+ +----------------------------------------------------------------------------+
+ |          URL:                                                              |
+ +============================================================================+
+ |                              DESCRIPTION                                   |
+ The Xerces makefiles are full of the following sort of construct:
+ 
+       cd dir ; make ; cd ..
+ 
+ This has two problems:
+ 1) ; allows the right side to execute even if the right side fails.
+ 2) cd .. is unnecessary on GNU and UNIX make systems.
+ 
+ The two together mean that a failure from make will not stop the recursion, and
+ the build will keep going long past the place where you need to actually examine
+ the logs.  Also, there is the danger of "cd" failing and make running again in
+ the same directory.
+ 
+ The following bit of perl changes the above to the much safer
+       cd dir && make
+ 
+ find . -name Makefile.in | xargs perl -i -pe
+ 
+'s:(\b(?\:\$\(CD\)|cd)\s+\S+\s*);(\s*(?\:\$\(MAKE\)|make)[^;]+);\s*(\$\(CD\)|cd)[^;]+?((?=$)|;):$1&&$2:'
+ 
+ If systems which tread CWD as a global (DOS nmake) need to be supported,
+ something like this is better (but won't work right if -i is being used):
+       cd dir && make && cd ..

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to