# HG changeset patch # User thomask # Date 1099700973 0 # Node ID aa64787482451089e68a07fd57d23c7414e69369 # Parent 23f362b08087cc210fa584abb2a30569541eccb9 added makefile diagnostics diff -r 23f362b08087 -r aa6478748245 Makefile --- a/Makefile Thu Nov 04 13:49:58 2004 +0000 +++ b/Makefile Sat Nov 06 00:29:33 2004 +0000 @@ -215,6 +215,34 @@ $(analyse_run) # +# target should compile, link and run +# (used for Makefile diagnosis) +# +%.diagnose.$(ext_run) : %.$(ext_source) basic_tools + # destination: $@ + # source: $< + $(eval z_name = $(subst .diagnose.$(ext_run),,$@)) + # name: $(z_name) + # extract__: $(extract__) + # extract__.cmd: $(extract__) $(flag_pattern) < $< + $(extract_z_flags) + # extract__.result: $(z_flags) + # ifeq__: $(ifeq__) + # continue if ifeq__ works + $(ifeq__) someString someString + # return__: $(return__) + # dmd: $(DMD) + $(eval y_tmp = $(shell $(return__) "$(ifeq__) 1 1")) + # return__.return_code_0: $(y_tmp) (expect=0) + $(eval y_tmp = $(shell $(return__) "$(DMD) > /dev/null")) + # return__.return_code_1: $(y_tmp) (expect=256) + # dmd.cmd: $(DMD) $(DFLAGS) $(z_flags) -od$(OBJ_DIR) -of$@ $< $(to_log) + $(eval z_return = $(shell $(return__) "$(DMD) $(DFLAGS) $(z_flags) -od$(OBJ_DIR) -of$@ $< $(to_log)")) + # dmd.return: $(z_return) + # for analyse_run diagnosis: '@if' -> 'if' in 'define analyse_run' (line 185) + $(analyse_run) + +# # target should compile and link but fail to run # norun : Makefile $(sort $(subst .$(ext_source),.$(ext_norun),$(shell $(FIND) norun -regex ".*\\.$(ext_source)" ) ) $(subst .$(ext_source_html),.$(ext_norun),$(shell $(FIND) norun -regex ".*\\.$(ext_source_html)" ) ) ) diff -r 23f362b08087 -r aa6478748245 makefile_porting.txt --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/makefile_porting.txt Sat Nov 06 00:29:33 2004 +0000 @@ -0,0 +1,23 @@ +make run/command_line_debug_01.diagnose.exe + += = = = = stdout = = = = = +# destination: run/command_line_debug_01.diagnose.exe +# source: run/command_line_debug_01.d +# name: run/command_line_debug_01 +# extract__: ./extract__ +# extract__.cmd: ./extract__ __DSTRESS_DFLAGS__ < run/command_line_debug_01.d +# extract__.result: -debug +# ifeq__: ./ifeq__ +# continue if ifeq__ works +./ifeq__ someString someString +# return__: ./return__ +# dmd: dmd +# return__.return_code_0: 0 (expect=0) +# return__.return_code_1: 256 (expect=256) +# dmd.cmd: dmd -debug -odobj -ofrun/command_line_debug_01.diagnose.exe run/command_line_debug_01.d >> /tmp/dstress/log.txt 2>&1 +# dmd.return: 0 +# for analyse_run diagnosis: '@if' -> 'if' in 'define analyse_run' (line 185) +PASS: run/command_line_debug_01 + += = = = = log.txt = = = = = +gcc obj/command_line_debug_01.o -o run/command_line_debug_01.diagnose.exe -lphobos -lpthread -lm