automake: Length Limitations

1 
1 3.4 Staying below the command line length limit
1 ===============================================
1 
1 Traditionally, most unix-like systems have a length limitation for the
1 command line arguments and environment contents when creating new
1 processes (see for example
1 <http://www.in-ulm.de/~mascheck/various/argmax/> for an overview on this
1 issue), which of course also applies to commands spawned by ‘make’.
1 POSIX requires this limit to be at least 4096 bytes, and most modern
1 systems have quite high limits (or are unlimited).
1 
1    In order to create portable Makefiles that do not trip over these
1 limits, it is necessary to keep the length of file lists bounded.
1 Unfortunately, it is not possible to do so fully transparently within
1 Automake, so your help may be needed.  Typically, you can split long
1 file lists manually and use different installation directory names for
1 each list.  For example,
1 
1      data_DATA = file1 ... fileN fileN+1 ... file2N
1 
1 may also be written as
1 
1      data_DATA = file1 ... fileN
1      data2dir = $(datadir)
1      data2_DATA = fileN+1 ... file2N
1 
1 and will cause Automake to treat the two lists separately during ‘make
1 install’.  See ⇒The Two Parts of Install for choosing directory
1 names that will keep the ordering of the two parts of installation Note
1 that ‘make dist’ may still only work on a host with a higher length
1 limit in this example.
1 
1    Automake itself employs a couple of strategies to avoid long command
1 lines.  For example, when ‘${srcdir}/’ is prepended to file names, as
1 can happen with above ‘$(data_DATA)’ lists, it limits the amount of
1 arguments passed to external commands.
1 
1    Unfortunately, some system’s ‘make’ commands may prepend ‘VPATH’
1 prefixes like ‘${srcdir}/’ to file names from the source tree
11 automatically (⇒Automatic Rule Rewriting (autoconf)Automatic Rule
 Rewriting.).  In this case, the user may have to switch to use GNU Make,
1 or refrain from using VPATH builds, in order to stay below the length
1 limit.
1 
1    For libraries and programs built from many sources, convenience
1 archives may be used as intermediates in order to limit the object list
1 length (⇒Libtool Convenience Libraries).
1