1 | # $Id: Makefile.kmk 503 2006-09-15 05:09:38Z bird $
|
---|
2 |
|
---|
3 |
|
---|
4 | #
|
---|
5 | # kmk
|
---|
6 | #
|
---|
7 | PROGRAMS += kmk
|
---|
8 |
|
---|
9 | kmk_TEMPLATE = BIN
|
---|
10 | kmk_DEPS = $(PATH_TARGET)/config.h
|
---|
11 | kmk_DEFS.win32 = __WIN32__
|
---|
12 | kmk_INCS = $(PATH_TARGET) .
|
---|
13 | #kmk_INCS.win32 = kmkbuiltin/w32
|
---|
14 |
|
---|
15 | kmk_DEFS = \
|
---|
16 | HAVE_CONFIG_H \
|
---|
17 | NO_ARCHIVES \
|
---|
18 | CONFIG_NO_DEFAULT_SUFFIXES \
|
---|
19 | CONFIG_NO_DEFAULT_PATTERN_RULES \
|
---|
20 | CONFIG_NO_DEFAULT_TERMINAL_RULES \
|
---|
21 | CONFIG_NO_DEFAULT_SUFFIX_RULES \
|
---|
22 | CONFIG_NO_DEFAULT_VARIABLES \
|
---|
23 | KMK \
|
---|
24 | VARIABLE_HASH
|
---|
25 |
|
---|
26 |
|
---|
27 | kmk_SOURCES = \
|
---|
28 | main.c \
|
---|
29 | read.c \
|
---|
30 | hash.c \
|
---|
31 | strcache.c \
|
---|
32 | variable.c \
|
---|
33 | ar.c \
|
---|
34 | arscan.c \
|
---|
35 | commands.c \
|
---|
36 | default.c \
|
---|
37 | dir.c \
|
---|
38 | expand.c \
|
---|
39 | file.c \
|
---|
40 | function.c \
|
---|
41 | implicit.c \
|
---|
42 | job.c \
|
---|
43 | misc.c \
|
---|
44 | remake.c \
|
---|
45 | rule.c \
|
---|
46 | signame.c \
|
---|
47 | version.c \
|
---|
48 | vpath.c \
|
---|
49 | remote-stub.c
|
---|
50 |
|
---|
51 | kmk_SOURCES.win32 = \
|
---|
52 | getopt.c \
|
---|
53 | getopt1.c \
|
---|
54 | getloadavg.c \
|
---|
55 | w32/subproc/misc.c \
|
---|
56 | w32/subproc/sub_proc.c \
|
---|
57 | w32/subproc/w32err.c \
|
---|
58 | glob/glob.c \
|
---|
59 | glob/fnmatch.c \
|
---|
60 | w32/compat/dirent.c \
|
---|
61 | w32/pathstuff.c
|
---|
62 |
|
---|
63 | kmk_SOURCES.freebsd = \
|
---|
64 | glob/glob.c \
|
---|
65 | glob/fnmatch.c \
|
---|
66 |
|
---|
67 | #
|
---|
68 | # kmkbuiltin commands
|
---|
69 | #
|
---|
70 | kmk_DEFS += CONFIG_WITH_KMK_BUILTIN
|
---|
71 | kmk_SOURCES += \
|
---|
72 | kmkbuiltin.c \
|
---|
73 | kmkbuiltin/append.c \
|
---|
74 | kmkbuiltin/cp.c \
|
---|
75 | kmkbuiltin/cp_utils.c \
|
---|
76 | kmkbuiltin/echo.c \
|
---|
77 | kmkbuiltin/install.c \
|
---|
78 | kmkbuiltin/mkdir.c \
|
---|
79 | kmkbuiltin/ln.c \
|
---|
80 | kmkbuiltin/rm.c \
|
---|
81 | \
|
---|
82 | kmkbuiltin/err.c \
|
---|
83 | kmkbuiltin/setmode.c \
|
---|
84 | kmkbuiltin/strmode.c \
|
---|
85 | kmkbuiltin/strlcpy.c
|
---|
86 |
|
---|
87 | kmk_SOURCES.win32 += \
|
---|
88 | kmkbuiltin/mscfakes.c \
|
---|
89 | kmkbuiltin/fts.c
|
---|
90 |
|
---|
91 |
|
---|
92 | #
|
---|
93 | # Standalone kmkbuiltin commands.
|
---|
94 | #
|
---|
95 | PROGRAMS += kmk_append kmk_cp kmk_echo kmk_mkdir kmk_install kmk_ln kmk_rm
|
---|
96 |
|
---|
97 | kmk_append_TEMPLATE = BIN
|
---|
98 | kmk_append_DEFS = kmk_builtin_append=main
|
---|
99 | kmk_append_INCS = .
|
---|
100 | kmk_append_SOURCES = \
|
---|
101 | kmkbuiltin/append.c \
|
---|
102 | kmkbuiltin/err.c
|
---|
103 |
|
---|
104 | kmk_cp_TEMPLATE = BIN
|
---|
105 | kmk_cp_DEFS = kmk_builtin_cp=main
|
---|
106 | kmk_cp_SOURCES = \
|
---|
107 | kmkbuiltin/cp.c \
|
---|
108 | kmkbuiltin/cp_utils.c \
|
---|
109 | kmkbuiltin/strlcpy.c \
|
---|
110 | kmkbuiltin/err.c
|
---|
111 | kmk_cp_INCS.win32 = $(PATH_TARGET) .
|
---|
112 | kmk_cp_DEFS.win32 = HAVE_CONFIG_H
|
---|
113 | kmk_cp_SOURCES.win32 = \
|
---|
114 | kmkbuiltin/mscfakes.c \
|
---|
115 | kmkbuiltin/fts.c \
|
---|
116 | w32/compat/dirent.c \
|
---|
117 | getopt.c \
|
---|
118 | getopt1.c
|
---|
119 |
|
---|
120 | kmk_echo_TEMPLATE = BIN
|
---|
121 | kmk_echo_DEFS = kmk_builtin_echo=main
|
---|
122 | kmk_echo_SOURCES = \
|
---|
123 | kmkbuiltin/echo.c
|
---|
124 | kmk_echo_SOURCES.win32 = \
|
---|
125 | kmkbuiltin/mscfakes.c \
|
---|
126 | kmkbuiltin/err.c
|
---|
127 |
|
---|
128 | kmk_install_TEMPLATE = BIN
|
---|
129 | kmk_install_DEFS = kmk_builtin_install=main
|
---|
130 | kmk_install_SOURCES = \
|
---|
131 | kmkbuiltin/install.c \
|
---|
132 | kmkbuiltin/err.c \
|
---|
133 | kmkbuiltin/strmode.c \
|
---|
134 | kmkbuiltin/setmode.c
|
---|
135 | kmk_install_INCS.win32 = $(PATH_TARGET) .
|
---|
136 | kmk_install_DEFS.win32 = HAVE_CONFIG_H
|
---|
137 | kmk_install_SOURCES.win32 = \
|
---|
138 | kmkbuiltin/mscfakes.c \
|
---|
139 | getopt.c \
|
---|
140 | getopt1.c
|
---|
141 |
|
---|
142 | kmk_ln_TEMPLATE = BIN
|
---|
143 | kmk_ln_DEFS = kmk_builtin_ln=main
|
---|
144 | kmk_ln_SOURCES = \
|
---|
145 | kmkbuiltin/ln.c \
|
---|
146 | kmkbuiltin/err.c
|
---|
147 | kmk_ln_INCS.win32 = $(PATH_TARGET) .
|
---|
148 | kmk_ln_DEFS.win32 = HAVE_CONFIG_H
|
---|
149 | kmk_ln_SOURCES.win32 = \
|
---|
150 | kmkbuiltin/mscfakes.c\
|
---|
151 | getopt.c \
|
---|
152 | getopt1.c
|
---|
153 |
|
---|
154 | kmk_mkdir_TEMPLATE = BIN
|
---|
155 | kmk_mkdir_DEFS = kmk_builtin_mkdir=main
|
---|
156 | kmk_mkdir_SOURCES = \
|
---|
157 | kmkbuiltin/mkdir.c \
|
---|
158 | kmkbuiltin/err.c \
|
---|
159 | kmkbuiltin/setmode.c
|
---|
160 | kmk_mkdir_INCS.win32 = $(PATH_TARGET) .
|
---|
161 | kmk_mkdir_DEFS.win32 = HAVE_CONFIG_H
|
---|
162 | kmk_mkdir_SOURCES.win32 = \
|
---|
163 | kmkbuiltin/mscfakes.c \
|
---|
164 | getopt.c \
|
---|
165 | getopt1.c
|
---|
166 |
|
---|
167 | kmk_rm_TEMPLATE = BIN
|
---|
168 | kmk_rm_DEFS = kmk_builtin_rm=main
|
---|
169 | kmk_rm_SOURCES = \
|
---|
170 | kmkbuiltin/rm.c \
|
---|
171 | kmkbuiltin/err.c \
|
---|
172 | kmkbuiltin/strmode.c
|
---|
173 | kmk_rm_INCS.win32 = $(PATH_TARGET) .
|
---|
174 | kmk_rm_DEFS.win32 = HAVE_CONFIG_H
|
---|
175 | kmk_rm_SOURCES.win32 = \
|
---|
176 | kmkbuiltin/mscfakes.c\
|
---|
177 | getopt.c \
|
---|
178 | getopt1.c
|
---|
179 |
|
---|
180 |
|
---|
181 | DEPTH = ../..
|
---|
182 | include $(PATH_KBUILD)/rules.kmk
|
---|
183 |
|
---|
184 |
|
---|
185 | #
|
---|
186 | # Use checked in config.h instead of running ./Configure for it.
|
---|
187 | #
|
---|
188 | $(PATH_TARGET)/config.h: config.h.$(BUILD_TARGET)
|
---|
189 | $(MKDIR) -p $(dir $@)
|
---|
190 | $(CP) $^ $@
|
---|
191 |
|
---|
192 |
|
---|
193 | #
|
---|
194 | # Some tests.
|
---|
195 | #
|
---|
196 | parallel: parallel_1 parallel_2 parallel_3 parallel_4 parallel_5
|
---|
197 | parallel_1 parallel_2 parallel_3 parallel_4 parallel_5:
|
---|
198 | echo $@_start ; sleep 1; echo $@_done
|
---|
199 |
|
---|
200 | test:
|
---|
201 | echo "1"
|
---|
202 | echo "2"
|
---|
203 | echo "3"
|
---|
204 | echo "4"
|
---|
205 |
|
---|