Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

recursive makes



-----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-----



Messages sorted by: Reverse Date, Date, Thread, Author