Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: K&R compilation
- X-seq: zsh-workers 2419
- From: Zoltan Hidvegi <hzoli@xxxxxxxxxx>
- To: zefram@xxxxxxxxxxxxxxxxx (Zefram)
- Subject: Re: K&R compilation
- Date: Fri, 15 Nov 1996 21:37:11 +0100 (MET)
- Cc: zsh-workers@xxxxxxxxxxxxxxx
- In-reply-to: <6519.199611151336@xxxxxxxxxxxxxxxxxxxxxxx> from Zefram at "Nov 15, 96 01:36:43 pm"
- Organization: Dept. of Comp. Sci., Eotvos University, Budapest, Hungary
- Phone: (36 1)2669833 ext: 2667, home phone: (36 1) 2752368
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
Messages sorted by:
Reverse Date,
Date,
Thread,
Author