# $Id$ ## @file # # kNIX Boostrap Makefile for findutils # # Copyright (c) 2007 knut st. osmundsen # # # This file is part of kLIBC. # # kLIBC is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation; either version 2 of the License, or # (at your option) any later version. # # kLIBC is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with kLIBC; if not, write to the Free Software # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # DEPTH = ../../.. include $(PATH_KBUILD)/header.kmk # # The findutils template. # TEMPLATE_findutils = findutils template TEMPLATE_findutils_EXTENDS = usr.bin TEMPLATE_findutils_DEFS = $(TEMPLATE_usr.bin_DEFS) \ LOCALEDIR=\"/@unixroot/usr/share/locale\" \ LOCATE_DB=\"/@unixroot/usr/var/locatedb\" \ HAVE_CONFIG_H TEMPLATE_findutils_INCS = $(TEMPLATE_usr.bin_INCS) \ $(PATH_TARGET) \ $(PATH_SUB_CURRENT) \ $(PATH_SUB_ROOT)/gnulib/lib \ $(PATH_SUB_ROOT)/lib TEMPLATE_findutils_LIBS = $(TEMPLATE_usr.bin_LIBS) \ $(TARGET_libfind) \ $(TARGET_findtools) TEMPLATE_findutils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \ $(PATH_TARGET)/config.h \ $(PATH_TARGET)/fnmatch.h # # libfind - this combines the gnulib and the lib. # LIBRARIES += libfind libfind_TEMPLATE = findutils libfind_NOINST = true libfind_SOURCES = \ lib/buildcmd.c \ lib/extendbuf.c \ lib/forcefindlib.c \ lib/listfile.c \ lib/nextelem.c \ lib/printquoted.c \ lib/qmark.c \ lib/regextype.c \ lib/savedirinfo.c \ \ gnulib/lib/argmatch.c \ gnulib/lib/basename.c \ gnulib/lib/canonicalize.c \ gnulib/lib/chdir-long.c \ gnulib/lib/close-stream.c \ gnulib/lib/closeout.c \ gnulib/lib/creat-safer.c \ gnulib/lib/cycle-check.c \ gnulib/lib/dirname.c \ gnulib/lib/dup-safer.c \ gnulib/lib/exitfail.c \ gnulib/lib/fchmodat.c \ gnulib/lib/fd-safer.c \ gnulib/lib/filemode.c \ gnulib/lib/filenamecat.c \ gnulib/lib/fnmatch.c \ gnulib/lib/fopen-safer.c \ gnulib/lib/fts.c \ gnulib/lib/getcwd.c \ gnulib/lib/hash.c \ gnulib/lib/human.c \ gnulib/lib/i-ring.c \ gnulib/lib/idcache.c \ gnulib/lib/lstat.c \ gnulib/lib/mbchar.c \ gnulib/lib/mkdirat.c \ gnulib/lib/modechange.c \ gnulib/lib/mountlist.c \ gnulib/lib/open-safer.c \ gnulib/lib/openat-die.c \ gnulib/lib/openat-proc.c \ gnulib/lib/openat.c \ gnulib/lib/pipe-safer.c \ gnulib/lib/quote.c \ gnulib/lib/quotearg.c \ gnulib/lib/rpmatch.c \ gnulib/lib/save-cwd.c \ gnulib/lib/savedir.c \ gnulib/lib/strcasecmp.c \ gnulib/lib/strftime.c \ gnulib/lib/stripslash.c \ gnulib/lib/strnlen1.c \ gnulib/lib/strstr.c \ gnulib/lib/xalloc-die.c \ gnulib/lib/xgetcwd.c \ gnulib/lib/xmalloc.c \ gnulib/lib/xreadlink.c \ gnulib/lib/xstrndup.c \ gnulib/lib/xstrtod.c \ gnulib/lib/xstrtol.c \ gnulib/lib/xstrtoul.c \ gnulib/lib/xstrtoumax.c \ gnulib/lib/yesno.c \ # # findtools # LIBRARIES += findtools findtools_TEMPLATE = findutils findtools_NOINST = true findtools_SOURCES = \ find/finddata.c \ find/fstype.c \ find/parser.c \ find/pred.c \ find/tree.c \ find/util.c \ find/version.c # # find # PROGRAMS += find find_TEMPLATE = findutils find_SOURCES = \ find/ftsfind.c # # oldfind # PROGRAMS += oldfind oldfind_TEMPLATE = findutils oldfind_SOURCES = \ find/find.c # # xargs # PROGRAMS += xargs xargs_TEMPLATE = findutils xargs_SOURCES = \ xargs/xargs.c # # locate # PROGRAMS += locate locate_TEMPLATE = findutils locate_SOURCES = \ locate/locate.c # # updatedb # INSTALLS += updatedb updatedb_TEMPLATE = usr.bin updatedb_SOURCES = \ $(PATH_TARGET)/updatedb $(PATH_TARGET)/updatedb: locate/updatedb.sh $(SED) \ -e "s,@bindir@,/@unixroot/usr/bin," \ -e "s,@libexecdir@,/@unixroot/usr/libexec," \ -e "s,@LOCATE_DB@,/@unixroot/usr/var/locatedb," \ -e "s,@VERSION@,4.3.2," \ -e "s,@find@,find.exe," \ -e "s,@frcode@,frcode.exe," \ -e "s,@bigram@,bigram.exe," \ -e "s,@code@,code.exe," \ -e "s,@SORT@,sort.exe," \ -e "s,@SORT_SUPPORTS_Z@,true," \ $< > $@ # # bigram # PROGRAMS += bigram bigram_TEMPLATE = findutils bigram_INST = usr/libexec/ bigram_SOURCES = \ locate/bigram.c # # code # PROGRAMS += code code_TEMPLATE = findutils code_INST = usr/libexec/ code_SOURCES = \ locate/code.c # # frcode # PROGRAMS += frcode frcode_TEMPLATE = findutils frcode_INST = usr/libexec/ frcode_SOURCES = \ locate/frcode.c # # config.h and fnmatch.h # $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h $(INSTALL) $< $@ $(PATH_TARGET)/fnmatch.h: gnulib/lib/fnmatch_.h $(INSTALL) $< $@ include $(PATH_KBUILD)/footer.kmk