Build failing due to bad mk file

CodeLite installation/troubleshooting forum
freeman
CodeLite Curious
Posts: 2
Joined: Tue Mar 19, 2013 2:23 am
Genuine User: Yes
IDE Question: C++
Contact:

Build failing due to bad mk file

Post 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?
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build failing due to bad mk file

Post 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
Make sure you have read the HOW TO POST thread
User avatar
eranif
CodeLite Plugin
Posts: 6372
Joined: Wed Feb 06, 2008 9:29 pm
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build failing due to bad mk file

Post by eranif »

This should be working find in git head now
Thanks for reporting this

Eran
Make sure you have read the HOW TO POST thread
freeman
CodeLite Curious
Posts: 2
Joined: Tue Mar 19, 2013 2:23 am
Genuine User: Yes
IDE Question: C++
Contact:

Re: Build failing due to bad mk file

Post by freeman »

Wow that was fast! Thanks for fixing this issue so quickly :)
Post Reply