zsh-workers
 help / color / mirror / code / Atom feed
* recursive makes
@ 1997-01-03 11:04 Zefram
  0 siblings, 0 replies; only message in thread
From: Zefram @ 1997-01-03 11:04 UTC (permalink / raw)
  To: Z Shell workers mailing list

-----BEGIN PGP SIGNED MESSAGE-----

This patch makes the linked-in module object files be built with as few
recursive make invocations as possible.  (This method does one sed per
object, instead of the old two per module; in tests I find that such a
sed is about an order of magnitude cheaper than a null make.)

This change also allows for the possibility of a module with objects in
more than one directory, which the old code didn't handle correctly.

 -zefram

      *** Src/mkstamp.sh	1997/01/03 05:28:31	1.4
      --- Src/mkstamp.sh	1997/01/03 09:06:16
      ***************
      *** 18,23 ****
      --- 18,27 ----
        act="rm -f `pwd`/$STMP"
        trap "rm -f $STMP.tmp; exit 1" 1 2 15
        echo > $STMP.tmp
      + makelist=' //'
      + mlsed='s% \([^/][^/]*/[^/]*\)$% ./\1%
      +        s% \([^ ]*/[^ ]*\) \([^/]*\) \([^ ]*/.*\) \1/\([^ /]*\)$% \1 \2 \4 \3%
      +        s% // \(.*\)/\([^/]*\)$% \1 \2 //%'
        for mod in `cat $MODBINS`; do
            sed='/^ *'$mod' *:[^:>]*$/{
                     s/.*://
      ***************
      *** 38,48 ****
        	    exit 1
        	fi
            fi
      !     bdir=`echo $objs | sed 's, .*$,,;s,^,./,;s,/[^/]*$,,'`
      !     bobjs=`echo '' $objs | sed 's, [^ ]*/, ,g'`
            (cd $bdir && eval "$MAKE $MAKEDEFS EXTRA_BUILDACT=\"\$act\" \$bobjs") ||
        	{ rm -f $STMP.tmp; exit 1; }
      -     echo $objs >> $STMP.tmp
        done
        if cmp -s $STMP.tmp $STMP; then
            rm -f $STMP.tmp
      --- 42,67 ----
        	    exit 1
        	fi
            fi
      !     for obj in $objs; do
      ! 	makelist=`echo "$makelist $obj" | sed -e "$mlsed"`
      !     done
      !     echo $objs >> $STMP.tmp
      ! done
      ! set dummy $makelist
      ! shift
      ! while test :"$1" != ://; do
      !     bdir=$1
      !     shift
      !     bobjs=
      !     while :; do
      ! 	case "$1" in
      ! 	    */*) break ;;
      ! 	esac
      ! 	bobjs="$bobjs $1"
      ! 	shift
      !     done
            (cd $bdir && eval "$MAKE $MAKEDEFS EXTRA_BUILDACT=\"\$act\" \$bobjs") ||
        	{ rm -f $STMP.tmp; exit 1; }
        done
        if cmp -s $STMP.tmp $STMP; then
            rm -f $STMP.tmp

-----BEGIN PGP SIGNATURE-----
Version: 2.6.2

iQCVAwUBMszOnXD/+HJTpU/hAQFTDQP/SR/TM28wMd2b165yvhJzh/BG/yemyIwP
ruVokljCBDv1BzzVXUtI/tQBfz4KWmSFfzuoMdypWqQ2QbqKbbizgLJgTKM7fcX3
XnumF29VxrotJEk1cfh/ZXcrg5SiivhY4BTwl/9ZrINRUlm5veH3Gn+8zCMPf9JZ
ibKwCDC8Zvw=
=nauK
-----END PGP SIGNATURE-----


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1997-01-03 10:59 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-01-03 11:04 recursive makes Zefram

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).