[Top][All Lists]

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

Re: Generating's for specific target platforms (os, cpu)

From: Simon Richter
Subject: Re: Generating's for specific target platforms (os, cpu)
Date: Mon, 19 Dec 2005 19:43:55 +0100
User-agent: Debian Thunderbird 1.0.7 (X11/20051019)


BRM wrote:

AC_CONFIG_FILES([Makefile os/Makefile
os/${target_os}/Makefile arch/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/


OS_SUBDIRS = linux

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).


Attachment: signature.asc
Description: OpenPGP digital signature

reply via email to

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