-
-AutoGen Definitions ltmain.tpl;
-
-#define BASE_STRING 0
-
-string[0] = {
- str-name = base;
-
- text = <<_END_OF_BASE_TEXT_
[++ AutoGen5 Template ++]
# Global variables.
lo2o="s/\\.lo\$/.${objext}/"
if test "${LANG+set}" = set; then
save_LANG="$LANG"; LANG=C; export LANG
fi
-_END_OF_BASE_TEXT_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_base.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define UNINSTALL_STRING 7
-
-string[UNINSTALL_STRING] = {
- str-name = uninstall;
- use_explain = clean;
- use_cmd = clean;
-};
-
-
-#define CLEAN_STRING 1
-
-string[CLEAN_STRING] = {
- str-name = clean;
- explain = "
-<command> is the name of the program to use to delete files associated with
-each FILE (typically `/bin/rm'). `<cmd-arg>-s' are options (such as `-f')
-to be passed to <command>.
-
-If one of the arguments specifies the removal of a libtool library, object
-or program, all the files associated with it are deleted. Otherwise, only
-the file itself is deleted using <command>.\n";
-
- text = << _END_EXECUTE_STRING_
[++ AutoGen5 Template ++]
rm="$nonopt"
files=
$run rmdir $dir >/dev/null 2>&1
fi
done
-_END_EXECUTE_STRING_;
-};
-
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_clean.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define COMPILE_STRING 2
-
-string[COMPILE_STRING] = {
- str-name = compile;
- call-proc = emitCompile;
-
- explain = "
-Compile a source file into a libtool library object.\n
-This mode accepts the following additional options:\n
- -o OUTPUT-FILE set the output file name to OUTPUT-FILE
- -prefer-pic try to building PIC objects only
- -prefer-non-pic try to building non-PIC objects only
- -static always build a `.o' file suitable for static linking\n
-<command> is a command to be used in creating a `standard' object file
-from the source file in the <cmd-arg> list.\n
-The output file name is determined by removing the directory component from
-source file name in the <cmd-arg> list and then substituting the C source
-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=
if test "$need_locks" != no; then
$run $rm "$lockfile"
fi
-_END_COMPILE_STRING_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_compile.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define EXECUTE_STRING 3
-
-string[EXECUTE_STRING] = {
- str-name = execute;
- call-proc = emitExecute;
-
- explain = "
-Automatically set library path, then run a program.\n
-This mode accepts the following additional options:\n
- -dlopen FILE add the directory containing FILE to the library path\n
-This mode sets the library path environment variable,
-according to `-dlopen' flags.\n
-If any of the <cmd-arg> are libtool executable wrappers, then they are
-translated into their corresponding uninstalled binary, and any of their
-required library directories are added to the library path.\n
-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
$echo "$cmd$args"
exit 0
fi
-_END_EXECUTE_STRING_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_execute.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define FINISH_STRING 4
-
-string[FINISH_STRING] = {
- str-name = finish;
- explain = "
-Complete the installation of libtool libraries.\n
-The <cmd-arg>-s must actually be directories that contain
-libtool libraries.\n
-The commands that this mode executes may require superuser privileges. Use
-the `--dry-run' option if you just want to see what would be executed.\n";
-
- text = << _END_FINISH_STRING_
[++ AutoGen5 Template ++]
libdirs="$nonopt"
admincmds=
echo "See any operating system documentation about shared libraries for"
echo "more information, such as the ld(1) and ld.so(8) manual pages."
echo "----------------------------------------------------------------------"
-_END_FINISH_STRING_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_finish.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define INSTALL_STRING 5
-
-string[INSTALL_STRING] = {
- str-name = install;
- explain = "
-Install executables or libraries.\n
-<command> is the installation command.
-It should be either the `install' or `cp' program.\n
-<cmd-arg>-s are interpreted as arguments to that command
-(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).
exec $SHELL $0 --finish$current_libdirs
exit 1
fi
-_END_INSTALL_STRING_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_install.def ends here */
-
-AutoGen Definitions ltmain.tpl;
-
-#define LINK_STRING 6
-
-string[LINK_STRING] = {
- str-name = link;
- explain = "
-Link object files or libraries together to form another library,
-or to create an executable program.\n
-<command> is a command using the C compiler that you would use to create
-a program from several object files.\n
-The following <cmd-arg>-s are treated specially:\n
- -all-static do not do any dynamic linking at all
- -avoid-version do not add a version suffix if possible
- -dlopen FILE `-dlpreopen' FILE if it cannot be dlopened at runtime
- -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
- -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
- -export-symbols SYMFILE
- try to export only the symbols listed in SYMFILE
- -export-symbols-regex REGEX
- try to export only the symbols matching REGEX
- -LLIBDIR search LIBDIR for required installed libraries
- -lNAME OUTPUT-FILE requires the installed library libNAME
- -module build a library that can dlopened
- -no-fast-install disable the fast-install mode
- -no-install link a not-installable executable
- -no-undefined declare that a library does not refer to external symbols
- -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
- -objectlist FILE Use a list of object files found in FILE to specify objects
- -release RELEASE specify package release information
- -rpath LIBDIR the created library will eventually be installed in LIBDIR
- -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
- -static do not do any dynamic linking of libtool libraries
- -version-info CURRENT[:REVISION[:AGE]]
- specify library version info [each variable defaults to 0]\n
-All other options (arguments beginning with `-') are ignored.\n
-Every other argument is treated as a filename. Files ending in `.la' are
-treated as uninstalled libtool libraries, other files are standard or library
-object files.\n
-If the OUTPUT-FILE ends in `.la', then a libtool library is created,
-only library objects (`.lo' files) may be specified, and `-rpath' is
-required, except when creating a convenience library.\n
-If OUTPUT-FILE ends in `.a' or `.lib', then a standard library is created
-using `ar' and `ranlib', or on Windows using `lib'.\n
-If OUTPUT-FILE ends in `.lo' or `.${objext}', then a reloadable object file
-is created, otherwise an executable program is created.\n";
-
- text = << _END_LINK_STRING_
[++ AutoGen5 Template ++]
case $host in
*-*-cygwin* | *-*-mingw* | *-*-pw32* | *-*-os2*)
$run eval '(cd $output_objdir && $rm $outputname && $LN_S ../$outputname $outputname)' || exit $?
;;
esac
-_END_LINK_STRING_;
-};
-
-/*
- * Local Variables:
- * mode:shell-script
- * sh-indentation:2
- * End:
- *
- * lt_link.def ends here */
-SRC = ltmain.c ltopts.c ltstr.c ltcompile.c ltexe.c ltversion.c
-OBJ = $(SRC:.c=.o)
-GENED = ltmain.in ltstr.[ch] ltopts.[ch]
-CC = cc -I/usr/local/include -g
+SRC = ltmain.c ltopts.c ltstr.c ltcompile.c ltexe.c ltversion.c
+OBJ = $(SRC:.c=.o)
+GENED = ltmain.in ltstr.[ch] ltopts.[ch]
+CC = cc -I/usr/local/include -g
+TXTTPL = base-txt.tpl clean-txt.tpl compile-txt.tpl execute-txt.tpl \
+ finish-txt.tpl install-txt.tpl link-txt.tpl
default : ltmain.in
clean :
rm -f lt*.o ltmain $(GENED) *~
-STRDEFS = ltstr.def \
- lt_base.def lt_clean.def lt_compile.def lt_execute.def \
- lt_finish.def lt_install.def lt_link.def
-
-ltmain.in : $(STRDEFS) ltmain.tpl ltmacros.tpl
+ltmain.in : $(TXTTPL) ltstr.def
autogen -T ltmain.tpl -l ltmacros.tpl ltstr.def
+ltstr.c : ltstr.def ltstr.tpl ltmacros.tpl
+ autogen -T ltstr.tpl -l ltmacros.tpl ltstr.def
+
+ltstr.h : ltstr.c
+ @-:
+
ltopts.c : ltopts.def
autogen ltopts.def
+ltopts.h : ltopts.h
+ @-:
+
ltopts.o : ltopts.c
$(CC) -c -o ltopts.o -I/usr/local/include ltopts.c
-ltstr.c : $(STRDEFS) ltstr.tpl ltmacros.tpl
- autogen -T ltstr.tpl -l ltmacros.tpl ltstr.def
-
gen : ltmain.in ltstr.c ltopts.c
-
-zip :
- @ [ -f ltmain ] && mv -f ltmain ltmain.sav ; \
- mkdir ltmain ; \
- cp -fp *.def *.tpl ltmain.c ltmain.mk ltmain/
- tar cvf - ltmain | gzip --best > ltmain.tgz
- @ rm -rf ltmain ; \
- if [ -f ltmain.sav ] ; then mv -f ltmain.sav ltmain ; fi
default_mode=
help="Try \`$progname --help' for more information."
-[= (out-push-new ".lt.tmp") =][=
- string[BASE_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =][=
- `rm -f .lt.tmp` =]
+[= INCLUDE "base-txt.tpl" =]
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"
-[= (out-push-new ".lt.tmp") =][=
- string[COMPILE_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =]
+[= INCLUDE "compile-txt.tpl" =]
exit 0
;;
# libtool link mode
link | relink)
modename="$modename: link"
-[= (out-push-new ".lt.tmp") =][=
- string[LINK_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =]
+[= INCLUDE "link-txt.tpl" =]
exit 0
;;
install)
modename="$modename: install"
-[= (out-push-new ".lt.tmp") =][=
- string[INSTALL_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =]
+[= INCLUDE "install-txt.tpl" =]
exit 0
;;
# libtool finish mode
finish)
modename="$modename: finish"
-[= (out-push-new ".lt.tmp") =][=
- string[FINISH_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =]
+[= INCLUDE "finish-txt.tpl" =]
exit 0
;;
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" =]
+[= INCLUDE "execute-txt.tpl" =]
;;
# libtool clean and uninstall mode
clean | uninstall)
modename="$modename: $mode"
-[= (out-push-new ".lt.tmp") =][=
- string[CLEAN_STRING].text =][=
- (out-pop) =][=
- INCLUDE ".lt.tmp" =][=
- `rm -f .lt.tmp` =]
+[= INCLUDE "clean-txt.tpl" =]
exit $exit_status
;;
AutoGen Definitions ltmain.tpl;
-#include lt_base.def
-#include lt_clean.def
-#include lt_compile.def
-#include lt_execute.def
-#include lt_finish.def
-#include lt_install.def
-#include lt_link.def
+#define BASE_STRING 0
+
+string[0] = {
+ str-name = base;
+};
+
+#define CLEAN_STRING 1
+
+string[CLEAN_STRING] = {
+ str-name = clean;
+ explain = "
+<command> is the name of the program to use to delete files associated with
+each FILE (typically `/bin/rm'). `<cmd-arg>-s' are options (such as `-f')
+to be passed to <command>.
+
+If one of the arguments specifies the removal of a libtool library, object
+or program, all the files associated with it are deleted. Otherwise, only
+the file itself is deleted using <command>.\n";
+};
+
+#define COMPILE_STRING 2
+
+string[COMPILE_STRING] = {
+ str-name = compile;
+ call-proc = emitCompile;
+
+ explain = "
+Compile a source file into a libtool library object.\n
+This mode accepts the following additional options:\n
+ -o OUTPUT-FILE set the output file name to OUTPUT-FILE
+ -prefer-pic try to building PIC objects only
+ -prefer-non-pic try to building non-PIC objects only
+ -static always build a `.o' file suitable for static linking\n
+<command> is a command to be used in creating a `standard' object file
+from the source file in the <cmd-arg> list.\n
+The output file name is determined by removing the directory component from
+source file name in the <cmd-arg> list and then substituting the C source
+code suffix `.c' with the library object suffix, `.lo'.\n";
+};
+
+#define EXECUTE_STRING 3
+
+string[EXECUTE_STRING] = {
+ str-name = execute;
+ call-proc = emitExecute;
+
+ explain = "
+Automatically set library path, then run a program.\n
+This mode accepts the following additional options:\n
+ -dlopen FILE add the directory containing FILE to the library path\n
+This mode sets the library path environment variable,
+according to `-dlopen' flags.\n
+If any of the <cmd-arg> are libtool executable wrappers, then they are
+translated into their corresponding uninstalled binary, and any of their
+required library directories are added to the library path.\n
+Then, <command> is executed, with `<cmd-arg>...' as arguments.\n";
+};
+
+#define FINISH_STRING 4
+
+string[FINISH_STRING] = {
+ str-name = finish;
+ explain = "
+Complete the installation of libtool libraries.\n
+The <cmd-arg>-s must actually be directories that contain
+libtool libraries.\n
+The commands that this mode executes may require superuser privileges. Use
+the `--dry-run' option if you just want to see what would be executed.\n";
+};
+
+#define INSTALL_STRING 5
+
+string[INSTALL_STRING] = {
+ str-name = install;
+ explain = "
+Install executables or libraries.\n
+<command> is the installation command.
+It should be either the `install' or `cp' program.\n
+<cmd-arg>-s are interpreted as arguments to that command
+(only BSD-compatible install options are recognized).\n";
+};
+
+#define LINK_STRING 6
+
+string[LINK_STRING] = {
+ str-name = link;
+ explain = "
+Link object files or libraries together to form another library,
+or to create an executable program.\n
+<command> is a command using the C compiler that you would use to create
+a program from several object files.\n
+The following <cmd-arg>-s are treated specially:\n
+ -all-static do not do any dynamic linking at all
+ -avoid-version do not add a version suffix if possible
+ -dlopen FILE `-dlpreopen' FILE if it cannot be dlopened at runtime
+ -dlpreopen FILE link in FILE and add its symbols to lt_preloaded_symbols
+ -export-dynamic allow symbols from OUTPUT-FILE to be resolved with dlsym(3)
+ -export-symbols SYMFILE
+ try to export only the symbols listed in SYMFILE
+ -export-symbols-regex REGEX
+ try to export only the symbols matching REGEX
+ -LLIBDIR search LIBDIR for required installed libraries
+ -lNAME OUTPUT-FILE requires the installed library libNAME
+ -module build a library that can dlopened
+ -no-fast-install disable the fast-install mode
+ -no-install link a not-installable executable
+ -no-undefined declare that a library does not refer to external symbols
+ -o OUTPUT-FILE create OUTPUT-FILE from the specified objects
+ -objectlist FILE Use a list of object files found in FILE to specify objects
+ -release RELEASE specify package release information
+ -rpath LIBDIR the created library will eventually be installed in LIBDIR
+ -R[ ]LIBDIR add LIBDIR to the runtime path of programs and libraries
+ -static do not do any dynamic linking of libtool libraries
+ -version-info CURRENT[:REVISION[:AGE]]
+ specify library version info [each variable defaults to 0]\n
+All other options (arguments beginning with `-') are ignored.\n
+Every other argument is treated as a filename. Files ending in `.la' are
+treated as uninstalled libtool libraries, other files are standard or library
+object files.\n
+If the OUTPUT-FILE ends in `.la', then a libtool library is created,
+only library objects (`.lo' files) may be specified, and `-rpath' is
+required, except when creating a convenience library.\n
+If OUTPUT-FILE ends in `.a' or `.lib', then a standard library is created
+using `ar' and `ranlib', or on Windows using `lib'.\n
+If OUTPUT-FILE ends in `.lo' or `.${objext}', then a reloadable object file
+is created, otherwise an executable program is created.\n";
+};
+
+#define UNINSTALL_STRING 7
+
+string[UNINSTALL_STRING] = {
+ str-name = uninstall;
+ use_explain = clean;
+ use_cmd = clean;
+};
#define ECHO_STRING 8
=]
#include "[=(. hdr-name)=]"
[=
+(define tpl-name "") =][=
FOR string
*/[=
- IF (exist? "explain")
+ IF (exist? "explain")
=]
tSCC zExplain[=(string-capitalize! (get "str_name"))=][ [=
(+ 1 (len "explain")) =] ] =
[=(kr-string (get "explain"))=];[=
+ ENDIF =][=
- IF (exist? "text") =]
+ IF (set! tpl-name (string-append (get "str_name") "-txt.tpl"))
+ (access? tpl-name R_OK) =][=
-[= ENDIF =][=
- ENDIF =][=
+ IF (exist? "explain") =]
- IF (exist? "text") =]
-tSCC z[= (string-capitalize! (get "str_name")) =]Cmd[] =
-[= (out-push-new ".lt.tpl") =][=
- text =][=
+[= ENDIF =]
+tSCC z[= (string-capitalize! (get "str_name")) =]Cmd[] =[=
+ (out-push-new ".lt.sh") =][=
+ INCLUDE (. tpl-name) =][=
(out-pop)
- (out-push-new ".lt.xxx") =][=
- INCLUDE ".lt.tpl" =][=
- (out-pop)
- (kr-string (shell "cat .lt.xxx ; rm -f .lt.*")) =];
+ (kr-string (shell "cat .lt.sh ; rm -f .lt.sh")) =];
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */[=
ENDIF =][=