bug-automake
[Top][All Lists]
Advanced

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

Bug reports and fixes


From: Dean Povey
Subject: Bug reports and fixes
Date: Mon, 24 Sep 2001 14:17:08 +1000

These two bug reports and fixes went to the automake list, but probably got
lost in the noise.  This is probably a more appropriate place to send them.

--- Begin Message --- Subject: Bug in distdir (Automake 1.5) Date: Tue, 18 Sep 2001 14:07:05 +1000
Hi all,

Ran across the following in Automake 1.5 which I believe is a bug.

If you include a directory in EXTRA_DIST that is in the build dir, it does 
not get included in the distribution.

For example when using the following Makefile.am:

EXTRA_DIST=foo

foo:
        mkdir foo
        touch foo/bar

When using the above and configuring with a different source and build
directory make distdir will fail with a file not found error.

We need to do this in one of our projects to include documentation that is
automatically generated as part of the distribution.

The problem is trivially fixed.  I tracked it down to a test -f being done
on DISTFILES in the distdir rule rather than test -f || test -d.  The 
following patch seems to fix the problem.

Attachment: patch
Description: patch

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 

--- End Message ---
--- Begin Message --- Subject: Bugs/Features in handling of continued Makefile rules Date: Thu, 20 Sep 2001 12:24:17 +1000
This is a multipart MIME message.
If automake doesn't recognise a line in a Makefile.am, it assumes that it 
is the continuation of a Makefile rule.

In having a look at the code, I think there are a few problems with the way
this is handled, particularly with regards to the handling of comments.

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.

3. Because of a stupidity in Tru64 make, automake displays
   an error message if comments are found immediately after the tab (plus
   zero/more whitespace). I think perhaps a nicer approach would be for 
   automake to allow comments in the .am and omit them from the Makefile.in 
   output.

The following suggested patch fixes these things and also fixes a couple of
tests.  IMO it also gives a lot better error messages for Makefile.am's
that are bogus. It is quite possible that I have fundamentally
misunderstood how the old code works, and the patch will cause problems, but
it seems to pass the testsuite at least. I have to confess to not adding a
test to make sure the patch now handles 1 and 2 correctly though.

Comments anyone?

Attachment: patch
Description: patch

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 



--- End Message ---

reply via email to

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