VirtualBox

source: kBuild/trunk/src/gmake/Makefile.kmk@ 374

Last change on this file since 374 was 370, checked in by bird, 19 years ago

o Ported all kmk builtins to win32.
o Fixed serveral bugs in kmk builtins.
o Probably broke both linux, bsd and OS/2. :-)

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

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette