# $Id$ ## @file # # kNIX Boostrap Makefile for grep # # 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 greputils template. # TEMPLATE_greputils = greputils template TEMPLATE_greputils_EXTENDS = usr.bin TEMPLATE_greputils_DEFS = $(TEMPLATE_usr.bin_DEFS) \ LOCALEDIR=\"/@unixroot/usr/share/locale\" \ HAVE_CONFIG_H TEMPLATE_greputils_INCS = $(TEMPLATE_usr.bin_INCS) \ $(PATH_TARGET) \ $(PATH_SUB_CURRENT) \ $(PATH_SUB_ROOT)/lib TEMPLATE_greputils_LIBS = $(TEMPLATE_usr.bin_LIBS) \ $(TARGET_libgreputils) TEMPLATE_greputils_ORDERDEPS = $(TEMPLATE_usr.bin_ORDERDEPS) \ $(PATH_TARGET)/config.h # # libgreputils # LIBRARIES += libgreputils libgreputils_TEMPLATE = greputils libgreputils_NOINST = true libgreputils_SOURCES = \ lib/closeout.c \ lib/error.c \ lib/exclude.c \ lib/hard-locale.c \ lib/isdir.c \ lib/obstack.c \ lib/quotearg.c \ lib/savedir.c \ lib/xmalloc.c \ lib/xstrtol.c \ lib/xstrtoumax.c # # diff # PROGRAMS += grep grep_TEMPLATE = greputils grep_INST = usr/bin/grep$(SUFF_EXE) usr/bin/egrep$(SUFF_EXE) usr/bin/fgrep$(SUFF_EXE) grep_SOURCES = \ src/grep.c \ src/dfa.c \ src/kwset.c \ src/grepmat.c \ src/search.c \ # # config.h # $(PATH_TARGET)/config.h: kNIX-bootstrap-$(BUILD_TARGET).$(BUILD_TARGET_ARCH)-config.h $(INSTALL) $< $@ include $(PATH_KBUILD)/footer.kmk