From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: zsh-workers-request@euclid.skiles.gatech.edu Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by coral.primenet.com.au (8.7.6/8.7.3) with ESMTP id MAA27451 for ; Mon, 25 Nov 1996 12:29:35 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id UAA08708; Sun, 24 Nov 1996 20:20:23 -0500 (EST) Resent-Date: Sun, 24 Nov 1996 20:20:23 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199611250116.CAA03529@hzoli.ppp.cs.elte.hu> Subject: Re: static linking of modules To: zefram@dcs.warwick.ac.uk (Zefram) Date: Mon, 25 Nov 1996 02:16:38 +0100 (MET) Cc: zsh-workers@math.gatech.edu In-Reply-To: <306.199611221741@headwind.dcs.warwick.ac.uk> from Zefram at "Nov 22, 96 05:41:37 pm" X-Mailer: ELM [version 2.4ME+ PL17 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"8NA0O3.0.-72.IHFco"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2467 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > to allow multiple modules to be compiled in simultaneously. There is a > complication with this: the easiest way to do it was a messy backquoted > sed in the standard compilation rules. It would be nice to avoid this > overhead for the majority of objects that have nothing to do with modules. The patch below removes this overhead for normal files. It also rewites the bltinmods.list generation rule to use sed. It adds a $(MODBINS) (i.e. modules-bltin) target so that the pre-existence of this is not necessary for compilation. I wander how portable this .force suffix rule. Agre you sure that it will not cause problems? One other not zsh related problem. pgp-2.6.3i strips trailing spaces from clearsig messages. I know that the pgp checksum is made using the stripped version but the output should contain these stripped spaces. I'm just telling you this since it may cause problems for others as well. This problem bit me a few times before and I realized just now what happened. It also seems to me that some earlier pgp version did not have this problem since I first noticed this problem quite recently. The simpthom is that the patch succeeds but blank lines added by the patch are missing. There is a slight possibility that some earlier patches from Zefram got into zsh without such blank lines :-(. Zoltan *** Src/Makefile.in 1996/11/25 00:50:04 3.1.0.8 --- Src/Makefile.in 1996/11/25 00:53:16 *************** *** 90,97 **** ANSIDOBJ=$(@D@LEXT) ANSI_DOBJ=._bar_ - MODNAMEDEFS = `echo $@ | $(SED) 's,.*/,,;s,\([^.]*\)\..*,-Dmod_boot=mod_boot_\1 -Dmod_cleanup=mod_cleanup_\1,'` - .SUFFIXES: .SUFFIXES: .force .SUFFIXES: .c $(ANSI@U@DOBJ) $(KNR@U@DOBJ) $(ANSI@U@OBJ) $(KNR@U@OBJ) .pro --- 90,95 ---- *************** *** 111,121 **** rm -f $@.[oc] .c$(ANSI@U@OBJ): ! $(COMPILE) $(MODNAMEDEFS) -o $@ $< .c$(KNR@U@OBJ): ansi2knr ./ansi2knr $< > $@.c ! $(COMPILE) $(MODNAMEDEFS) -o $@ $@.c rm -f $@.c .c.pro: --- 109,119 ---- rm -f $@.[oc] .c$(ANSI@U@OBJ): ! $(COMPILE) -o $@ $< .c$(KNR@U@OBJ): ansi2knr ./ansi2knr $< > $@.c ! $(COMPILE) -o $@ $@.c rm -f $@.c .c.pro: *************** *** 214,233 **** init.o: bltinmods.list bltinmods.list: $(MODBINS) ! ( for mod in `cat $(MODBINS)`; do \ ! echo "DOMOD(mod_boot_$$mod, mod_cleanup_$$mod)"; \ ! done ) > $@ $(PROTO): makepro.sed ! $(NSTMP).force: dn=true; \ test -f $(NSTMP) || dn=false; \ echo > $(NSTMP).tmp; \ for mod in `cat $(MODBINS)`; do \ obj=$(MODULE_DIR)/$$mod.o; \ echo $${obj}:; \ ! $(MAKE) $(MAKEDEFS) $$obj; \ echo $$obj >> $(NSTMP).tmp; \ test $$obj -nt $(NSTMP) && dn=false; \ done; \ --- 212,232 ---- init.o: bltinmods.list bltinmods.list: $(MODBINS) ! $(SED) -n 's/^\(.*\)$$/DOMOD(mod_boot_\1, mod_cleanup_\1)/p' $(MODBINS) > bltinmods.list ! ! $(MODBINS): ! test -f $(MODBINS) || touch $(MODBINS) $(PROTO): makepro.sed ! $(NSTMP).force: $(MODBINS) dn=true; \ test -f $(NSTMP) || dn=false; \ echo > $(NSTMP).tmp; \ for mod in `cat $(MODBINS)`; do \ obj=$(MODULE_DIR)/$$mod.o; \ echo $${obj}:; \ ! $(MAKE) $(MAKEDEFS) DEFS="$(DEFS) -Dmod_boot=mod_boot_$$mod -Dmod_cleanup=mod_cleanup_$$mod" $$obj; \ echo $$obj >> $(NSTMP).tmp; \ test $$obj -nt $(NSTMP) && dn=false; \ done; \