zsh-workers
 help / color / mirror / code / Atom feed
From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: zefram@dcs.warwick.ac.uk (Zefram)
Cc: zsh-workers@math.gatech.edu
Subject: Re: static linking of modules
Date: Mon, 25 Nov 1996 02:16:38 +0100 (MET)	[thread overview]
Message-ID: <199611250116.CAA03529@hzoli.ppp.cs.elte.hu> (raw)
In-Reply-To: <306.199611221741@headwind.dcs.warwick.ac.uk> from Zefram at "Nov 22, 96 05:41:37 pm"

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


  reply	other threads:[~1996-11-25  1:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-22 17:41 Zefram
1996-11-25  1:16 ` Zoltan Hidvegi [this message]
1996-11-25 12:06   ` Zefram

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=199611250116.CAA03529@hzoli.ppp.cs.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=zefram@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).