emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Compilation order. Help with makefiles, please!


From: Alan Mackenzie
Subject: Re: Compilation order. Help with makefiles, please!
Date: Sun, 26 Aug 2007 09:38:08 +0000
User-agent: Mutt/1.5.9i

Hi, Richard!

On Sat, Aug 18, 2007 at 08:44:52PM -0400, Richard Stallman wrote:
> Can you do something to make recompilation of the cc files reliable?
> We see problems due to recompilation order over and over.

I didn't realise it was that bad.  But it is a massive pain in the
posterior.  I have been attempting to minimise this problem by giving
specific recipes for order of compilation when, for example, cc-langs.el
is changed.  Clearly more is wanted.

> For instance, if you put the macros etc. into one file whose name
> comes alphabetically before the rest, maybe everything will work
> reliably.

Surely the right tool for this job is the (or a?) makefile?  If we're
going to fix the problem, we might as well fix it properly.

I am attempting to modify ..../lisp/Makefile.  However, I'm still
learning about makefiles, and would welcome tips or general help, or
comments about this approach from people here.  At the moment, this is
what I've added to ..../lisp/Makefile:

#########################################################################
#### NEW STOUGH, 2007-08-25
pr=$(lisp)/progmodes
.PHONY: CC-MODE
CC-MODE: $(pr)/cc-align.elc $(pr)/cc-awk.elc  $(pr)/cc-bytecomp.elc  
$(pr)/cc-cmds.elc  $(pr)/cc-compat.elc  $(pr)/cc-defs.elc \ $(pr)/cc-engine.elc 
 $(pr)/cc-fonts.elc  $(pr)/cc-langs.elc  $(pr)/cc-menus.elc  $(pr)/cc-mode.elc  
$(pr)/cc-styles.elc  $(pr)\/cc-subword.elc  $(pr)/cc-vars.elc

# "Top level" CC Mode files:
$(pr)/cc-align.elc \
$(pr)/cc-awk.elc \
$(pr)/cc-cmds.elc \
$(pr)/cc-compat.elc \
$(pr)/cc-menus.elc \
$(pr)/cc-styles.elc \
$(pr)/cc-subword.elc \
$(pr)/cc-vars.elc: \
        $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc

# CC Mode files which create, initialise, or use the innard of "language
# variables":
$(pr)/cc-mode.elc $(pr)/cc-engine.elc $(pr)/cc-fonts.elc: $(pr)/cc-langs.elc   
# <===========================

# CC Mode file which creates language variables:
$(pr)/cc-langs.elc: \
        $(pr)/cc-defs.elc $(pr)/cc-bytecomp.elc

# CC Mode main macro definition file:
$(pr)/cc-defs.elc: $(pr)/cc-bytecomp.elc

#### END OF NEW STOUGH, 2007-08-25
#########################################################################

If I delete cc-langs.elc, then do:

    % make -nf CC-Makefile.mk progmodes/cc-engine.elc

, make reports:

    make: `progmodes/cc-engine.elc' is up to date.

, though I would expect it first to rebuild cc-langs.elc (due to the line
I've marked with <=====).

Thanks in advance for any help!

-- 
Alan Mackenzie (Ittersbach, Germany).




reply via email to

[Prev in Thread] Current Thread [Next in Thread]