alien.inline: fix library name and us remove-library
parent
289c963dd2
commit
59f0dbb516
|
@ -23,8 +23,7 @@ SYMBOL: C++
|
||||||
} cond ;
|
} cond ;
|
||||||
|
|
||||||
: library-path ( str -- str' )
|
: library-path ( str -- str' )
|
||||||
'[ "lib" % "-" % _ % library-suffix % ]
|
'[ "lib" % _ % library-suffix % ] "" make temp-file ;
|
||||||
"" make inline-library-file ;
|
|
||||||
|
|
||||||
: src-suffix ( lang -- str )
|
: src-suffix ( lang -- str )
|
||||||
{
|
{
|
||||||
|
|
|
@ -55,10 +55,13 @@ SYMBOL: c-strings
|
||||||
compiler-args get
|
compiler-args get
|
||||||
c-strings get "\n" join
|
c-strings get "\n" join
|
||||||
c-library get compile-to-library ;
|
c-library get compile-to-library ;
|
||||||
|
|
||||||
|
: c-library-name ( name -- name' )
|
||||||
|
[ current-vocab name>> % "_" % % ] "" make ;
|
||||||
PRIVATE>
|
PRIVATE>
|
||||||
|
|
||||||
: define-c-library ( name -- )
|
: define-c-library ( name -- )
|
||||||
[ current-vocab name>> % "_" % % ] "" make c-library set
|
c-library-name c-library set
|
||||||
V{ } clone c-strings set
|
V{ } clone c-strings set
|
||||||
V{ } clone compiler-args set ;
|
V{ } clone compiler-args set ;
|
||||||
|
|
||||||
|
@ -104,7 +107,8 @@ PRIVATE>
|
||||||
] 3bi ;
|
] 3bi ;
|
||||||
|
|
||||||
: delete-inline-library ( str -- )
|
: 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 ;
|
SYNTAX: C-LIBRARY: scan define-c-library ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue