[openfirmware] r1244 - cpu/x86/build cpu/x86/pc/olpc/via forth/lib

svn at openfirmware.info svn at openfirmware.info
Fri Jul 17 23:47:19 CEST 2009


Author: wmb
Date: 2009-07-17 23:47:18 +0200 (Fri, 17 Jul 2009)
New Revision: 1244

Added:
   cpu/x86/pc/olpc/via/dsdt.bth
Modified:
   cpu/x86/build/builder.dic
   forth/lib/builder.fth
Log:
Builder - added depends-on: command to handle dependencies for external
compilers, and used it in new via/dsdt.bth .








Modified: cpu/x86/build/builder.dic
===================================================================
(Binary files differ)

Added: cpu/x86/pc/olpc/via/dsdt.bth
===================================================================
--- cpu/x86/pc/olpc/via/dsdt.bth	                        (rev 0)
+++ cpu/x86/pc/olpc/via/dsdt.bth	2009-07-17 21:47:18 UTC (rev 1244)
@@ -0,0 +1,13 @@
+purpose: Build the ACPI tables
+
+command: &builder &this
+build-now
+
+" iasl -p dsdt -vi -vr -vs ../dsdt.dsl" expand$ $sh
+\ " iasl -vi -vr -vs ../fadt.dsl" expand$ $sh
+\ " iasl -vi -vr -vs ../ssdt.dsl" expand$ $sh
+
+\ This forces the creation of a dsdt.log file, so we don't re-compile
+depends-on: ${BP}/cpu/x86/pc/olpc/via/dsdt.dsl
+writing dsdt.stamp
+ofd @ fclose

Modified: forth/lib/builder.fth
===================================================================
--- forth/lib/builder.fth	2009-07-17 17:10:19 UTC (rev 1243)
+++ forth/lib/builder.fth	2009-07-17 21:47:18 UTC (rev 1244)
@@ -402,7 +402,7 @@
 
    $handle-file
 ;
-: tag  ( "filename" -- )  safe-parse-word $tag  ;
+: tag  ( "filename" -- )  parse-filename $tag  ;
 
 : $build  ( filename$ -- )
 
@@ -415,11 +415,24 @@
    $handle-file
 ;
 : build  ( "filename" -- )
-   safe-parse-word ['] $build  catch  if
+   parse-filename ['] $build  catch  if
       ." Build aborted" cr  error-exit
    then
 ;
 
+\ Open and close the file so it gets logged as a dependency
+\ This is useful for build scripts that invoke external compilers,
+\ which can't automatically log dependencies.
+: depends-on:  ( "filename" -- )
+   parse-filename
+   2dup r/o open-file  if   ( filename$ )
+      drop ." Can't log " type ."  because it is inaccessible" cr
+   else                     ( filename$ fd )
+      close-file drop       ( filename$ )
+      2drop                 ( )
+   then                     ( )
+;
+
 also extensions definitions
 : builder.dic  ( adr len -- )  2drop  ;
 : builton.fth  ( adr len -- )  2drop  ;
@@ -436,6 +449,7 @@
 : sr   ( adr len -- )  intermediate-file  ;
 : out  ( adr len -- )  intermediate-file  ;
 : aml  ( adr len -- )  intermediate-file  ;
+: dsl  ( adr len -- )  source-file  ;
 
 previous definitions
 




More information about the openfirmware mailing list