[LLVMdev] fudging the top-level Makefile

Mike Stump mrs at apple.com
Fri Oct 9 12:34:25 PDT 2009


On Oct 9, 2009, at 8:40 AM, Stuart Hastings wrote:

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

?  Only if you want it:

$ cat Makefile
ifdef FOO
include no_such_file
endif


all:
	echo ok
mrs $ make all
echo ok
ok



More information about the llvm-dev mailing list