annotate Makefile.parallel @ 905:151eb236b6bc

added NO_TORTURE support
author thomask
date Mon, 13 Mar 2006 00:43:12 +0000
parents 613f9c34bb15
children 67f90139e1da
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
1 # $HeadURL$
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
2 # $Date$
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
3 # $Author$
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
4 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
5 # experimental parallel GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
6 # Copyright (C) 2006 Thomas Kuehne
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
7 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
8 # This program is free software; you can redistribute it and/or modify
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
9 # it under the terms of the GNU General Public License as published by
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
10 # the Free Software Foundation; either version 2 of the License, or
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
11 # (at your option) any later version.
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
12 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
13 # This program is distributed in the hope that it will be useful,
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
14 # but WITHOUT ANY WARRANTY; without even the implied warranty of
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
15 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
16 # GNU General Public License for more details.
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
17 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
18 # You should have received a copy of the GNU General Public License
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
19 # along with this program; if not, write to the Free Software
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
20 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
21 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
22
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
23 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
24 # config
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
25 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
26
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
27 date := date +"%a, %e %b %Y %T %z"
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
28 uname := uname -s -m -r
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
29
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
30 ifndef CAT
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
31 CAT := cat
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
32 endif
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
33
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
34 ifndef CC
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
35 CC := cc
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
36 endif
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
37
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
38 ifndef DMD
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
39 DMD := dmd
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
40 export DMD
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
41 endif
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
42
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
43 ifndef FIND
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
44 FIND := find
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
45 endif
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
46
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
47 ifndef RM
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
48 RM := rm -f
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
49 endif
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
50
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
51 find := find
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
52 find_filter := -type f | grep -v "\\(\\.svn\\)\\|\\(\\.exe$\\)"
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
53
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
54 ###############################################################################
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
55 ###############################################################################
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
56 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
57 # nothing to customize below this line
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
58 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
59 ###############################################################################
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
60 ###############################################################################
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
61
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
62 ifndef NO_TORTURE
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
63 torture := torture-
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
64 else
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
65 torture :=
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
66 endif
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
67
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
68 dstress := ./dstress.exe
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
69 crashRun := ./crashRun.exe
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
70 logsuffix := .outlog
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
71
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
72 .PHONY:: all all_prep all_real clean compile nocompile norun run tools version
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
73
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
74 all : version compile nocompile run norun
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
75
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
76 %.exe : %.c
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
77 $(CC) $(CFLAGS) $< -o $@
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
78
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
79 tools : $(dstress) $(crashRun)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
80
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
81 version :
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
82 @$(date)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
83 @$(uname)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
84 -@$(DMD) -v
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
85
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
86 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
87 # compile
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
88 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
89 compile : $(sort $(patsubst %,%.exe,$(shell $(find) compile $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
90
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
91 compile/%.exe : compile/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
92 @$(dstress) $(torture)compile $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
93 @$(CAT) obj/$(notdir $<)$(logsuffix)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
94
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
95 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
96 # nocompile
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
97 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
98 nocompile : $(sort $(patsubst %,%.exe,$(shell $(find) nocompile $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
99
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
100 nocompile/%.exe : nocompile/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
101 @$(dstress) $(torture)nocompile $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
102 @$(CAT) obj/$(notdir $<)$(logsuffix)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
103
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
104 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
105 # norun
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
106 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
107 norun : $(sort $(patsubst %,%.exe,$(shell $(find) norun $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
108
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
109 norun/%.exe : norun/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
110 @$(dstress) $(torture)norun $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
111 @$(CAT) obj/$(notdir $<)$(logsuffix)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
112
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
113 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
114 # run
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
115 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
116 run : $(sort $(patsubst %,%.exe,$(shell $(find) run $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
117
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
118 run/%.exe : run/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
119 @$(dstress) $(torture)run $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
120 @$(CAT) obj/$(notdir $<)$(logsuffix)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
121
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
122 #
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
123 # clean
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
124 #
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
125 #
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
126
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
127 clean :
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
128 $(RM) -- $(shell $(find) run -name "*exe")
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
129 $(RM) -- $(shell $(find) norun -name "*exe")
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
130 $(RM) -- $(shell $(find) compile -name "*exe")
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
131 $(RM) -- $(shell $(find) nocompile -name "*exe")
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
132 $(RM) -- obj/?*.*
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
133 $(RM) -- $(dstress) $(crashRun)
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
134