[3180] | 1 | # $Id: kNIX-bootstrap.kmk 3617 2008-04-25 03:05:28Z 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 |
|
---|
| 27 | DEPTH = ../../..
|
---|
| 28 | include $(PATH_KBUILD)/header.kmk
|
---|
| 29 |
|
---|
| 30 |
|
---|
| 31 | #
|
---|
| 32 | # The findutils template.
|
---|
| 33 | #
|
---|
[3617] | 34 | TEMPLATE_findutils = findutils template
|
---|
[3180] | 35 | TEMPLATE_findutils_EXTENDS = usr.bin
|
---|
| 36 | TEMPLATE_findutils_DEFS = $(TEMPLATE_usr.bin_DEFS) \
|
---|
| 37 | LOCALEDIR=\"/@unixroot/usr/share/locale\" \
|
---|
| 38 | LOCATE_DB=\"/@unixroot/usr/var/locatedb\" \
|
---|
| 39 | HAVE_CONFIG_H
|
---|
| 40 | TEMPLATE_findutils_INCS = $(TEMPLATE_usr.bin_INCS) \
|
---|
| 41 | $(PATH_TARGET) \
|
---|
| 42 | $(PATH_SUB_CURRENT) \
|
---|
| 43 | $(PATH_SUB_ROOT)/gnulib/lib \
|
---|
| 44 | $(PATH_SUB_ROOT)/lib
|
---|
| 45 | TEMPLATE_findutils_LIBS = $(TEMPLATE_usr.bin_LIBS) \
|
---|
| 46 | $(TARGET_libfind) \
|
---|
| 47 | $(TARGET_findtools)
|
---|
| 48 | TEMPLATE_findutils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \
|
---|
| 49 | $(PATH_TARGET)/config.h \
|
---|
| 50 | $(PATH_TARGET)/fnmatch.h
|
---|
| 51 |
|
---|
| 52 | #
|
---|
| 53 | # libfind - this combines the gnulib and the lib.
|
---|
| 54 | #
|
---|
| 55 | LIBRARIES += libfind
|
---|
| 56 | libfind_TEMPLATE = findutils
|
---|
| 57 | libfind_NOINST = true
|
---|
| 58 | libfind_SOURCES = \
|
---|
| 59 | lib/buildcmd.c \
|
---|
| 60 | lib/extendbuf.c \
|
---|
| 61 | lib/forcefindlib.c \
|
---|
| 62 | lib/listfile.c \
|
---|
| 63 | lib/nextelem.c \
|
---|
| 64 | lib/printquoted.c \
|
---|
| 65 | lib/qmark.c \
|
---|
| 66 | lib/regextype.c \
|
---|
| 67 | lib/savedirinfo.c \
|
---|
| 68 | \
|
---|
| 69 | gnulib/lib/argmatch.c \
|
---|
| 70 | gnulib/lib/basename.c \
|
---|
| 71 | gnulib/lib/canonicalize.c \
|
---|
| 72 | gnulib/lib/chdir-long.c \
|
---|
| 73 | gnulib/lib/close-stream.c \
|
---|
| 74 | gnulib/lib/closeout.c \
|
---|
| 75 | gnulib/lib/creat-safer.c \
|
---|
| 76 | gnulib/lib/cycle-check.c \
|
---|
| 77 | gnulib/lib/dirname.c \
|
---|
| 78 | gnulib/lib/dup-safer.c \
|
---|
| 79 | gnulib/lib/exitfail.c \
|
---|
| 80 | gnulib/lib/fchmodat.c \
|
---|
| 81 | gnulib/lib/fd-safer.c \
|
---|
| 82 | gnulib/lib/filemode.c \
|
---|
| 83 | gnulib/lib/filenamecat.c \
|
---|
| 84 | gnulib/lib/fnmatch.c \
|
---|
| 85 | gnulib/lib/fopen-safer.c \
|
---|
| 86 | gnulib/lib/fts.c \
|
---|
| 87 | gnulib/lib/getcwd.c \
|
---|
| 88 | gnulib/lib/hash.c \
|
---|
| 89 | gnulib/lib/human.c \
|
---|
| 90 | gnulib/lib/i-ring.c \
|
---|
| 91 | gnulib/lib/idcache.c \
|
---|
| 92 | gnulib/lib/lstat.c \
|
---|
| 93 | gnulib/lib/mbchar.c \
|
---|
| 94 | gnulib/lib/mkdirat.c \
|
---|
| 95 | gnulib/lib/modechange.c \
|
---|
| 96 | gnulib/lib/mountlist.c \
|
---|
| 97 | gnulib/lib/open-safer.c \
|
---|
| 98 | gnulib/lib/openat-die.c \
|
---|
| 99 | gnulib/lib/openat-proc.c \
|
---|
| 100 | gnulib/lib/openat.c \
|
---|
| 101 | gnulib/lib/pipe-safer.c \
|
---|
| 102 | gnulib/lib/quote.c \
|
---|
| 103 | gnulib/lib/quotearg.c \
|
---|
| 104 | gnulib/lib/rpmatch.c \
|
---|
| 105 | gnulib/lib/save-cwd.c \
|
---|
| 106 | gnulib/lib/savedir.c \
|
---|
| 107 | gnulib/lib/strcasecmp.c \
|
---|
| 108 | gnulib/lib/strftime.c \
|
---|
| 109 | gnulib/lib/stripslash.c \
|
---|
| 110 | gnulib/lib/strnlen1.c \
|
---|
| 111 | gnulib/lib/strstr.c \
|
---|
| 112 | gnulib/lib/xalloc-die.c \
|
---|
| 113 | gnulib/lib/xgetcwd.c \
|
---|
| 114 | gnulib/lib/xmalloc.c \
|
---|
| 115 | gnulib/lib/xreadlink.c \
|
---|
| 116 | gnulib/lib/xstrndup.c \
|
---|
| 117 | gnulib/lib/xstrtod.c \
|
---|
| 118 | gnulib/lib/xstrtol.c \
|
---|
| 119 | gnulib/lib/xstrtoul.c \
|
---|
| 120 | gnulib/lib/xstrtoumax.c \
|
---|
| 121 | gnulib/lib/yesno.c \
|
---|
| 122 |
|
---|
| 123 | #
|
---|
| 124 | # findtools
|
---|
| 125 | #
|
---|
| 126 | LIBRARIES += findtools
|
---|
| 127 | findtools_TEMPLATE = findutils
|
---|
| 128 | findtools_NOINST = true
|
---|
| 129 | findtools_SOURCES = \
|
---|
| 130 | find/finddata.c \
|
---|
| 131 | find/fstype.c \
|
---|
| 132 | find/parser.c \
|
---|
| 133 | find/pred.c \
|
---|
| 134 | find/tree.c \
|
---|
| 135 | find/util.c \
|
---|
| 136 | find/version.c
|
---|
| 137 |
|
---|
| 138 | #
|
---|
| 139 | # find
|
---|
| 140 | #
|
---|
| 141 | PROGRAMS += find
|
---|
| 142 | find_TEMPLATE = findutils
|
---|
| 143 | find_SOURCES = \
|
---|
| 144 | find/ftsfind.c
|
---|
| 145 |
|
---|
| 146 | #
|
---|
| 147 | # oldfind
|
---|
| 148 | #
|
---|
| 149 | PROGRAMS += oldfind
|
---|
| 150 | oldfind_TEMPLATE = findutils
|
---|
| 151 | oldfind_SOURCES = \
|
---|
| 152 | find/find.c
|
---|
| 153 |
|
---|
| 154 | #
|
---|
| 155 | # xargs
|
---|
| 156 | #
|
---|
| 157 | PROGRAMS += xargs
|
---|
| 158 | xargs_TEMPLATE = findutils
|
---|
| 159 | xargs_SOURCES = \
|
---|
| 160 | xargs/xargs.c
|
---|
| 161 |
|
---|
| 162 | #
|
---|
| 163 | # locate
|
---|
| 164 | #
|
---|
| 165 | PROGRAMS += locate
|
---|
| 166 | locate_TEMPLATE = findutils
|
---|
| 167 | locate_SOURCES = \
|
---|
| 168 | locate/locate.c
|
---|
| 169 |
|
---|
| 170 | #
|
---|
| 171 | # updatedb
|
---|
| 172 | #
|
---|
| 173 | INSTALLS += updatedb
|
---|
| 174 | updatedb_TEMPLATE = usr.bin
|
---|
| 175 | updatedb_SOURCES = \
|
---|
| 176 | $(PATH_TARGET)/updatedb
|
---|
| 177 |
|
---|
| 178 | $(PATH_TARGET)/updatedb: locate/updatedb.sh
|
---|
| 179 | $(SED) \
|
---|
| 180 | -e "s,@bindir@,/@unixroot/usr/bin," \
|
---|
| 181 | -e "s,@libexecdir@,/@unixroot/usr/libexec," \
|
---|
| 182 | -e "s,@LOCATE_DB@,/@unixroot/usr/var/locatedb," \
|
---|
| 183 | -e "s,@VERSION@,4.3.2," \
|
---|
| 184 | -e "s,@find@,find.exe," \
|
---|
| 185 | -e "s,@frcode@,frcode.exe," \
|
---|
| 186 | -e "s,@bigram@,bigram.exe," \
|
---|
| 187 | -e "s,@code@,code.exe," \
|
---|
| 188 | -e "s,@SORT@,sort.exe," \
|
---|
| 189 | -e "s,@SORT_SUPPORTS_Z@,true," \
|
---|
| 190 | $< > $@
|
---|
| 191 |
|
---|
| 192 | #
|
---|
| 193 | # bigram
|
---|
| 194 | #
|
---|
| 195 | PROGRAMS += bigram
|
---|
| 196 | bigram_TEMPLATE = findutils
|
---|
| 197 | bigram_INST = usr/libexec/
|
---|
| 198 | bigram_SOURCES = \
|
---|
| 199 | locate/bigram.c
|
---|
| 200 |
|
---|
| 201 | #
|
---|
| 202 | # code
|
---|
| 203 | #
|
---|
| 204 | PROGRAMS += code
|
---|
| 205 | code_TEMPLATE = findutils
|
---|
| 206 | code_INST = usr/libexec/
|
---|
| 207 | code_SOURCES = \
|
---|
| 208 | locate/code.c
|
---|
| 209 |
|
---|
| 210 | #
|
---|
| 211 | # frcode
|
---|
| 212 | #
|
---|
| 213 | PROGRAMS += frcode
|
---|
| 214 | frcode_TEMPLATE = findutils
|
---|
| 215 | frcode_INST = usr/libexec/
|
---|
| 216 | frcode_SOURCES = \
|
---|
| 217 | locate/frcode.c
|
---|
| 218 |
|
---|
| 219 | #
|
---|
| 220 | # config.h and fnmatch.h
|
---|
| 221 | #
|
---|
| 222 | $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h
|
---|
| 223 | $(INSTALL) $< $@
|
---|
| 224 |
|
---|
| 225 | $(PATH_TARGET)/fnmatch.h: gnulib/lib/fnmatch_.h
|
---|
| 226 | $(INSTALL) $< $@
|
---|
| 227 |
|
---|
| 228 | include $(PATH_KBUILD)/footer.kmk
|
---|
| 229 |
|
---|