[LLVMdev] fudging the top-level Makefile

Stuart Hastings
Fri, 09 Oct 2009 15:40:23 -0000

On Oct 8, 2009, at 5:18 PM, Mike Stump wrote:

> On Oct 8, 2009, at 4:52 PM, Stuart Hastings wrote:
>> Currently, to get LLVM to build "Apple-style," it's
necessary to
>> copy two files (utils/buildit/GNUmakefile and utils/buildit/
>> build_llvm) into the top-level directory.
>
> Why not:
>
> $ RC_ARCHS="x86" make
> echo Apple Build.
> Apple Build.
> $ make
> echo Standard Build
> Standard Build
> $ cat Makefile
> ifneq ($(RC_ARCHS),)
> include Makefile.apple
> else
> all:
> 	echo Standard Build
> endif
> mrs $ cat Makefile.apple
> all:
> 	echo Apple Build.
>
> It leaves Makefile mostly alone, all except for three lines at the
> top and one line at the end of it.

Because the existing top-level Makefile includes "Makefile.config".
In a normal build, the configure step creates "Makefile.config".
"Apple-style" builds don't run the configure script (I have filed
a
bug about this :-).

stuart