ifeq ($(top_srcdir),) all $(MAKECMDGOALS): @echo Re-running make from within the build directory mkdir -p builddir $(MAKE) -C builddir -f $(CURDIR)/makefile $(MAKECMDGOALS) top_srcdir=$(CURDIR) else VPATH := $(top_srcdir) include ../../common.mk include ../../common-cmm.mk top_cmm := $(top_srcdir)/../builddir/cmm.gcc-release.$(top_host).exe -detailedparse -newdeclsyntax -autoblocks cmm2 := ./cmm2.$(top_build2).exe cmm2: $(cmm2) clean: top_clean -rm test2.* test: test1 test2 @echo all tests succeeded. test1: f.$(top_build2).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 top_all_cmm := main.cmm parser.cmm lexer.cmm parser-nodemethods.cmm\ exceptionstream.cmm parser2.cmm top_all_cmm := $(top_all_cmm:.cmm=.cmm.-DCMM_MULTIMETHODS.cmm) f: f.$(top_build2).exe $(call top_exe,f,f.cpp) -include $(call top_exe_include,f.cpp) $(call top_cmm_exe1,cmm2,$(top_all_cmm)) $(call top_cmm_exe2,cmm2,$(top_all_cmm)) -include $(call top_cmm_deps,cmm2,$(top_all_cmm)) # cmm2 is an executable that incorporates Cmm's parser compiled as # a Cmm programme. It adds HierProf calls to source code. # Make rules for compiling with CMM_MULTIMETHODS predefined. %.cmm.-DCMM_MULTIMETHODS.cmm: %.cmm echo '#define CMM_MULTIMETHODS' > $@ echo '#include "$<"' >> $@ endif