On Mon, 5 Jun 2000, H. Nanosecond wrote:

> Hello,
> 
> conditionals in Automake work differently than in Make and are weird.
> I suggest that you not use conditionals in that way, try this:
> 
> Makefile.am: ================================================
> 
> AUTOMAKE_OPTIONS = foreign
> 
> lib_LTLIBRARIES = libtkgs.la
> 
> #libtkgs_la_SOURCES = \
> #lib.c 
> #This causes an error for some reason
> 
> libtkgs_la_SOURCES = lib.c
> 
> noinst_HEADERS = lib.h
> 
> libtkgs_la_SOURCES += @EXTRASRC@


I tried that.

libtkgs_la_SOURCES = \
tkgs.c \
tkgs.h \
tkgsColor.c \
tkgsColor.h \
tkgsDrawable.c \
tkgsDrawable.h \
tkgsDriver.h \
tkgsFont.c \
tkgsFont.h \
tkgsInit.c \
tkgsInt.h \
tkgsObj.c \
tkgsObj.h

libtkgs_la_SOURCES += @SYSINIT@

When I run automake, it prints out the following.


src/Makefile.am:7: libtkgs_la_SOURCES includes configure substitution 
`@SYSINIT@'


Same thing if I do it like so:

libtkgs_la_SOURCES = \
tkgs.c \
tkgs.h \
tkgsColor.c \
tkgsColor.h \
tkgsDrawable.c \
tkgsDrawable.h \
tkgsDriver.h \
tkgsFont.c \
tkgsFont.h \
tkgsInit.c \
tkgsInt.h \
tkgsObj.c \
tkgsObj.h \
@SYSINIT@


Whats the deal? How the heck do I compile
something conditionally?

Mo DeJong
Red Hat Inc

Reply via email to