Page 1 of 1

Export Makefiles - Bug or normal?

Posted: Sat Aug 20, 2011 2:23 am
by evstevemd
CodeLite: 3.0.5011
OS: Ubuntu Natty

I have exported makefile and it exported wx-config as WX_TOOL (which I define so as to work with wx29)
I expected makefile to define somewhere what is WX_TOOL. Is this normal behaviour?
Also is there plan to give a dialog to interact with IDE and may be change some values before exporting makefile (like name et al)?
Thanks!

Code: Select all

##
## Auto Generated makefile by CodeLite IDE
## any manual changes will be erased      
##
## Debug
ProjectName            :=MvcApp
ConfigurationName      :=Debug
IntermediateDirectory  :=./Debug
OutDir                 := $(IntermediateDirectory)
WorkspacePath          := "/home/stefano/Documents/developer/projects/LearningMVC"
ProjectPath            := "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC"
CurrentFileName        :=
CurrentFilePath        :=
CurrentFileFullPath    :=
User                   :=Stefano
Date                   :=08/20/2011
CodeLitePath           :="/home/stefano/.codelite"
LinkerName             :=g++
ArchiveTool            :=ar rcus
SharedObjectLinkerName :=g++ -shared -fPIC
ObjectSuffix           :=.o
DependSuffix           :=.o.d
PreprocessSuffix       :=.o.i
DebugSwitch            :=-gstab
IncludeSwitch          :=-I
LibrarySwitch          :=-l
OutputSwitch           :=-o 
LibraryPathSwitch      :=-L
PreprocessorSwitch     :=-D
SourceSwitch           :=-c 
CompilerName           :=g++
C_CompilerName         :=gcc
OutputFile             :=$(IntermediateDirectory)/$(ProjectName)
Preprocessors          :=
ObjectSwitch           :=-o 
ArchiveOutputSwitch    := 
PreprocessOnlySwitch   :=-E 
ObjectsFileList        :="/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/MvcApp.txt"
PCHCompileFlags        :=
MakeDirCommand         :=mkdir -p
CmpOptions             := -g $(shell $(WX_TOOL) --cxxflags --unicode=yes --debug=yes) $(Preprocessors)
C_CmpOptions           := -g $(shell $(WX_TOOL) --cxxflags --unicode=yes --debug=yes) $(Preprocessors)
LinkOptions            :=  -mwindows $(shell $(WX_TOOL) --debug=yes --libs --unicode=yes)
IncludePath            :=  $(IncludeSwitch). $(IncludeSwitch)/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/ 
IncludePCH             := 
RcIncludePath          := 
Libs                   := 
LibPath                := $(LibraryPathSwitch). 


##
## User defined environment variables
##
CodeLiteDir:=/usr/share/codelite
WX_TOOL:=/home/stefano/Documents/developer/svn/wxwidgets/wx-config
Objects=$(IntermediateDirectory)/app$(ObjectSuffix) $(IntermediateDirectory)/callback_handler$(ObjectSuffix) $(IntermediateDirectory)/model_class$(ObjectSuffix) $(IntermediateDirectory)/frame$(ObjectSuffix) 

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

$(OutputFile): $(IntermediateDirectory)/.d $(Objects) 
	@$(MakeDirCommand) $(@D)
	@echo "" > $(IntermediateDirectory)/.d
	@echo $(Objects) > $(ObjectsFileList)
	$(LinkerName) $(OutputSwitch)$(OutputFile) $(Objects) $(LibPath) $(Libs) $(LinkOptions)

$(IntermediateDirectory)/.d:
	@test -d ./Debug || $(MakeDirCommand) ./Debug

PreBuild:


##
## Objects
##
$(IntermediateDirectory)/app$(ObjectSuffix): app.cpp $(IntermediateDirectory)/app$(DependSuffix)
	$(CompilerName) $(IncludePCH) $(SourceSwitch) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/app.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/app$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/app$(DependSuffix): app.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/app$(ObjectSuffix) -MF$(IntermediateDirectory)/app$(DependSuffix) -MM "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/app.cpp"

$(IntermediateDirectory)/app$(PreprocessSuffix): app.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/app$(PreprocessSuffix) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/app.cpp"

$(IntermediateDirectory)/callback_handler$(ObjectSuffix): callback_handler.cpp $(IntermediateDirectory)/callback_handler$(DependSuffix)
	$(CompilerName) $(IncludePCH) $(SourceSwitch) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/callback_handler.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/callback_handler$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/callback_handler$(DependSuffix): callback_handler.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/callback_handler$(ObjectSuffix) -MF$(IntermediateDirectory)/callback_handler$(DependSuffix) -MM "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/callback_handler.cpp"

$(IntermediateDirectory)/callback_handler$(PreprocessSuffix): callback_handler.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/callback_handler$(PreprocessSuffix) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/callback_handler.cpp"

$(IntermediateDirectory)/model_class$(ObjectSuffix): model_class.cpp $(IntermediateDirectory)/model_class$(DependSuffix)
	$(CompilerName) $(IncludePCH) $(SourceSwitch) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/model_class.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/model_class$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/model_class$(DependSuffix): model_class.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/model_class$(ObjectSuffix) -MF$(IntermediateDirectory)/model_class$(DependSuffix) -MM "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/model_class.cpp"

$(IntermediateDirectory)/model_class$(PreprocessSuffix): model_class.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/model_class$(PreprocessSuffix) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/model_class.cpp"

$(IntermediateDirectory)/frame$(ObjectSuffix): frame.cpp $(IntermediateDirectory)/frame$(DependSuffix)
	$(CompilerName) $(IncludePCH) $(SourceSwitch) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/frame.cpp" $(CmpOptions) $(ObjectSwitch)$(IntermediateDirectory)/frame$(ObjectSuffix) $(IncludePath)
$(IntermediateDirectory)/frame$(DependSuffix): frame.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) -MG -MP -MT$(IntermediateDirectory)/frame$(ObjectSuffix) -MF$(IntermediateDirectory)/frame$(DependSuffix) -MM "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/frame.cpp"

$(IntermediateDirectory)/frame$(PreprocessSuffix): frame.cpp
	@$(CompilerName) $(CmpOptions) $(IncludePCH) $(IncludePath) $(PreprocessOnlySwitch) $(OutputSwitch) $(IntermediateDirectory)/frame$(PreprocessSuffix) "/home/stefano/Documents/developer/CodeBase/C++/wxSnippets/SimpleMVC/frame.cpp"


-include $(IntermediateDirectory)/*$(DependSuffix)
##
## Clean
##
clean:
	$(RM) $(IntermediateDirectory)/app$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/app$(DependSuffix)
	$(RM) $(IntermediateDirectory)/app$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/callback_handler$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/callback_handler$(DependSuffix)
	$(RM) $(IntermediateDirectory)/callback_handler$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/model_class$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/model_class$(DependSuffix)
	$(RM) $(IntermediateDirectory)/model_class$(PreprocessSuffix)
	$(RM) $(IntermediateDirectory)/frame$(ObjectSuffix)
	$(RM) $(IntermediateDirectory)/frame$(DependSuffix)
	$(RM) $(IntermediateDirectory)/frame$(PreprocessSuffix)
	$(RM) $(OutputFile)
	$(RM) "/home/stefano/Documents/developer/projects/LearningMVC/.build-debug/MvcApp"


Re: Export Makefiles - Bug or normal?

Posted: Sat Aug 20, 2011 11:05 am
by eranif
evstevemd wrote:I expected makefile to define somewhere what is WX_TOOL
It is exported (look a little further in the makefile)

But the problem remains: in order for wx-config to work properly, you need to set WXWIN / WXCFG
However, Makefile does not support exporting environment variables to the $(shell) processes.

So you will need to create your own file with all the environment variables you want

EDIT:
I added new option to the environment variables dialog which allows to export the current environment variables set to a platform specific file
Eran

Re: Export Makefiles - Bug or normal?

Posted: Sat Aug 20, 2011 6:42 pm
by evstevemd
Thanks a lot.
Let me checkout and compile the latest svn