Page 1 of 1

Build failing due to bad mk file

Posted: Tue Mar 19, 2013 2:29 am
by freeman
Hi,

I have been using codelite for the last few months and it has been awesome. However I have finally run into my first issue and was hoping to get some help. My mk file has a bad setting called Objects1 as seen here:

Code: Select all

##
## User defined environment variables
##
CodeLiteDir:=D:\Apps\CodeLite
Objects0=$(IntermediateDirectory)/src_fps$(ObjectSuffix) $(IntermediateDirectory)/src_game$(ObjectSuffix) $(IntermediateDirectory)/src_main$(ObjectSuffix) $(IntermediateDirectory)/src_entity$(ObjectSuffix) $(IntermediateDirectory)/glew_glew$(ObjectSuffix) $(IntermediateDirectory)/src_gl_utils$(ObjectSuffix) $(IntermediateDirectory)/src_file_utils$(ObjectSuffix) $(IntermediateDirectory)/src_render$(ObjectSuffix) 

Objects1=            #### freeman: THIS IS THE PROBLEM LINE. WHY IS THIS BEING GENERATED?

Objects=$(Objects0) $(Objects1) 

##
## Main Build Targets 
##
.PHONY: all clean PreBuild PrePreBuild PostBuild
all: $(OutputFile)

$(OutputFile): $(IntermediateDirectory)/.d $(Objects) 
	@$(MakeDirCommand) $(@D)
	@echo "" > $(IntermediateDirectory)/.d
	@echo $(Objects0)  > $(ObjectsFileList)
	@echo $(Objects1) >> $(ObjectsFileList)
	$(LinkerName) $(OutputSwitch)$(OutputFile) @$(ObjectsFileList) $(LibPath) $(Libs) $(LinkOptions)
When make attempts to run the @echo command it fails resulting in "ECHO is off" being written into my $project.txt file. This in turn causes the build to fail. Does anyone have any idea what would be causing an empty Objects1 parameter to get created in the .mk file?

Re: Build failing due to bad mk file

Posted: Tue Mar 19, 2013 9:24 am
by eranif
To disable this:

Settings -> Build Settings -> Compilers -> Advanced -> Pass object list to the linker via file

It will avoid passing the $(Objects0) $(Objects1) to the linker
In the meanwhile, I will fix this in git trunk
Eran

Re: Build failing due to bad mk file

Posted: Tue Mar 19, 2013 9:56 am
by eranif
This should be working find in git head now
Thanks for reporting this

Eran

Re: Build failing due to bad mk file

Posted: Tue Mar 19, 2013 12:21 pm
by freeman
Wow that was fast! Thanks for fixing this issue so quickly :)