top_build := gcc-debug all: test include ../../common.mk top_hierprof_dir := ../.. -include ../hierprof.mk top_cmm := ../cmm.gcc$(top_gcc_version)-release.$(top_host).exe -detailedparse -newdeclsyntax cmm2 := ./cmm2.$(top_build2).exe cmm2: $(cmm2) clean: top_clean -rm test2.* test: test1 test2 @echo all tests succeeded. test1: top_always @echo calling make $(MAKE) top_build=gcc-release-hierprof f @echo called make ll ./f.gcc$(top_gcc_version)-release-hierprof.$(top_host).exe test2: cmm2.$(top_build2).exe echo >$@.cpp echo "const char* ExceptionStream::what() const" >> $@.cpp echo "{" >> $@.cpp echo "# ifdef WIN32" >> $@.cpp echo " return this->m_stringstream->str().c_str();" >> $@.cpp echo "# else" >> $@.cpp echo " return this->m_stringstream.str().c_str();" >> $@.cpp echo "# endif" >> $@.cpp echo "}" >> $@.cpp ./$< -hierprof $@.cpp $@.cpp.hp test3: cmm2.$(top_build2).exe echo > $@.c echo "sheet = NULL;" >>$@.c echo "style_cleanup:">>$@.c echo "if (tagsdict)" >>$@.c echo "Ustrdict_destroy(tagsdict);" >> $@.c ./$< -hierprof $@.c /dev/null test4: f.cpp.hierprof0.cpp.$(top_build2).ii.cpp cmm2.$(top_build2).exe ./cmm2.$(top_build2).exe -hierprof $< f.cpp.hp.cpp ls -l f.cpp.hp.cpp g++ -o f.exe f.cpp.hp.cpp $(top_gcc_hierprof_library) ./f.exe test5: $(MAKE) -f $(top_srcdir)/makefile build=gcc-release-hierprof-ii f ./f.gcc-release-hierprof-ii.$(top_host).exe test6: $(cmm2) echo "c = (0xFFFDU) ;" > $@.c $(cmm2) -hierprof $@.c $@.c2 test7: $(cmm2) $(cmm2) -immediate -hierprof f.cpp f.cpp.hp.cpp -diff f.cpp f.cpp.hp.cpp test8: f.$(top_build2).exe # Make rules for compiling with CMM_MULTIMETHODS predefined. %.cpp.-DCMM_MULTIMETHODS.cmm: %.cpp @echo 'Creating $@' echo '#define CMM_MULTIMETHODS' > $@ echo '#include "$<"' >> $@ %.cmm.-DCMM_MULTIMETHODS.cmm: %.cmm @echo 'Creating $@' echo '#define CMM_MULTIMETHODS' > $@ echo '#include "$<"' >> $@ .PRECIOUS: %.cmm.-DCMM_MULTIMETHODS.cmm .PRECIOUS: %.cpp.-DCMM_MULTIMETHODS.cmm %.cpp.hierprof.cpp: %.cpp add-hierprof.$(top_build2).exe ./add-hierprof.$(top_build2).exe\ -pre "#define HierProf_PROFILE"\ -pre '#include "$(top_hierprof_dir)/hierprof/hierprof.h"'\ -hierprof $< $@ .PRECIOUS: %.cpp.hierprof.cpp f-src:=f.cpp $(call top_exe,f,$(f-src)) -include $(call top_exe_include,$(f-src)) add-hierprof-src:=\ $(addsuffix .-DCMM_MULTIMETHODS.cmm,\ add-hierprof.cmm\ ../cmm/parser.cpp\ ../cmm/lexer.cpp\ ../cmm/parser-nodemethods.cpp\ ../cmm/parser2.cpp\ ../cmm/lookup.cpp\ ../cmm/dispatch.cpp\ ../utils/exceptionstream.cpp\ )\ ../utils/debug.cpp\ ../utils/regexwrap.cpp\ $(call top_exe,add-hierprof,$(add-hierprof-src)) -include $(call top_exe_include,$(add-hierprof-src)) src :=\ main.cmm\ ../cmm/parser.cpp\ ../cmm/lexer.cpp\ ../cmm/parser-nodemethods.cpp\ ../cmm/parser2.cpp\ ../cmm/lookup.cpp\ ../cmm/dispatch.cpp\ ../utils/debug.cpp\ ../utils/exceptionstream.cpp\ $(call top_exe,cmm2,$(src)) -include $(call top_exe_include,$(src))