[Top][All Lists]

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

Re: OS independent build results

From: Ralf Wildenhues
Subject: Re: OS independent build results
Date: Sun, 1 Nov 2009 10:21:21 +0100
User-agent: Mutt/1.5.20 (2009-08-09)

Hello Andreas,

* Andreas Otto wrote on Sun, Oct 25, 2009 at 07:20:16PM CET:
>   currently I try to improve my build environment. I want to add "OS" 
>   independent build results like
>       java "class" files or mono "clr" libraries/excutable 
>   into the distribution
>   1) the problem is the VPATH build. the files from above are
>       in the "srcdir" and not in the "builddir" (1'st location)

If the tools needing them are from you, you can peek at how automake-
generated rules deal with files that can be in both trees, by trying
first the build dir file and then falling back on prepending $(srcdir)/.

If you need a compiler or other tool to find files, either you may be
able to pass some flags like -I$(srcdir) or so, or you copy (or symlink;
you can use $(LN_S) to have the latter but fall back to the former; see
'info Autoconf --index LN_S' for more info).

Yet another possibility is to just update all files in the source tree:
as long as a shipping tarball won't ever change for a user building from
the tarball, and the generated files are not system-dependent, that
should work.

>   2) if one of the "prerequisite" file are touched
>       (java -> *.java", mono -> *.cs")
>      the "new" class or clr file(s) are in the "builddir" (2'nd location)
>     after the build
>   -> now I have 2 locations from which the "dist" or a other command
>      like the java "jar" can take the files

>   3) only for case 2) the VPATH build have to clean up the files

Recent Automake has an internal variable CONFIG_CLEAN_VPATH_FILES.
Files listed in this variable are removed only if $(srcdir) != ".".
If this would help you, we can try to make a public API for this

>   4) for a very special vase VB.NET CLR files can only be compiled
>     on a special OS (Windows). A non-Windows OS should use
>     the dist files and print a WARNING message if a build have to be 
>     done

You can turn on system-dependent parts of a makefile with conditionals,
see 'info Automake Conditionals'.  You can extend installation with
install-{data,exec}-{local,hook}, see 'info Automake Extending'.

> one solution would be that vor a VPATH build I can specify a set
> of dirs/files (in a variable) to COPIED first from the srcdir
> into the builddir, these copied files have to be removed in a
> "distclean" -> attention the copy have only be done if the
> target of the same name is not available

You can loop over files and use 'test -f' on the target file.

If you have problems with a specific rule, please show the code you

HTH.  Cheers,

reply via email to

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