[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Bugs/Features in handling of continued Makefile rules
From: |
Dean Povey |
Subject: |
Re: Bugs/Features in handling of continued Makefile rules |
Date: |
Mon, 24 Sep 2001 08:01:10 +1000 |
<snip>
>> However, I wouldn't want Automake to move the comments. Automake
>> isn't, and doesn't try to be, a make-rule validator for the
>> user-written rules in Makefile.am. It should not move things around
>> inside the rules nor should it remove or add lines to those rules.
>
>Yes. Equally however, I don't want Automake to _silently_ remove
>comments from within Makefile rules. Thats equally bad :}.
>
It obviously doesn't make sense to move the comments before the rule, as
you most often use comments on individual lines of the rule, e.g.
foo: bar.c
#Do something
burp
#Do something else
blah
doesn't make much sense as:
#Do something
#Do something else
foo: bar.c
burp
blah
As the context is lost. There are only two reasonable courses of action,
silently delete, or generate an error/warning (the current automake
behaviour).
However, this is probably the least important bit of the patch, I think
the other two points are much more salient:
Just repeating...
1. If an umatched line continues a rule, then the line should start
with a leading tab. If it doesn't, it is probably a good idea to flag
this as an error. The only place where I can see that this is an issue
is if you get something like
@SUBST_ME@
which is then substituted with a valid Makefile line which may or may
not continue a rule. I think this should be handled as a special case.
2. The code as it stands seems to allow the following:
target: dependencies
# A comment here and some whitespace following
<tab>echo do something
While this is fine on GNU make, on BSD make you need to delete the
comment and the blank line from the resulting Makefile to get it to
work.
--
Dean Povey, |em: address@hidden| JCSI: Java security toolkit
Senior S/W Developer |ph: +61 7 3864 5120 | uPKI: Embedded/C PKI toolkit
Wedgetail Communciations |fax: +61 7 3864 1282 | uASN.1: ASN.1 Compiler
Brisbane, Australia |www: www.wedgetail.com | XML Security: XML
Signatures