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