[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Conditionals in Makefile.am
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Conditionals in Makefile.am |
Date: |
Thu, 31 Oct 2002 15:27:41 +0100 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-debian-linux-gnu) |
>>> "Pekka" == Pekka Riikonen <address@hidden> writes:
[...]
Pekka> FILES = \
Pekka> somefile.c \
Pekka> if HAVE_SOMETHING
Pekka> someotherfile.c \
Pekka> endif
Pekka> if HAVE_SOMETHING_ELSE
Pekka> somethingelse.c \
Pekka> endif
Pekka> something.c
Pekka> This sort of thing is not possible now and makes it
Pekka> really ugly to use the conditionals in makefiles, imo.
Pekka> Currently only way to do this is to conditionalize the
Pekka> entire FILES variable. Alternatively it could just
Pekka> remove the lines not to be included.
Sorry, I forgot to reply to this. A simpler solution is to use
a sub-variable.
FILES = somefile.c $(FILES_IF_SOMETHING) $(FILES_IF_SOMETHING_ELSE) something.c
if HAVE_SOMETHING
FILES_IF_SOMETHING = someotherfile.c
endif
if HAVE_SOMETHING_ELSE
FILES_IF_SOMETHING_ELSE = somethingelse.c
endif
[...]
--
Alexandre Duret-Lutz