alien.inline: fix library name and us remove-library

db4
Jeremy Hughes 2009-07-10 13:14:43 +12:00
parent 289c963dd2
commit 59f0dbb516
2 changed files with 7 additions and 4 deletions

View File

@ -23,8 +23,7 @@ SYMBOL: C++
} cond ;
: library-path ( str -- str' )
'[ "lib" % "-" % _ % library-suffix % ]
"" make inline-library-file ;
'[ "lib" % _ % library-suffix % ] "" make temp-file ;
: src-suffix ( lang -- str )
{

View File

@ -55,10 +55,13 @@ SYMBOL: c-strings
compiler-args get
c-strings get "\n" join
c-library get compile-to-library ;
: c-library-name ( name -- name' )
[ current-vocab name>> % "_" % % ] "" make ;
PRIVATE>
: define-c-library ( name -- )
[ current-vocab name>> % "_" % % ] "" make c-library set
c-library-name c-library set
V{ } clone c-strings set
V{ } clone compiler-args set ;
@ -104,7 +107,8 @@ PRIVATE>
] 3bi ;
: delete-inline-library ( str -- )
library-path dup exists? [ delete-file ] [ drop ] if ;
c-library-name [ remove-library ]
[ library-path dup exists? [ delete-file ] [ drop ] if ] bi ;
SYNTAX: C-LIBRARY: scan define-c-library ;