Ludovic (and others?) suggested a different approach for easier file
name handling in nonrecursive makefile setups: provide GNU make-like
substitution functions, such as addprefix.  They could be expanded at
automake run time to still produce portable makefiles.

I'm torn between this and my earlier attempts at something like
%AM_PREFIX% which would expand to the relative path of the included
fragment; both have advantages and disadvantages:
- the former is probably nicer to read in a fragment,
- the latter is conceptually nicer in that it doesn't need changing
  the fragment if you move it to another place in the tree, or include
  it from multiple locations.

Hmm, or do both:
  foo_SOURCES += %ADDPREFIX%(%AM_PREFIX%,
                             file1.c file2.c ...)

in sub/fragment.am, and with
  include $(srcdir)/sub/fragment.am

would expand (at automake run time) to
  foo_SOURCES += sub/file1.c sub/file2.c

Cheers,
Ralf

Reply via email to