[Scons-users] General Makefile builder

Jason Kenny dragon512 at live.com
Wed Feb 21 16:28:57 EST 2018


Hi guys

I am trying to make a general makefile/automake builder for Parts. The problem I am having at the moment is mapping a directory output that the makefile will generate to an Install() call. as a prototype, I have something like:

files=Pattern(src_dir="${VCS_DIR}")
copyed = env.CCopy(
    source=files,
    target="$BUILD_DIR"
    )
env.Command(
    ["Makefile", "configdata.pm"],
    ['Configure']+copyed,
    "cd ${SOURCE.dir} ; ./Configure -DSSL_ALLOW_ADH enable-ec_nistp_64_gcc_128\
     --prefix=${ABSPATH('#_makeinstall')}/${PART_NAME}\
     --openssldir=${ABSPATH('#_makeinstall')}/${PART_NAME} linux-x86_64 shared"
    )
env.Command(
    ["openssl.pc",'libcrypto.pc','libcrypto.so.1.1','libssl.so.1.1'],
    ["Makefile"],
    "cd ${SOURCE.dir} ; make install"
    )

env.InstallTopLevel(env.Glob("${BUILD_DIR)/*"))


There are some Parts items here.. but they should not have any effect on this. Pattern() is just a fancy Glob() that keeps tree structure.

The problem is that I want to copy the output to the install sanbox via the Install call ( InstallTopLevel is just a wrapper to Install with a target directory) The issue here is that output of the makefile does not exist yet. As just the Glob call fails as it does not find anything to copy. Do we have something in SCons that will allow me to say copy these files you will not know about until build time? I can only think I have to make a new builder function with a target scanner or something to get the output files. or I have to do a build and place the output in the file by hand to allow SCons to know what it will copy. The latter item I know will work but does not scale as every build has to provide what should be made. This does react will when the makefile changes. The end goal is that I should be able to make a builder to call some other build system and get the output to the Install locations. Being able to do this means we can then apply the package generator to make RPM, etc in the build. I would like to avoid having to do a raw build and make a manual file listing of everything for the command builders.

Any thoughts on this?

Jason



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://pairlist4.pair.net/pipermail/scons-users/attachments/20180221/310ec985/attachment.html>


More information about the Scons-users mailing list