Hi, BRM wrote:
AC_CONFIG_FILES([Makefile os/Makefile
os/${target_os}/Makefile arch/Makefile
arch/${target_cpu}/Makefile])
Indeed, that will not work. These are configure time substitutions, however automake runs way before that, and there is no way it could know all the possible values.
What you really want to do is to generate all the Makefiles, even those for platforms that you currently don't build, and use conditionals to go into these directories only when you are on the correct platform.
AC_CONFIG_FILES([Makefile os/Makefile os/linux/Makefile os/mingw32/Makefile ...])
AM_CONDITIONAL([OS_IS_LINUX], [test ${host_os} = "linux"])
and in os/Makefile.am
SUBDIRS = $(OS_SUBDIRS)
if OS_IS_LINUX
OS_SUBDIRS = linux
endif
automake is able to figure out what possible combinations for SUBDIRS
exist and generates an extra list of subdirectories, containing them
all, to be used when building a distribution (so "make dist" will run
through all subdirs, copying stuff into the distribution dir; as it only
copies but never compiles this will work as long as none of your other
substitutions break the Makefile syntax on other systems).
Simon
signature.asc
Description: OpenPGP digital signature
