automake
[Top][All Lists]
Advanced

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

AM_CONDITIONAL


From: Jens Krüger
Subject: AM_CONDITIONAL
Date: Fri, 21 Sep 2001 10:37:59 +0200

Hi,
in one of our projects I want to use the AM_CONDITIONAL macro to configure
the software package.

Here is the code fragment form the configure.in:

my_add_modules=
AC_MSG_CHECKING([for generating LakeShore Source Module])
my_build_lakeshore=no
AC_ARG_WITH(lakeshore,
    AC_HELP_STRING([--with-lakeshore], [create LakeShore module,
 please read src/Modules/SoNXLakeShore/README]),
    [
        if test "$withval" = yes; then
            my_build_lakeshore=yes
            AC_MSG_RESULT(yes)
            my_add_modules="$my_add_modules src/Modules/SoNXLakeShore"
        else
            AC_MSG_RESULT(no)
        fi
    ],
    [AC_MSG_RESULT(no)]
)
 
AM_CONDITIONAL(BUILD_LAKESHORE_MODULE, test $my_build_lakeshore = yes)

the contents of the corresponding  Makefile looks like:

if BUILD_LAKESHORE_MODULE
SUBDIRS= . MySource MySink MyFilter SoNXFileReader SoNXLakeShore 
SoNXDataGenerator \
         FiNXDataSelector FiNXDimensionCutter \
         SiNXTableBrowser SiNXFileWriter GL3DPlot SiNX2DPlot
else
SUBDIRS= . MySource MySink MyFilter SoNXFileReader SoNXDataGenerator \
         FiNXDataSelector FiNXDimensionCutter \
         SiNXTableBrowser SiNXFileWriter GL3DPlot SiNX2DPlot
endif 

This code works fine if I make a normal build. Also the 'make dist' works, but
the 'make distcheck' doesn't work. It breaks with these messages:

/bin/sh: cd: SoNXLakeShore: Datei oder Verzeichnis nicht gefunden
make[3]: *** [distdir] Error 1
make[3]: Leaving directory 
`/home/jkrueger/tmp/taco/frmII/nexus/openDaVE-0.1.4/=build/src/Modules'
make[2]: *** [distdir] Error 1
make[2]: Leaving directory 
`/home/jkrueger/tmp/taco/frmII/nexus/openDaVE-0.1.4/=build/src'
make[1]: *** [distdir] Error 1
make[1]: Leaving directory 
`/home/jkrueger/tmp/taco/frmII/nexus/openDaVE-0.1.4/=build'
make: *** [distcheck] Error 2

I had a look at the Makefile and I found the following pieces of code   
..
.. 
SUBDIRS = . MySource MySink MyFilter SoNXFileReader SoNXLakeShore 
SoNXDataGenerator \
         FiNXDataSelector FiNXDimensionCutter \
         SiNXTableBrowser SiNXFileWriter GL3DPlot SiNX2DPlot
 
#SUBDIRS = . MySource MySink MyFilter SoNXFileReader SoNXDataGenerator \
#        FiNXDataSelector FiNXDimensionCutter \
#        SiNXTableBrowser SiNXFileWriter GL3DPlot SiNX2DPlot
..
..
DIST_SUBDIRS = . MySource MySink MyFilter SoNXFileReader SoNXLakeShore \
        SoNXDataGenerator FiNXDataSelector FiNXDimensionCutter \
        SiNXTableBrowser SiNXFileWriter GL3DPlot SiNX2DPlot

The next step I've done was to call make manually in the =build dir and it
works.  I think the reason for the break of distcheck is based on the
DIST_SUBDIRS macro. 

My question is: Is this behaviour a bug or a feature.
The next question, is there a workaround to solve my problem?

Thanks

Jens

-- 
Jens Krüger

Technische Universität München
ZBE FRM-II
Lichtenberg-Str. 1
D-85747 Garching

Tel: + 49 89 289 14 716
Fax: + 49 89 289 14 666
mailto:address@hidden
http://www.frm2.tu-muenchen.de



reply via email to

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