source: trunk/essentials/sys-apps/findutils/kNIX-bootstrap.kmk@ 3320

Last change on this file since 3320 was 3180, checked in by bird, 18 years ago

Configured normal and bootstrapping builds.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 4.7 KB
Line 
1# $Id: kNIX-bootstrap.kmk 3180 2007-04-22 07:13:02Z bird $
2## @file
3#
4# kNIX Boostrap Makefile for findutils
5#
6# Copyright (c) 2007 knut st. osmundsen <bird-src-spam@anduin.net>
7#
8#
9# This file is part of kLIBC.
10#
11# kLIBC is free software; you can redistribute it and/or modify
12# it under the terms of the GNU General Public License as published by
13# the Free Software Foundation; either version 2 of the License, or
14# (at your option) any later version.
15#
16# kLIBC is distributed in the hope that it will be useful,
17# but WITHOUT ANY WARRANTY; without even the implied warranty of
18# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19# GNU General Public License for more details.
20#
21# You should have received a copy of the GNU General Public License
22# along with kLIBC; if not, write to the Free Software
23# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
24#
25#
26
27DEPTH = ../../..
28include $(PATH_KBUILD)/header.kmk
29
30
31#
32# The findutils template.
33#
34TEMPLATE_findutils_EXTENDS = usr.bin
35TEMPLATE_findutils_DEFS = $(TEMPLATE_usr.bin_DEFS) \
36 LOCALEDIR=\"/@unixroot/usr/share/locale\" \
37 LOCATE_DB=\"/@unixroot/usr/var/locatedb\" \
38 HAVE_CONFIG_H
39TEMPLATE_findutils_INCS = $(TEMPLATE_usr.bin_INCS) \
40 $(PATH_TARGET) \
41 $(PATH_SUB_CURRENT) \
42 $(PATH_SUB_ROOT)/gnulib/lib \
43 $(PATH_SUB_ROOT)/lib
44TEMPLATE_findutils_LIBS = $(TEMPLATE_usr.bin_LIBS) \
45 $(TARGET_libfind) \
46 $(TARGET_findtools)
47TEMPLATE_findutils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \
48 $(PATH_TARGET)/config.h \
49 $(PATH_TARGET)/fnmatch.h
50
51#
52# libfind - this combines the gnulib and the lib.
53#
54LIBRARIES += libfind
55libfind_TEMPLATE = findutils
56libfind_NOINST = true
57libfind_SOURCES = \
58 lib/buildcmd.c \
59 lib/extendbuf.c \
60 lib/forcefindlib.c \
61 lib/listfile.c \
62 lib/nextelem.c \
63 lib/printquoted.c \
64 lib/qmark.c \
65 lib/regextype.c \
66 lib/savedirinfo.c \
67 \
68 gnulib/lib/argmatch.c \
69 gnulib/lib/basename.c \
70 gnulib/lib/canonicalize.c \
71 gnulib/lib/chdir-long.c \
72 gnulib/lib/close-stream.c \
73 gnulib/lib/closeout.c \
74 gnulib/lib/creat-safer.c \
75 gnulib/lib/cycle-check.c \
76 gnulib/lib/dirname.c \
77 gnulib/lib/dup-safer.c \
78 gnulib/lib/exitfail.c \
79 gnulib/lib/fchmodat.c \
80 gnulib/lib/fd-safer.c \
81 gnulib/lib/filemode.c \
82 gnulib/lib/filenamecat.c \
83 gnulib/lib/fnmatch.c \
84 gnulib/lib/fopen-safer.c \
85 gnulib/lib/fts.c \
86 gnulib/lib/getcwd.c \
87 gnulib/lib/hash.c \
88 gnulib/lib/human.c \
89 gnulib/lib/i-ring.c \
90 gnulib/lib/idcache.c \
91 gnulib/lib/lstat.c \
92 gnulib/lib/mbchar.c \
93 gnulib/lib/mkdirat.c \
94 gnulib/lib/modechange.c \
95 gnulib/lib/mountlist.c \
96 gnulib/lib/open-safer.c \
97 gnulib/lib/openat-die.c \
98 gnulib/lib/openat-proc.c \
99 gnulib/lib/openat.c \
100 gnulib/lib/pipe-safer.c \
101 gnulib/lib/quote.c \
102 gnulib/lib/quotearg.c \
103 gnulib/lib/rpmatch.c \
104 gnulib/lib/save-cwd.c \
105 gnulib/lib/savedir.c \
106 gnulib/lib/strcasecmp.c \
107 gnulib/lib/strftime.c \
108 gnulib/lib/stripslash.c \
109 gnulib/lib/strnlen1.c \
110 gnulib/lib/strstr.c \
111 gnulib/lib/xalloc-die.c \
112 gnulib/lib/xgetcwd.c \
113 gnulib/lib/xmalloc.c \
114 gnulib/lib/xreadlink.c \
115 gnulib/lib/xstrndup.c \
116 gnulib/lib/xstrtod.c \
117 gnulib/lib/xstrtol.c \
118 gnulib/lib/xstrtoul.c \
119 gnulib/lib/xstrtoumax.c \
120 gnulib/lib/yesno.c \
121
122#
123# findtools
124#
125LIBRARIES += findtools
126findtools_TEMPLATE = findutils
127findtools_NOINST = true
128findtools_SOURCES = \
129 find/finddata.c \
130 find/fstype.c \
131 find/parser.c \
132 find/pred.c \
133 find/tree.c \
134 find/util.c \
135 find/version.c
136
137#
138# find
139#
140PROGRAMS += find
141find_TEMPLATE = findutils
142find_SOURCES = \
143 find/ftsfind.c
144
145#
146# oldfind
147#
148PROGRAMS += oldfind
149oldfind_TEMPLATE = findutils
150oldfind_SOURCES = \
151 find/find.c
152
153#
154# xargs
155#
156PROGRAMS += xargs
157xargs_TEMPLATE = findutils
158xargs_SOURCES = \
159 xargs/xargs.c
160
161#
162# locate
163#
164PROGRAMS += locate
165locate_TEMPLATE = findutils
166locate_SOURCES = \
167 locate/locate.c
168
169#
170# updatedb
171#
172INSTALLS += updatedb
173updatedb_TEMPLATE = usr.bin
174updatedb_SOURCES = \
175 $(PATH_TARGET)/updatedb
176
177$(PATH_TARGET)/updatedb: locate/updatedb.sh
178 $(SED) \
179 -e "s,@bindir@,/@unixroot/usr/bin," \
180 -e "s,@libexecdir@,/@unixroot/usr/libexec," \
181 -e "s,@LOCATE_DB@,/@unixroot/usr/var/locatedb," \
182 -e "s,@VERSION@,4.3.2," \
183 -e "s,@find@,find.exe," \
184 -e "s,@frcode@,frcode.exe," \
185 -e "s,@bigram@,bigram.exe," \
186 -e "s,@code@,code.exe," \
187 -e "s,@SORT@,sort.exe," \
188 -e "s,@SORT_SUPPORTS_Z@,true," \
189 $< > $@
190
191#
192# bigram
193#
194PROGRAMS += bigram
195bigram_TEMPLATE = findutils
196bigram_INST = usr/libexec/
197bigram_SOURCES = \
198 locate/bigram.c
199
200#
201# code
202#
203PROGRAMS += code
204code_TEMPLATE = findutils
205code_INST = usr/libexec/
206code_SOURCES = \
207 locate/code.c
208
209#
210# frcode
211#
212PROGRAMS += frcode
213frcode_TEMPLATE = findutils
214frcode_INST = usr/libexec/
215frcode_SOURCES = \
216 locate/frcode.c
217
218#
219# config.h and fnmatch.h
220#
221$(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h
222 $(INSTALL) $< $@
223
224$(PATH_TARGET)/fnmatch.h: gnulib/lib/fnmatch_.h
225 $(INSTALL) $< $@
226
227include $(PATH_KBUILD)/footer.kmk
228
Note: See TracBrowser for help on using the repository browser.