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 XAA07899 for ; Mon, 25 Nov 1996 23:21:39 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id HAA16889; Mon, 25 Nov 1996 07:08:47 -0500 (EST) Resent-Date: Mon, 25 Nov 1996 07:08:47 -0500 (EST) From: Zefram Message-Id: <1815.199611251206@stone.dcs.warwick.ac.uk> Subject: Re: static linking of modules To: hzoli@cs.elte.hu (Zoltan Hidvegi) Date: Mon, 25 Nov 1996 12:06:27 +0000 (GMT) Cc: zefram@dcs.warwick.ac.uk, zsh-workers@math.gatech.edu In-Reply-To: <199611250116.CAA03529@hzoli.ppp.cs.elte.hu> from "Zoltan Hidvegi" at Nov 25, 96 02:16:38 am X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]8477.52 X-US-Congress: Moronic fuckers Content-Type: text Resent-Message-ID: <"uOr3z.0.m74.EnOco"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2468 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu >I wander how portable this .force suffix rule. Agre you sure that it will >not cause problems? I've never seen it fail on any make. Its semantics are well defined. The only tricky bit is that GNU make has a bug that means the commands in the implicit rule mustn't be empty (hence the "@:"). > bltinmods.list: $(MODBINS) >! $(SED) -n 's/^\(.*\)$$/DOMOD(mod_boot_\1, mod_cleanup_\1)/p' $(MODBINS) > bltinmods.list This requires that the $(MODBINS) file have one module per line, with no extra spaces. This is not an unreasonable requirement, but my method did allow it to be quite free-form. >! $(MODBINS): >! test -f $(MODBINS) || touch $(MODBINS) This means that $(MODBINS) mustn't be in $(srcdir). >! $(MAKE) $(MAKEDEFS) DEFS="$(DEFS) -Dmod_boot=mod_boot_$$mod -Dmod_cleanup=mod_cleanup_$$mod" $$obj; \ An earlier version of my patch used this method. I don't like it, because it makes it impossible to just build the object file for one compiled-in module alone. Still, that's not often required, so it's not really a problem. -zefram