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

merged Makefile fixes



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

This patch does what my patch 2696 does, but applies on top of Zoltan's
patch 2694.  Please use this *instead of* patch 2696.

This patch also makes sure that the Makefile passes all necessary
parameters to the scripts, and avoids relying on #!.

 -zefram

 *** Src/Makefile.in	Thu Jan  2 13:51:13 1997
 --- Src/Makefile.in	Thu Jan  2 14:19:57 1997
 ***************
 *** 54,60 ****
   DLLDFLAGS = @DLLDFLAGS@
   EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
   
 ! INCLUDES = -I.. -I. -I$(srcdir) -I$(MODULE_DIR) -IZle -I$(srcdir)/Zle
   
   DNCFLAGS =
   
 --- 54,60 ----
   DLLDFLAGS = @DLLDFLAGS@
   EXTRA_LDFLAGS = @EXTRA_LDFLAGS@
   
 ! INCLUDES = -I.. -I. -I$(srcdir)
   
   DNCFLAGS =
   
 ***************
 *** 75,80 ****
 --- 75,82 ----
   prefix='$(prefix)' exec_prefix='$(exec_prefix)' bindir='$(bindir)' \
   libdir='$(libdir)' infodir='$(infodir)' mandir='$(mandir)' manext='$(manext)'
   
 + EXTRA_BUILDACT = :
 + 
   KNR_OBJ=.o
   KNROBJ=._foo_
   
 ***************
 *** 86,96 ****
 --- 88,100 ----
   
   .c$(ANSI@U@OBJ):
   	$(COMPILE) -o $@ $<
 + 	@$(EXTRA_BUILDACT)
   
   .c$(KNR@U@OBJ):
   	./ansi2knr $< > $@.c
   	$(COMPILE) -o $@ $@.c
   	rm -f $@.c
 + 	@$(EXTRA_BUILDACT)
   
   .c.pro:
   	$(SED) -n -f $(srcdir)/makepro.sed $< > $@
 ***************
 *** 154,160 ****
   XMODCF  = $(srcdir)/xmods.conf
   MODBINS = modules-bltin
   
 ! CFSED   = sed -n -f $(srcdir)/conf.sed -e
   
   # ========= DEPENDENCIES FOR BUILDING ==========
   
 --- 158,164 ----
   XMODCF  = $(srcdir)/xmods.conf
   MODBINS = modules-bltin
   
 ! CFSED   = -f $(srcdir)/conf.sed
   
   # ========= DEPENDENCIES FOR BUILDING ==========
   
 ***************
 *** 208,221 ****
   	fi
   
   bltinmods.list: $(MODBINS) $(XMODCF) mkbltnmlst.sh
 ! 	MODBINS=$(MODBINS) XMODCF=$(XMODCF) $(srcdir)/mkbltnmlst.sh $@
   
   zshxmods.h: $(MODBINS) $(XMODCF)
   	@echo "Creating \`$@'."
   	@( \
   	    binmods=`sed 's/^/ /;s/$$/ /' $(MODBINS)`; \
 ! 	    sed='/^[^#:>]*>[^#:>]*$$/{s/>.*//;p;}'; \
 ! 	    xmods=`$(CFSED) "$$sed" $(XMODCF)`; \
   	    for mod in $$xmods; do \
   		case $$binmods in \
   		    *" $$mod "*) \
 --- 212,229 ----
   	fi
   
   bltinmods.list: $(MODBINS) $(XMODCF) mkbltnmlst.sh
 ! 	srcdir='$(srcdir)'; \
 ! 	CFSED='$(CFSED)'; \
 ! 	MODBINS='$(MODBINS)'; \
 ! 	XMODCF='$(XMODCF)'; \
 ! 	. $(srcdir)/mkbltnmlst.sh $@
   
   zshxmods.h: $(MODBINS) $(XMODCF)
   	@echo "Creating \`$@'."
   	@( \
   	    binmods=`sed 's/^/ /;s/$$/ /' $(MODBINS)`; \
 ! 	    sed='/^[^:>]*>[^:>]*$$/{s/>.*//;p;}'; \
 ! 	    xmods=`sed -n $(CFSED) -e "$$sed" $(XMODCF)`; \
   	    for mod in $$xmods; do \
   		case $$binmods in \
   		    *" $$mod "*) \
 ***************
 *** 231,237 ****
   
   $(MODBINS):
   	if test @D@ = N; then \
 ! 	    $(CFSED) '/^[^#:>]*>[^#:>]*$$/{s/>.*//;p;}' $(XMODCF) > $@; \
   	else \
   	    echo > $@; \
   	fi
 --- 239,245 ----
   
   $(MODBINS):
   	if test @D@ = N; then \
 ! 	    sed -n $(CFSED) -e '/^[^:>]*>[^:>]*$$/{s/>.*//;p;}' $(XMODCF) > $@; \
   	else \
   	    echo > $@; \
   	fi
 ***************
 *** 241,248 ****
   $(PROTO): makepro.sed
   
   $(NSTMP): $(MODBINS) $(MODCF) mkstamp.sh proto FORCE
 ! 	@MODBINS=$(MODBINS) MODCF=$(MODCF) MODULE_DIRS="$(MODULE_DIRS)" \
 ! 	MAKE=$(MAKE) MAKEDEFS="$(MAKEDEFS)" $(srcdir)/mkstamp.sh $@
   
   FORCE:
   
 --- 249,262 ----
   $(PROTO): makepro.sed
   
   $(NSTMP): $(MODBINS) $(MODCF) mkstamp.sh proto FORCE
 ! 	@srcdir='$(srcdir)'; \
 ! 	CFSED='$(CFSED)'; \
 ! 	MODBINS='$(MODBINS)'; \
 ! 	MODCF='$(MODCF)'; \
 ! 	MODULE_DIRS='$(MODULE_DIRS)'; \
 ! 	MAKE='$(MAKE)'; \
 ! 	MAKEDEFS="$(MAKEDEFS)"; \
 ! 	. $(srcdir)/mkstamp.sh $@
   
   FORCE:
   
 *** Src/conf.sed	Thu Jan  2 13:51:13 1997
 --- Src/conf.sed	Thu Jan  2 13:57:43 1997
 ***************
 *** 5,8 ****
       b1
   }
   s/	/ /g
 ! /^ *$$/d
 --- 5,9 ----
       b1
   }
   s/	/ /g
 ! s/#.*$//
 ! /^ *$/d
 *** Src/mkbltnmlst.sh	Thu Jan  2 13:51:13 1997
 --- Src/mkbltnmlst.sh	Thu Jan  2 14:14:17 1997
 ***************
 *** 4,20 ****
   #
   # Written by Andrew Main
   #
 ! srcdir=`echo $0|sed 's%/[^/][^/]*$%%'`
 ! test "x$srcdir" = "x$0" && srcdir=.
 ! CFSED="${CFSED-sed -n -f $srcdir/conf.sed -e}"
 ! MODBINS="${MODBINS-modules-bltin}"
 ! XMODCF="${XMODCF-$srcdir/xmods.conf}"
   binmods=`sed 's/^/ /;s/$/ /' $MODBINS`
 ! sed='/^[^#:>]*>[^#:>]*$/{
       s/>.*//
       p
   }'
 ! xmods=`$CFSED "$sed" $XMODCF`
   trap "rm -f $1; exit 1" 1 2 15
   exec > $1
   for mod in $xmods; do
 --- 4,20 ----
   #
   # Written by Andrew Main
   #
 ! srcdir=${srcdir:-`echo $0|sed 's%/[^/][^/]*$%%'`}
 ! srcdir=${srcdir:-.}
 ! CFSED=${CFSED-"-f $srcdir/conf.sed"}
 ! MODBINS=${MODBINS-modules-bltin}
 ! XMODCF=${XMODCF-$srcdir/xmods.conf}
   binmods=`sed 's/^/ /;s/$/ /' $MODBINS`
 ! sed='/^[^:>]*>[^:>]*$/{
       s/>.*//
       p
   }'
 ! xmods=`sed -n $CFSED -e "$sed" $XMODCF`
   trap "rm -f $1; exit 1" 1 2 15
   exec > $1
   for mod in $xmods; do
 ***************
 *** 21,39 ****
       case $binmods in
   	*" $mod "*) ;;
   	*)  echo "/* non-linked-in known module \`$mod' */"
 ! 	    sed='/^ *'$mod' *>[^#:>]*$/{
                       s/.*>//
                       p
                    }'
 ! 	    bins=`$CFSED "$sed" $XMODCF`
   	    for bin in $bins; do
   		echo "    add_autobin(\"$bin\", \"$mod\");"
   	    done
 ! 	    sed='/^ *'$mod' *:[^#:>]*$/{
                        s/.*://
                        p
                    }'
 ! 	    deps=`$CFSED "$sed" $XMODCF`
   	    for dep in $deps; do
   		case $binmods in
   		    *" $dep "*)
 --- 21,39 ----
       case $binmods in
   	*" $mod "*) ;;
   	*)  echo "/* non-linked-in known module \`$mod' */"
 ! 	    sed='/^ *'$mod' *>[^:>]*$/{
                       s/.*>//
                       p
                    }'
 ! 	    bins=`sed -n $CFSED -e "$sed" $XMODCF`
   	    for bin in $bins; do
   		echo "    add_autobin(\"$bin\", \"$mod\");"
   	    done
 ! 	    sed='/^ *'$mod' *:[^:>]*$/{
                        s/.*://
                        p
                    }'
 ! 	    deps=`sed -n $CFSED -e "$sed" $XMODCF`
   	    for dep in $deps; do
   		case $binmods in
   		    *" $dep "*)
 ***************
 *** 47,57 ****
   donemods=" "
   for mod in $binmods; do
       echo "/* linked-in module \`$mod' */"
 !     sed='/^ *'$mod' *:[^#:>]*$/{
                s/.*://
                p
            }'
 !     deps=`$CFSED "$sed" $XMODCF`
       for dep in $deps; do
   	case $donemods in
   	    *" $dep "*)
 --- 47,57 ----
   donemods=" "
   for mod in $binmods; do
       echo "/* linked-in module \`$mod' */"
 !     sed='/^ *'$mod' *:[^:>]*$/{
                s/.*://
                p
            }'
 !     deps=`sed -n $CFSED -e "$sed" $XMODCF`
       for dep in $deps; do
   	case $donemods in
   	    *" $dep "*)
 *** Src/mkstamp.sh	Thu Jan  2 13:51:13 1997
 --- Src/mkstamp.sh	Thu Jan  2 14:30:07 1997
 ***************
 *** 4,28 ****
   #
   # Written by Andrew Main
   #
 ! srcdir=`echo $0|sed 's%/[^/][^/]*$%%'`
 ! test "x$srcdir" = "x$0" && srcdir=.
 ! CFSED=${CFSED-"sed -n -f $srcdir/conf.sed -e"}
   MODBINS=${MODBINS-modules-bltin}
   MODCF=${MODCF-$srcdir/mods.conf}
 ! MODULE_DIRS=${MODULE_DIRS-'Modules Zle'}
   MAKE=${MAKE-make}
   STMP=$1
   
 ! dn=true
 ! test -f $STMP || dn=false
   trap "rm -f $STMP.tmp; exit 1" 1 2 15
   echo > $STMP.tmp
   for mod in `cat $MODBINS`; do
 !     sed='/^ *'$mod' *:[^#:>]*$/{
                s/.*://
                p
            }'
 !     objs=`$CFSED "$sed" $MODCF`
       if test -z "$objs"; then
   	for dir in $MODULE_DIRS; do
   	    if test -f $srcdir/$dir/$mod.c; then
 --- 4,27 ----
   #
   # Written by Andrew Main
   #
 ! srcdir=${srcdir:-`echo $0|sed 's%/[^/][^/]*$%%'`}
 ! srcdir=${srcdir:-.}
 ! CFSED=${CFSED-"-f $srcdir/conf.sed"}
   MODBINS=${MODBINS-modules-bltin}
   MODCF=${MODCF-$srcdir/mods.conf}
 ! MODULE_DIRS=${MODULE_DIRS-Modules Zle}
   MAKE=${MAKE-make}
   STMP=$1
   
 ! act="rm -f `pwd`/$STMP"
   trap "rm -f $STMP.tmp; exit 1" 1 2 15
   echo > $STMP.tmp
   for mod in `cat $MODBINS`; do
 !     sed='/^ *'$mod' *:[^:>]*$/{
                s/.*://
                p
            }'
 !     objs=`sed -n $CFSED -e "$sed" $MODCF`
       if test -z "$objs"; then
   	for dir in $MODULE_DIRS; do
   	    if test -f $srcdir/$dir/$mod.c; then
 ***************
 *** 37,54 ****
   	    exit 1
   	fi
       fi
 !     eval "$MAKE $MAKEDEFS $objs" || { rm -f $STMP.tmp; exit 1; }
 !     if test $dn = true; then
 ! 	nobjs=`find . -name '*.o' -newer $STMP -print`
 ! 	for obj in $objs; do
 ! 	    case $nobjs in
 ! 		*./$obj*) dn=false ;;
 ! 	    esac
 ! 	done
 !     fi
       echo $objs >> $STMP.tmp
   done
 ! if $dn && cmp -s $STMP.tmp $STMP; then
       rm -f $STMP.tmp
       echo "\`$STMP' is up to date."
   else
 --- 36,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
       echo "\`$STMP' is up to date."
   else
 *** Src/mods.conf	Thu Jan  2 13:50:29 1997
 --- Src/mods.conf	Thu Jan  2 13:58:37 1997
 ***************
 *** 13,20 ****
   # Each entry has the form:
   #     module_name : Dir/object.o ...
   #
 ! # Lines containing `#' *anywhere* are ignored, as are blank lines.  Lines may
 ! # be continued using the usual backslash/newline syntax.
   #
   # (This would be rather neater if we could rely on shell functions in sh.)
   #
 --- 13,20 ----
   # Each entry has the form:
   #     module_name : Dir/object.o ...
   #
 ! # `#' starts a comment, and blank lines are ignored.  Lines may be continued
 ! # using the usual backslash/newline syntax.
   #
   # (This would be rather neater if we could rely on shell functions in sh.)
   #
 *** Src/xmods.conf	Thu Jan  2 13:50:29 1997
 --- Src/xmods.conf	Thu Jan  2 13:58:46 1997
 ***************
 *** 18,25 ****
   # is linked in, the other modules must also be, and must be listed earlier in
   # modules-bltin (and, consequently, here).
   #
 ! # Lines containing `#' *anywhere* are ignored, as are blank lines.  Lines may
 ! # be continued using the usual backslash/newline syntax.
   #
   # (This would be rather neater if we could rely on shell functions in sh.)
   #
 --- 18,25 ----
   # is linked in, the other modules must also be, and must be listed earlier in
   # modules-bltin (and, consequently, here).
   #
 ! # `#' starts a comment, and blank lines are ignored.  Lines may be continued
 ! # using the usual backslash/newline syntax.
   #
   # (This would be rather neater if we could rely on shell functions in sh.)
   #
 *** Src/Modules/Makefile.in	Thu Jan  2 13:50:27 1997
 --- Src/Modules/Makefile.in	Thu Jan  2 13:59:34 1997
 ***************
 *** 64,69 ****
 --- 64,71 ----
   
   SED = sed
   
 + EXTRA_BUILDACT = :
 + 
   KNR_OBJ=.o
   KNROBJ=._foo_
   
 ***************
 *** 75,85 ****
 --- 77,89 ----
   
   .c$(ANSI@U@OBJ):
   	$(COMPILE) -o $@ $<
 + 	@$(EXTRA_BUILDACT)
   
   .c$(KNR@U@OBJ):
   	../ansi2knr $< > $@.c
   	$(COMPILE) -o $@ $@.c
   	rm -f $@.c
 + 	@$(EXTRA_BUILDACT)
   
   .c.$(ANSI@U@OBJ):
   	$(DLCOMPILE) -o $@ $<
 *** Src/Zle/Makefile.in	Thu Jan  2 13:50:27 1997
 --- Src/Zle/Makefile.in	Thu Jan  2 13:59:54 1997
 ***************
 *** 63,68 ****
 --- 63,70 ----
   
   SED = sed
   
 + EXTRA_BUILDACT = :
 + 
   KNR_OBJ=.o
   KNROBJ=._foo_
   
 ***************
 *** 74,84 ****
 --- 76,88 ----
   
   .c$(ANSI@U@OBJ):
   	$(COMPILE) -o $@ $<
 + 	@$(EXTRA_BUILDACT)
   
   .c$(KNR@U@OBJ):
   	../ansi2knr $< > $@.c
   	$(COMPILE) -o $@ $@.c
   	rm -f $@.c
 + 	@$(EXTRA_BUILDACT)
   
   .c.$(ANSI@U@OBJ):
   	$(DLCOMPILE) -o $@ $<

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: ascii

iQCVAwUBMsvG9nD/+HJTpU/hAQFbswQAjioU5WKQvrvNvlJwbBJ2ftb8KC37q7K0
+isycO4BZ9lNYEBKBjAsRo2Wrw3DzzRI7pMaFAMcMusso354OSuAGX8V6I4fzrEH
M8fdjD2kyoB59OwHiHoPFz4JWluPlbct1m0Lw04Ere9/1Y41YElwYNvlLeQ6eccU
xaYlWfZZ0Sw=
=PqLS
-----END PGP SIGNATURE-----



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