[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Selecting between directories?
From: |
Alexandre Duret-Lutz |
Subject: |
Re: Selecting between directories? |
Date: |
Sat, 19 Oct 2002 15:03:32 +0200 |
User-agent: |
Gnus/5.090008 (Oort Gnus v0.08) Emacs/20.7 (i386-debian-linux-gnu) |
>>> "Cedric" == Cedric Vandenbergh <address@hidden> writes:
Cedric> Hi all,
Cedric> I've looked through the documentation but can't work this out.
Which Automake version?
The 1.7+ manual has a more detailed section about conditional
subdirectories.
http://sources.redhat.com/automake/automake.html#Top%20level
I'm not sure that applies in your case, though.
[...]
Cedric> Subdir3 & subdir4 are ALWAYS present, while EITHER
Cedric> subdir1 OR subdir2 is present [depending on release].
Could you explain what `depending on release' means?
In particular, how do you choose MY_PROJECT_DIR?
If MY_PROJECT_DIR is not know statically (i.e., when Autoconf is
run), I don't know what you can do.
[...]
Cedric> MY_PROJECT_DIR=sub1
Cedric> AC_SUBST(MY_PROJECT_DIR)
Cedric> AC_OUTPUT(
Cedric> Makefile
Cedric> specific/Makefile
Cedric> specific/${MY_PROJECT_DIR}/Makefile
Cedric> common/Makefile
Cedric> common/Makefile/subdir3
Cedric> common/Makefile/subdir4
Cedric> )
Cedric> in top/configure.in
Cedric> Automake completes, but doesn't generate
Cedric> "specific/sub1/Makefile.in" which eventually causes
Cedric> "./configure" to fail.
Automake tries process the files listed in AC_OUTPUT, but it
knows nothing about the value of the shell variable
$MY_PROJECT_DIR.
Starting with Automake 1.7, I think it will work if you use an
m4 macro for this. Something along the lines of
m4_define([MY_PROJECT_DIR_VALUE], [sub1])
AC_SUBST([MY_PROJECT_DIR], [MY_PROJECT_DIR_VALUE])
AC_OUTPUT([Makefile
specific/Makefile
specific/MY_PROJECT_DIR_VALUE/Makefile
common/Makefile
common/Makefile/subdir3
common/Makefile/subdir4
])
--
Alexandre Duret-Lutz