str-name = base;
text = <<_END_OF_BASE_TEXT_
+[++ AutoGen5 Template ++]
# Global variables.
lo2o="s/\\.lo\$/.${objext}/"
o2lo="s/\\.${objext}\$/.lo/"
the file itself is deleted using <command>.\n";
text = << _END_EXECUTE_STRING_
+[++ AutoGen5 Template ++]
rm="$nonopt"
files=
rmforce=
code suffix `.c' with the library object suffix, `.lo'.\n";
text = << _END_COMPILE_STRING_
+[++ AutoGen5 Template ++]
# Get the compilation command and the source file.
base_compile=
prev=
+++ /dev/null
-[= AutoGen5 Template =]
- execute)
- modename="$modename: execute"
-
- # The first argument is the command name.
- cmd="$nonopt"
- [= test-or-exit test = 'test -z "$cmd"'
- msg = "you must specify a COMMAND" =]
-[=(shellf "cat > .lttmp.exe <<'END_LTEXE_TEMP'
-[+ AutoGen5 Template +]
-%s\nEND_LTEXE_TEMP"
- (get "string[EXECUTE_STRING].text")) =][=
- INCLUDE ".lttmp.exe" =][=
- `rm -f .lttmp.exe` =]
- ;;
Then, <command> is executed, with `<cmd-arg>...' as arguments.\n";
text = << _END_EXECUTE_STRING_
+[++ AutoGen5 Template ++]
# Handle -dlopen flags immediately.
for file in $execute_dlfiles; do
- [+ test-or-exit test = 'test ! -f "$file"'
- msg = "\\`$file' is not a file" +]
+ [++ test-or-exit test = 'test ! -f "$file"'
+ msg = "\\`$file' is not a file" ++]
dir=
case $file in
*.la)
# Check to see that this really is a libtool archive.
- [+ test-or-exit invert = yes
+ [++ test-or-exit invert = yes
test = "sed -e '2q' $file | egrep \"^# Generated by .*$PACKAGE\""
- msg = "\\`$lib' is not a valid libtool archive" +]
+ msg = "\\`$lib' is not a valid libtool archive" ++]
# Read the libtool library.
dlname=
dir=`$echo "X$file" | $Xsed -e 's%/[^/]*$%%'`
test "X$dir" = "X$file" && dir=.
- [+ test-or-exit test = 'test -f "$dir/$objdir/$dlname"' invert = yes
- msg = "cannot find \\`$dlname' in \\`$dir' or \\`$dir/$objdir'" +]
+ [++ test-or-exit test = 'test -f "$dir/$objdir/$dlname"' invert = yes
+ msg = "cannot find \\`$dlname' in \\`$dir' or \\`$dir/$objdir'" ++]
dir="$dir/$objdir"
;;
the `--dry-run' option if you just want to see what would be executed.\n";
text = << _END_FINISH_STRING_
+[++ AutoGen5 Template ++]
libdirs="$nonopt"
admincmds=
(only BSD-compatible install options are recognized).\n";
text = << _END_INSTALL_STRING_
+[++ AutoGen5 Template ++]
# There may be an optional sh(1) argument at the beginning of
# install_prog (especially on Windows NT).
if test "$nonopt" = "$SHELL" || test "$nonopt" = /bin/sh ||
is created, otherwise an executable program is created.\n";
text = << _END_LINK_STRING_
+[++ AutoGen5 Template ++]
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
# It is impossible to link a dll without this setting, and
[= AutoGen5 Template in=ltmain.in =]
[=( dne "# " "# " )=][=
-DEFINE test-or-exit =]
-if ([=test=]) > /dev/null 2>&1 ; then
-[= invert " :\nelse"=]
+DEFINE test-or-exit
+
+=]if ([=test=]) > /dev/null 2>&1 ; then[=
+ invert " :\nelse"=]
$echo "$modename: [=msg=]" 1>&2
$echo "$help" 1>&2
exit 1
default_mode=
help="Try \`$progname --help' for more information."
-[=string[BASE_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[BASE_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =][=
+ `rm -f .lt.tmp` =]
if test "$LTCONFIG_VERSION" != "$VERSION"; then
echo "$modename: ltconfig version \`$LTCONFIG_VERSION' does not match $PROGRAM version \`$VERSION'" 1>&2
# libtool compile mode
compile)
modename="$modename: compile"
-[=string[COMPILE_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[COMPILE_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =]
exit 0
;;
# libtool link mode
link | relink)
modename="$modename: link"
-[=string[LINK_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[LINK_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =]
exit 0
;;
install)
modename="$modename: install"
-[=string[INSTALL_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[INSTALL_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =]
exit 0
;;
# libtool finish mode
finish)
modename="$modename: finish"
-[=string[FINISH_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[FINISH_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =]
exit 0
;;
# libtool execute mode
-[= include "lt_exe.tpl" =]
+ execute)
+ modename="$modename: execute"
+
+ # The first argument is the command name.
+ cmd="$nonopt"
+ [= test-or-exit test = 'test -z "$cmd"'
+ msg = "you must specify a COMMAND" =]
+[= (out-push-new ".lt.tmp") =][=
+ string[EXECUTE_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =]
+ ;;
# libtool clean and uninstall mode
clean | uninstall)
modename="$modename: $mode"
-[=string[CLEAN_STRING].text=]
+[= (out-push-new ".lt.tmp") =][=
+ string[CLEAN_STRING].text =][=
+ (out-pop) =][=
+ INCLUDE ".lt.tmp" =][=
+ `rm -f .lt.tmp` =]
exit $exit_status
;;
IF (== (suffix) "h") =][=
+DEFINE test-or-exit
+
+=]if ([=test=]) > /dev/null 2>&1 ; then[=
+ invert " :\nelse"=]
+ $echo "$modename: [=msg=]" 1>&2
+ $echo "$help" 1>&2
+ exit 1
+fi[=
+
+ENDDEF =][=
+
(define guard (string-append "HDRGRD_" (string-upcase!
(string->c-name! (out-name)) )))
(define hdr-name (out-name)) =]
IF (exist? "text")
=][=
- IF (== (suffix) "h") =]
-#define [=(string-upcase! (get "str_name"))=]_CMD_SIZE [=(+ 1 (len "text"))=]
-extern [=
- ELSE =]
-[= ENDIF
-=]tCC z[=(string-capitalize! (get "str_name"))
- =]Cmd[ [=(string-upcase! (get "str_name"))=]_CMD_SIZE ][=
- IF (== (suffix) "c") =] =
-[=(kr-string (get "text"))=][=
- ENDIF =];[=
-
- ENDIF =]
-[=
- IF (== (suffix) "c") =]
+ IF (== (suffix) "c") =]
+tSCC z[= (string-capitalize! (get "str_name")) =]Cmd[] =
+[= (out-push-new ".lt.tpl") =][=
+ text =][=
+ (out-pop)
+ (out-push-new ".lt.xxx") =][=
+ INCLUDE ".lt.tpl" =][=
+ (out-pop)
+ (kr-string (shell "cat .lt.xxx ; rm -f .lt.*")) =][=
+ ENDIF =];
+
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */[=
ENDIF =][=