builder: Add support for gmake

db4
Eduardo Cavazos 2008-03-30 14:39:13 -06:00
parent ea12d45337
commit 2d80153b07
1 changed files with 20 additions and 4 deletions

View File

@ -48,15 +48,31 @@ IN: builder
: record-git-id ( -- ) git-id "../git-id" utf8 [ . ] with-file-writer ;
: do-make-clean ( -- ) { "make" "clean" } try-process ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
: gnu-make ( -- string )
os { "freebsd" "openbsd" "netbsd" } member?
[ "gmake" ]
[ "make" ]
if ;
! : do-make-clean ( -- ) { "make" "clean" } try-process ;
: do-make-clean ( -- ) { gnu-make "clean" } to-strings try-process ;
! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
! : make-vm ( -- desc )
! <process>
! { "make" } >>command
! "../compile-log" >>stdout
! +stdout+ >>stderr ;
: make-vm ( -- desc )
<process>
{ "make" } >>command
"../compile-log" >>stdout
+stdout+ >>stderr ;
{ gnu-make } to-strings >>command
"../compile-log" >>stdout
+stdout+ >>stderr ;
: do-make-vm ( -- )
make-vm [ "vm compile error" print "../compile-log" cat ] run-or-bail ;