X-Git-Url: http://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=mk-2nd.awk;h=45def01202e390093790645cc01c34f0a6d0fc5d;hp=9240b4707a1b1dd15133f2d5d5ff024dc8745801;hb=46722468f47c2b77b3987729b4bcf2321cccfd01;hpb=661078ddbde3ce0f3b06e95642fbb9b5fef7dca1 diff --git a/mk-2nd.awk b/mk-2nd.awk index 9240b470..45def012 100644 --- a/mk-2nd.awk +++ b/mk-2nd.awk @@ -1,4 +1,4 @@ -# $Id: mk-2nd.awk,v 1.10 1998/02/11 12:13:53 tom Exp $ +# $Id: mk-2nd.awk,v 1.13 2000/10/14 17:57:02 Johnny.C.Lam Exp $ ############################################################################## # Copyright (c) 1998 Free Software Foundation, Inc. # # # @@ -67,7 +67,14 @@ BEGIN { } } } - !/^[@#]/ { + /^[@#]/ { + next + } + $1 ~ /trace/ { + if (traces != "all" && traces != MODEL && $1 != "lib_trace") + next + } + { if ($0 != "" \ && using != 0) { found = 1 @@ -89,10 +96,13 @@ BEGIN { atsign="@" printf "\t@echo 'compiling %s (%s)'\n", $1, model } - if ( $3 == "." || srcdir == "." ) - printf "\t%scd ../%s; $(%s) $(CFLAGS_%s) -c ../%s/%s%s", atsign, model, compile, MODEL, name, $1, suffix - else - printf "\t%scd ../%s; $(%s) $(CFLAGS_%s) -c %s/%s%s", atsign, model, compile, MODEL, $3, $1, suffix + if ( $3 == "." || srcdir == "." ) { + dir = $3 "/" + sub("^\\$\\(srcdir\\)/","",dir); + sub("^\\./","",dir); + printf "\t%scd ../%s; $(LIBTOOL) $(%s) $(CFLAGS_%s) -c ../%s/%s%s%s", atsign, model, compile, MODEL, name, dir, $1, suffix + } else + printf "\t%scd ../%s; $(LIBTOOL) $(%s) $(CFLAGS_%s) -c %s/%s%s", atsign, model, compile, MODEL, $3, $1, suffix } else { printf "%s", $1 for (n = 2; n <= NF; n++) printf " %s", $n