Slow and Steady
Ramblings of an Idiot with a PhD

Thu, 19 Jan 2006 02:22:00 +0000

automake, make dist and long filenames

Harish noticed some strange behaviour with 'make dist'. He later found out that it had to do with a file with an overly long pathname. Automake 1.9 by default forces 'tar' to work in the "most compatible" mode, and that mode supports pathnames only upto 99 characters long.
The solution is to ask automake to request tar to use the POSIX standard 'pax' format. Add a line like the following in the top-level


However, life wouldn't be interesting if it was so simple. This option is not backwards compatible: older versions of automake don't know about it, and they barf on unknown options The tar that comes with SuSE 9.2 (IIRC) doesn't support 'pax', but does support the 'ustar' format, an older POSIX standard. Luckily automake has an option to request 'ustar' format: tar-ustar

That gets us to mono's solution. Here's the tidbit that does the trick:

# Gross hack to enable 'make dist' on automake 1.9+tar 1.14.
# The extra brackets are to foil regex-based scans.

Now, please forget this trick, it's gross. Just use automake 1.9.
PS: There's an even simpler trick: start distributing ZIP files (make dist-zip) instead :-)

Permalink | build system, mono. | Comments