From f0ca8325c17648d19fd36c08dc5097be4441ea9b Mon Sep 17 00:00:00 2001 From: Alexandre Oliva Date: Sat, 2 Mar 2002 20:59:39 +0000 Subject: [PATCH] accommodate the new --preserve-dup-deps option --- exe/ltopts.def | 30 ++++++++++++++++++++---------- exe/ltstr.tpl | 30 +++++++++++++----------------- 2 files changed, 33 insertions(+), 27 deletions(-) diff --git a/exe/ltopts.def b/exe/ltopts.def index c70c05db4..046ec7ab7 100644 --- a/exe/ltopts.def +++ b/exe/ltopts.def @@ -29,7 +29,8 @@ one of the following values: \tinstall install libraries or executables \tlink create a library or an executable \trelink (synonym for `link') -\tuninstall remove libraries from an installed directory"; +\tuninstall remove libraries from an installed directory +\techo the program behaves as a reimplementation of echo"; include = @@ -81,13 +82,6 @@ flag = { doc = "This option is equivalent to `--mode=finish'"; }; -flag = { - name = "preserve_dup_deps"; - descrip = "normally, duplicate libs are removed"; - doc = "Sometimes in some circumstances it is necessary to search\n" - "a library multiple times. By default, we do not."; -}; - flag = { name = "fallback_echo"; flag_code = ' SET_OPT_MODE("echo");'; @@ -182,7 +176,7 @@ flag = { * * * * * * * * * * * * * * * * * * * * * * * * * * */ flag = { - name = doc_link; + name = doc_comp_and_link; documentation; descrip = 'compile and link mode options:'; }; @@ -207,13 +201,29 @@ flag = { ""; }; +/* + * * * * * * * * * * * * * * * * * * * * * * * * * * + */ +flag = { + name = doc_link; + documentation; + descrip = 'link only mode options:'; +}; + +flag = { + name = "preserve_dup_deps"; + descrip = " -- normally, duplicate libs are removed"; + doc = "Sometimes in some circumstances it is necessary to search\n" + "a library multiple times. By default, we do not."; +}; + /* * * * * * * * * * * * * * * * * * * * * * * * * * * */ flag = { name = doc_compile; documentation; - descrip = 'compile-only mode options:'; + descrip = 'compile only mode options:'; }; flag = { diff --git a/exe/ltstr.tpl b/exe/ltstr.tpl index cd7528e8b..022fec831 100644 --- a/exe/ltstr.tpl +++ b/exe/ltstr.tpl @@ -3,15 +3,10 @@ * * Strings that, when written from 'C', must be the same as * the strings typed in the definition and template files. - */[= - + */ +[= IF (== (suffix) "h") =][= - - (define guard (string-append "HDRGRD_" (string-upcase! - (string->c-name! (out-name)) ))) - (define hdr-name (out-name)) =] -#ifndef [=(. guard)=] -#define [=(. guard)=] 1 + (make-header-guard "ltmain") =] #include #include @@ -52,17 +47,18 @@ extern emitScriptProc emitScript;[= ELSE not h suffix -=] -#include "[=(. hdr-name)=]" +=]#include "[=(. header-file)=]" [= (define tpl-name "") (define cmd-list "") +(define cmd-str "") (define proc-list "") (define Cmd-Name "") =][= FOR string =][= (set! Cmd-Name (string-capitalize! (get "str_name"))) + (set! cmd-str (string-append "z" Cmd-Name "Cmd")) =] /* @@ -84,12 +80,12 @@ tSCC zExplain[=(. Cmd-Name)=][ [= IF (exist? "explain") =] [= ENDIF =] -tSCC z[= (. Cmd-Name) =]Cmd[] =[= - (out-push-new ".lt.sh") =][= - INCLUDE (. tpl-name) =][= - (out-pop) - (set! cmd-list (string-append cmd-list "z" Cmd-Name "Cmd\n")) - (kr-string (shell "cat .lt.sh ; rm -f .lt.sh")) +tSCC [= (. cmd-str) =][] =[= + INCLUDE + (set! cmd-list (string-append cmd-list cmd-str "\n")) + (out-push-new) + (. tpl-name) =][= + (kr-string (out-pop #t)) =]; /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */[= @@ -148,6 +144,6 @@ extern void modalUsage LT_PARAMS(( tOptions* pOpts, int exitCode )); extern void emitShellQuoted LT_PARAMS(( tCC* pzArg, FILE* outFp )); extern void emitShellArg LT_PARAMS(( tCC* pzArg, FILE* outFp )); -#endif /* [=(. guard)=] */[= +#endif /* [=(. header-guard)=] */[= ENDIF =] -- 2.47.3