[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Weird behavior with multiple conditionals in single Makefile.am
From: |
Dalibor Topic |
Subject: |
Weird behavior with multiple conditionals in single Makefile.am |
Date: |
Fri, 23 Jul 2004 21:58:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7b) Gecko/20040421 |
Hi all,
I'm fighting with something rather bizarre in automake 1.8.5 / 1.8d.
In a subdir, my Makefile.am looks like this:
if COND_KAFFE_X_AWT
MAYBE_KAFFE_X_AWT = X
else
MAYBE_KAFFE_X_AWT =
endif
if COND_KAFFE_QT_AWT
MAYBE_KAFFE_QT_AWT = qt
else
MAYBE_KAFFE_QT_AWT =
endif
if COND_CLASSPATH_GTK_AWT
MAYBE_CLASSPATH_GTK_AWT = classpath-gtk
else
MAYBE_CLASSPATH_GTK_AWT =
endif
SUBDIRS = \
$(MAYBE_KAFFE_X_AWT) \
$(MAYBE_KAFFE_QT_AWT) \
$(MAYBE_CLASSPATH_GTK_AWT)
DIST_SUBDIRS = \
X \
qt \
classpath-gtk
EXTRA_DIST = \
win32/btn.cpp \
win32/cbd.cpp \
win32/choice.cpp \
win32/clr.cpp \
win32/cmnwnd.cpp \
win32/cmnwnd.hpp \
win32/edit.cpp \
win32/evt.cpp \
win32/filedlg.cpp \
win32/fnt.cpp \
win32/gra.cpp \
win32/img.cpp \
win32/imggif.cpp \
win32/imgjpeg.cpp \
win32/imgpng.cpp \
win32/lbl.cpp \
win32/lst.cpp \
win32/menu.cpp \
win32/scroll.cpp \
win32/tlk.cpp \
win32/tlkprops.hpp \
win32/toolkit.hpp \
win32/widget.cpp \
win32/wnd.cpp
The generated Makefile.in looks like this
[snip]
with_engine = @with_engine@
@address@hidden =
@address@hidden = qt
SUBDIRS = \
$(MAYBE_KAFFE_X_AWT) \
$(MAYBE_KAFFE_QT_AWT) \
$(MAYBE_CLASSPATH_GTK_AWT)
[snip]
@COND_KAFFE_X_AWT_TRUE@ MAYBE_KAFFE_X_AWT = X
@COND_KAFFE_X_AWT_FALSE@ MAYBE_KAFFE_X_AWT =
@COND_CLASSPATH_GTK_AWT_TRUE@ MAYBE_CLASSPATH_GTK_AWT = classpath-gtk
@COND_CLASSPATH_GTK_AWT_FALSE@ MAYBE_CLASSPATH_GTK_AWT =
# Tell versions [3.59,3.63) of GNU make to not export all variables.
# Otherwise a system limit (for SysV at least) may be exceeded.
.NOEXPORT:
which seems to have the weird effect of make *not* recursing into
MAYBE_X_AWT and MAYBE_CLASSPATH_GTK_AWT even if they are defined. My
only explanations is that MAYBE_KAFFE_QT_AWt being in the front actually
gets evaluated for SUBDIRS, while the other MAYBE_* conditionals are
forgotten.
Any ideas? Do I really have to cut and paste this into one giant,
exponantial if-else conditional?
cheers,
dalibor topic
- Weird behavior with multiple conditionals in single Makefile.am,
Dalibor Topic <=