annotate Makefile.parallel @ 1630:d0efa3ae5522 default tip

run/mini/naked_asm5: New x86_64 ABI passes the arguments in reverse order.
author David Nadlinger <code@klickverbot.at>
date Sat, 23 Apr 2011 22:57:32 +0200
parents 44b8263c91ea
children
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
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
6 # Copyright (C) 2006, 2007 Thomas Kuehne
903
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
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
48 RM := rm -rf --
903
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
910
67f90139e1da fixed $ escape in find_target
thomask
parents: 905
diff changeset
52 find_filter := -type f | grep -v "\\(\\.svn\\)\\|\\(\\.exe$$\\)"
905
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
913
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
68 dstress := ./dstress
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
69 crashRun := ./crashRun
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
70 logsuffix := .outlog
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
71
913
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
72 .PHONY:: all clean compile nocompile norun run tools version
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
73
913
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
74 all :: version compile nocompile run norun
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
75
913
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
76 % : %.c
969
752d78bbb899 enabled Valgrind checks
thomask
parents: 960
diff changeset
77 $(CC) $(CFLAGS) -DUSE_VALGRIND $< -o $@
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
78
936
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
79 tools :: $(dstress) $(crashRun)
903
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)
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
94 @$(RM) obj/$(basename $(notdir $<))*
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
95
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
96 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
97 # nocompile
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
98 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
99 nocompile : $(sort $(patsubst %,%.exe,$(shell $(find) nocompile $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
100
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
101 nocompile/%.exe : nocompile/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
102 @$(dstress) $(torture)nocompile $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
103 @$(CAT) obj/$(notdir $<)$(logsuffix)
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
104 @$(RM) obj/$(basename $(notdir $<))*
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
105
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
106 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
107 # norun
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
108 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
109 norun : $(sort $(patsubst %,%.exe,$(shell $(find) norun $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
110
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
111 norun/%.exe : norun/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
112 @$(dstress) $(torture)norun $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
113 @$(CAT) obj/$(notdir $<)$(logsuffix)
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
114 @$(RM) obj/$(basename $(notdir $<))*
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
115
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
116 #
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
117 # run
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
118 #
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
119 run : $(sort $(patsubst %,%.exe,$(shell $(find) run $(find_filter))))
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
120
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
121 run/%.exe : run/% tools
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
122 @$(dstress) $(torture)run $< > obj/$(notdir $<)$(logsuffix)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
123 @$(CAT) obj/$(notdir $<)$(logsuffix)
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
124 @$(RM) obj/$(basename $(notdir $<))*
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
125
905
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
126 #
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
127 # clean
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
128 #
151eb236b6bc added NO_TORTURE support
thomask
parents: 903
diff changeset
129 #
913
1173272680e3 fixed crashRun building
thomask
parents: 910
diff changeset
130 clean ::
936
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
131 $(RM) $(shell $(find) run -name "*exe")
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
132 $(RM) $(shell $(find) norun -name "*exe")
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
133 $(RM) $(shell $(find) compile -name "*exe")
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
134 $(RM) $(shell $(find) nocompile -name "*exe")
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
135 $(RM) obj/[A-E]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
136 $(RM) obj/[F-J]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
137 $(RM) obj/[K-O]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
138 $(RM) obj/[P-T]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
139 $(RM) obj/[U-Z]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
140 $(RM) obj/[a-e]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
141 $(RM) obj/[f-j]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
142 $(RM) obj/[k-o]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
143 $(RM) obj/[p-t]*.*
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
144 $(RM) obj/[u-z]*.*
1411
44b8263c91ea remove obsolete files in obj/*
thomask
parents: 971
diff changeset
145 $(RM) obj/*
936
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
146 $(RM) run.sh norun.sh compile.sh nocompile.sh
daeca9f37d08 adapeted "clean" target to the large number of files
thomask
parents: 913
diff changeset
147 $(RM) $(dstress) $(crashRun)
903
613f9c34bb15 added experimental Makefile.parallel
thomask
parents:
diff changeset
148