[openbeos-build-team] Re: Jam 2.4 hack

  • From: "Ingo Weinhold" <bonefish@xxxxxxxxxxxxxxx>
  • To: openbeos-build-team@xxxxxxxxxxxxx
  • Date: Tue, 02 Jul 2002 17:38:06 CEST (+0200)

> Guess we could have the rule to generate the BuildConfig file somehow 
> as
> well by making it a dependancy (somehow??).

Mmh, at least I wouldn't know how to do it. Unlike make Jam doesn't 
feature rebuilding of Makefiles. The execution order of the passes is 
strictly linear, and since a file to be included would be needed in the 
parsing pass, but can't be built before the updating pass, I don't have 
much hope for this idea.

> Well, I'm eagerly awaiting the code guys!

Err, I'm afraid you mean Ryan or me. ;-)

I'm not common to autoconf, which Ryan proposed to use. So please 
forgive my naive ignorance, as I would currently doing something simple 
like:

in Jamrules (at the very beginning):

include BuildConfig ;

8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8<

configure:

#!/bin/sh
#
# configure
#
# No parameters for now.

platform=`uname`

# BeOS
if [ "${platform}" == "BeOS" ] ; then
        # GGC_PATH
        if [ "x${GCC_PATH}" == "x" ] ; then
                gcclib=`gcc -print-libgcc-file-name`
                GCC_PATH=`dirname ${gcclib}`
        fi

# Linux
else if [ "${platform}" == "Linux" ] ; then
        # GGC_PATH
        if [ "x${GCC_PATH}" == "x" ] ; then
                gcclib=`gcc -print-libgcc-file-name`
                GCC_PATH=`dirname ${gcclib}`
        fi

# Unknown platform
else
        echo Unsupported platform: ${platform}
        exit 1
fi; fi

# Generate BuildConfig
cat << EOF > BuildConfig
# BuildConfig
# Note: This file has been automatically generated by configure.

GCC_PATH = ${GCC_PATH}
EOF

8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8< 8<

With Jam 2.4 we can use the GLOB rule to determine whether a 
BuildConfig file does exist.

CU, Ingo



Other related posts: