automake
[Top][All Lists]
Advanced

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

Re: Long file lists and deep directioriies with Automake


From: PenguinDude24
Subject: Re: Long file lists and deep directioriies with Automake
Date: Tue, 17 Dec 2013 18:43:12 -0500
User-agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.9.1.16) Gecko/20121216 Icedove/3.0.11

On 12/17/2013 04:05 PM, Gavin Smith wrote:
On Mon, Dec 2, 2013 at 8:21 PM, PenguinDude24<address@hidden>  wrote:

Automake generates the Makefile.in files, and configure makes the 'Makefile'
for the directory. But the generated makefiles give errors. GNU Make gives
the ominous 'missing separator error'. That errors can be triggered for a
variety of reasons. Long file list for targets and deep nested dirs are at
least two of the reasons.

Are you sure those are the reasons, and there aren't extra newlines
being inserted in these long lines? Can you post the relevant lines of
the Makefiles?

Yea, I'm sure or by my own analysis. I'm also using GNU Emacs, and Emacs is anal when it is in Automake or Makefile modes. Certain Emacs modes have error checking and it did not warn me -- likely no simple error detected. Emacs has saved my bacon many times by alerting me to simple errors that may have taken up too much time. Many times GNU Emacs told me "suspicious line 44 in file. Want to save anyway?" I look at the line and there is some syntax highlighting to tell me what is up with the file.

I did some internet searches and came across some "programmer sites" (you know all of the popular ones). Some guys were having issues with the 'missing separator' error message.

The software project I was working on required many data files to be installed -- hundreds of them. I mean a few hundred files (most of them only a few bytes, but they had structured file names for clarity). And since Automake does not support wildcards for adding targets or data files to lists (says that in the documentation), you have to specify file names manually, so that Automake can make rules for them accordingly.

By adding the files manually, I found out that files that were down to the third level, i.e "dir-1/dir-2/dir-3/foo-datafile.bin", I got 'missing separator' error.

I used the 'nobase_dist_pkgdata_DATA' directive to schedule Automake to write out the data to Makefiles. When the list to that directive contained too many data files, I also got the 'missing file separator error' from GNU Make.

The Makefile.am looks like this:

# Makefile.am -- Automake file for sub-dir foo/data/normalized

# Over a hundred files added this way. Not hand typed -- just copy and paste from terminal :) nobase_dist_pkgdata_DATA = foo-datfile-0.bin foo-datfile-1.bin foo-datefile-n.bin foo foo-datefile-N.bin

# Of course, blank rule so that generated makefiles will not complain about 'no rule to make foo target'
$(nobase_dist-pkgdata_DATA):
    @echo 'Doing NO-OP for datafile ' $@
Generated Makefile croaked. My solution was to break up the long file lists into smaller ones, and used 'SUBDIR' more often. Meh, dispite the limitation, I still used Autotools.
I'm on Debian by the way.



reply via email to

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