automake
[Top][All Lists]
Advanced

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

easier nonrecursive makefiles


From: Ralf Wildenhues
Subject: easier nonrecursive makefiles
Date: Sun, 1 Aug 2010 20:20:16 +0200
User-agent: Mutt/1.5.20 (2010-04-22)

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

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