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: K&R compilation
Date: Fri, 15 Nov 1996 21:37:11 +0100 (MET)	[thread overview]
Message-ID: <199611152037.VAA04793@bolyai.cs.elte.hu> (raw)
In-Reply-To: <6519.199611151336@stone.dcs.warwick.ac.uk> from Zefram at "Nov 15, 96 01:36:43 pm"

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


      reply	other threads:[~1996-11-15 20:38 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-11-15 13:36 Zefram
1996-11-15 20:37 ` Zoltan Hidvegi [this message]

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=199611152037.VAA04793@bolyai.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).