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 HAA04962 for ; Sat, 16 Nov 1996 07:38:27 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id PAA28246; Fri, 15 Nov 1996 15:36:41 -0500 (EST) Resent-Date: Fri, 15 Nov 1996 15:36:41 -0500 (EST) From: Zoltan Hidvegi Message-Id: <199611152037.VAA04793@bolyai.cs.elte.hu> Subject: Re: K&R compilation In-Reply-To: <6519.199611151336@stone.dcs.warwick.ac.uk> from Zefram at "Nov 15, 96 01:36:43 pm" To: zefram@dcs.warwick.ac.uk (Zefram) Date: Fri, 15 Nov 1996 21:37:11 +0100 (MET) Cc: zsh-workers@math.gatech.edu Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368 X-Mailer: ELM [version 2.4ME+ PL27 (25)] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-ID: <"OSb9f2.0.Gv6.OHDZo"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/2419 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Zefram wrote: > I worked out this new way to do ANSI -> K&R conversions, that doesn't > need individual rules for each source file. This should make maintenance > easier. I also managed to extend it to cover module compilation; before > this patch modules could not be compiled with a non-ANSI compiler. I also made some hack on it inspired by your previous makefile hacks. It is simpler than your suggestion. I'm surprised that you didn't chose that solution. Here is a piece which will be in the next test release (which will be hopefully out sometime this weekend): ANSIOBJ=.o ANSI_OBJ=._foo_ .c$(ANSI@U@OBJ): $(COMPILE) $< .c$(KNR@U@OBJ): ansi2knr ./ansi2knr $< > $@.c $(COMPILE) -o $@ $@.c rm -f $@.c Modules are handled by similar rules. I put modules in Src/Modules as these are source files and quite closely related to those in Src. Most important, they need zsh.h from Src. I did not put any Makefile and Src/Makefile handles the modules instead. That is because modules include zsh.h which include the prototypes generated from the Src files and it would be a bit tricky to create the right dependencies. Unfortunately the present dependencies in zsh make parallel make a bit less usable since the object files depend on .pro files. Theoretically each object file depends on each .pro file which means each object file depends on each source file which would mean recompiling everything after each single change in any source file. To avoid this in the present makefile nothing depends on the .pro files but the zsh target includes these prototypes before the object files. Zoltan