Boost logo

Boost-Build :

From: Alexey Pakhunov (alexeypa_at_[hidden])
Date: 2005-11-30 16:31:17


Vladimir Prus wrote:
> There are two tweaks that better be made:
>
> - Add comment explaining the reason for "touch" commands.
> - Move "file-touch-command" to "common.jam". It already has
> "file-creation-command" so this one will be a good
> companion.

Done. See the attached diff.

Best regards/Venlig hilsen,
   Alexey Pakhunov.

Index: common.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/common.jam,v
retrieving revision 1.43
diff -u -r1.43 common.jam
--- common.jam 9 Nov 2005 13:56:41 -0000 1.43
+++ common.jam 30 Nov 2005 21:14:41 -0000
@@ -493,6 +493,22 @@
 }
 
         
+# Returns a command that may be used for 'touching' files.
+# It is not a real 'touch' command on NT because it adds an empty line at
+# the end of file but it works with source files
+rule file-touch-command ( )
+{
+ if [ os.name ] in NT
+ {
+ return "echo. >> " ;
+ }
+ else
+ {
+ return "touch " ;
+ }
+}
+
+
 rule MkDir
 {
     # If dir exists, don't update it
Index: midl.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/midl.jam,v
retrieving revision 1.1
diff -u -r1.1 midl.jam
--- midl.jam 23 Nov 2005 07:58:07 -0000 1.1
+++ midl.jam 30 Nov 2005 21:15:46 -0000
@@ -128,22 +128,11 @@
 generators.register-c-compiler midl.compile.idl : IDL : MSTYPELIB H C(%_i) C(%_proxy) C(%_dlldata) ;
 
 
-# Returns a command that may be used for 'touching' files.
-# It is not a real 'touch' command on NT because it adds an empty line at
-# the end of file but it works with source files
-rule file-touch-command ( )
-{
- if [ os.name ] in NT
- {
- return "echo. >> " ;
- }
- else
- {
- return "touch " ;
- }
-}
-
-TOUCH_FILE = [ file-touch-command ] ;
+# MIDL does not always generate '%_proxy.c' and '%_dlldata.c'. This behavior
+# depends on contents of the source IDL file. Calling TOUCH_FILE below ensures
+# that both files will be created so bjam will not try to recreate them
+# constantly.
+TOUCH_FILE = [ common.file-touch-command ] ;
 
 actions compile.idl
 {
Index: msvc.jam
===================================================================
RCS file: /cvsroot/boost/boost/tools/build/v2/tools/msvc.jam,v
retrieving revision 1.66
diff -u -r1.66 msvc.jam
--- msvc.jam 23 Nov 2005 08:25:31 -0000 1.66
+++ msvc.jam 30 Nov 2005 21:20:09 -0000
@@ -564,7 +564,8 @@
     $(.RC) -l 0x409 -U$(UNDEFS) -D$(DEFINES) -I"$(INCLUDES)" -fo "$(<:W)" "$(>:W)"
 }
 
-TOUCH_FILE = [ midl.file-touch-command ] ;
+# See midl.jam for details
+TOUCH_FILE = [ common.file-touch-command ] ;
 
 actions compile.idl
 {


Boost-Build list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk