| 1 | # $Id: Makefile.kmk 1509 2008-04-09 00:40:05Z bird $
|
|---|
| 2 | ## @file
|
|---|
| 3 | # sed
|
|---|
| 4 | #
|
|---|
| 5 |
|
|---|
| 6 | #
|
|---|
| 7 | # Copyright (c) 2006-2008 knut st. osmundsen <bird-kBuild-spam@anduin.net>
|
|---|
| 8 | #
|
|---|
| 9 | # This file is part of kBuild.
|
|---|
| 10 | #
|
|---|
| 11 | # kBuild 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 | # kBuild 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 kBuild; if not, write to the Free Software
|
|---|
| 23 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
|---|
| 24 | #
|
|---|
| 25 | #
|
|---|
| 26 |
|
|---|
| 27 | DEPTH = ../..
|
|---|
| 28 | include $(PATH_KBUILD)/header.kmk
|
|---|
| 29 |
|
|---|
| 30 | #
|
|---|
| 31 | # kmk_sed
|
|---|
| 32 | #
|
|---|
| 33 | PROGRAMS += kmk_sed
|
|---|
| 34 |
|
|---|
| 35 | kmk_sed_TEMPLATE = BIN
|
|---|
| 36 | kmk_sed_DEPS = \
|
|---|
| 37 | $(PATH_TARGET)/config.h \
|
|---|
| 38 | $(PATH_TARGET)/regex.h
|
|---|
| 39 | kmk_sed_CLEAN = $(kmk_sed_DEPS)
|
|---|
| 40 | kmk_sed_INCS = \
|
|---|
| 41 | $(PATH_TARGET) \
|
|---|
| 42 | . \
|
|---|
| 43 | lib \
|
|---|
| 44 | intl
|
|---|
| 45 | kmk_sed_DEFS = \
|
|---|
| 46 | HAVE_CONFIG_H
|
|---|
| 47 | kmk_sed_SOURCES = \
|
|---|
| 48 | sed/sed.c \
|
|---|
| 49 | lib/regex.c \
|
|---|
| 50 | sed/compile.c \
|
|---|
| 51 | sed/execute.c \
|
|---|
| 52 | sed/regexp.c \
|
|---|
| 53 | sed/fmt.c \
|
|---|
| 54 | sed/mbcs.c \
|
|---|
| 55 | lib/getopt1.c \
|
|---|
| 56 | lib/getopt.c \
|
|---|
| 57 | lib/utils.c
|
|---|
| 58 | kmk_sed_SOURCES.darwin = \
|
|---|
| 59 | lib/strverscmp.c \
|
|---|
| 60 | lib/obstack.c \
|
|---|
| 61 | lib/getline.c
|
|---|
| 62 | kmk_sed_SOURCES.freebsd = \
|
|---|
| 63 | lib/strverscmp.c \
|
|---|
| 64 | lib/obstack.c \
|
|---|
| 65 | lib/getline.c
|
|---|
| 66 | kmk_sed_SOURCES.solaris = \
|
|---|
| 67 | lib/strverscmp.c \
|
|---|
| 68 | lib/obstack.c \
|
|---|
| 69 | lib/getline.c
|
|---|
| 70 | kmk_sed_SOURCES.win = \
|
|---|
| 71 | lib/strverscmp.c \
|
|---|
| 72 | lib/obstack.c \
|
|---|
| 73 | lib/mkstemp.c \
|
|---|
| 74 | lib/getline.c \
|
|---|
| 75 | ../lib/startuphacks-win.c
|
|---|
| 76 |
|
|---|
| 77 | include $(FILE_KBUILD_FOOTER)
|
|---|
| 78 |
|
|---|
| 79 | #
|
|---|
| 80 | # Use checked in config.h instead of running ./configure for it.
|
|---|
| 81 | #
|
|---|
| 82 | config.h.$(KBUILD_TARGET) := config.h.$(KBUILD_TARGET)
|
|---|
| 83 |
|
|---|
| 84 | $(PATH_TARGET)/config.h: $(config.h.$(KBUILD_TARGET)) | $(call DIRDEP,$(PATH_TARGET))
|
|---|
| 85 | $(CP) $^ $@
|
|---|
| 86 |
|
|---|
| 87 | #
|
|---|
| 88 | # Use the regex lib shipped with sed and not anything installed on the system.
|
|---|
| 89 | #
|
|---|
| 90 | $(PATH_TARGET)/regex.h: lib/regex_.h | $(call DIRDEP,$(PATH_TARGET))
|
|---|
| 91 | $(CP) $^ $@
|
|---|
| 92 |
|
|---|