grep/dfa.c: Workaround for Visual C++ 2022 (amd64) optimizer bug. (same as sed)
[kbuild-mirror.git] / src / oldsed / Makefile.kmk
blobd9b00d56973e7bc8c741ed5314edc77c8fa038c9
1 # $Id$
2 ## @file
3 # Sub-Makefile for kmk_sed.
7 # Copyright (c) 2006-2010 knut st. osmundsen <bird-kBuild-spamx@anduin.net>
9 # This file is part of kBuild.
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 3 of the License, or
14 # (at your option) any later version.
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.
21 # You should have received a copy of the GNU General Public License
22 # along with kBuild. If not, see <http://www.gnu.org/licenses/>
26 SUB_DEPTH = ../..
27 include $(KBUILD_PATH)/subheader.kmk
30 # kmk_sed
32 PROGRAMS += kmk_sed
34 kmk_sed_TEMPLATE = BIN
35 kmk_sed_DEPS = \
36 $(kmk_sed_0_OUTDIR)/config.h \
37 $(kmk_sed_0_OUTDIR)/regex.h
38 kmk_sed_CLEAN = $(kmk_sed_DEPS)
39 kmk_sed_CFLAGS.solaris = -std=gnu99
40 kmk_sed_INCS = \
41 $(kmk_sed_0_OUTDIR) \
42 . \
43 lib \
44 intl
45 kmk_sed_DEFS = \
46 HAVE_CONFIG_H
47 ifdef KBUILD_SOLARIS_10
48 kmk_sed_CFLAGS += -std=gnu99
49 endif
50 kmk_sed_SOURCES = \
51 sed/sed.c \
52 lib/regex.c \
53 sed/compile.c \
54 sed/execute.c \
55 sed/regexp.c \
56 sed/fmt.c \
57 sed/mbcs.c \
58 lib/getopt1.c \
59 lib/getopt.c \
60 lib/utils.c
61 kmk_sed_SOURCES.darwin = \
62 lib/strverscmp.c \
63 lib/obstack.c \
64 lib/getline.c
65 kmk_sed_SOURCES.dragonfly = \
66 lib/strverscmp.c \
67 lib/obstack.c \
68 lib/getline.c
69 kmk_sed_SOURCES.freebsd = \
70 lib/strverscmp.c \
71 lib/obstack.c \
72 lib/getline.c
73 kmk_sed_SOURCES.haiku = \
74 lib/strverscmp.c \
75 lib/obstack.c
76 kmk_sed_SOURCES.netbsd = \
77 lib/strverscmp.c \
78 lib/obstack.c \
79 lib/getline.c
80 kmk_sed_SOURCES.openbsd = \
81 lib/strverscmp.c \
82 lib/obstack.c \
83 lib/getline.c
84 kmk_sed_SOURCES.solaris = \
85 lib/strverscmp.c \
86 lib/obstack.c \
87 lib/getline.c
88 kmk_sed_SOURCES.win = \
89 lib/strverscmp.c \
90 lib/obstack.c \
91 lib/mkstemp.c \
92 lib/getline.c \
93 ../lib/startuphacks-win.c
95 kmk_sed_LIBS.win = $(LIB_KUTIL) # for stdout optimizations.
97 include $(FILE_KBUILD_SUB_FOOTER)
100 # Use checked in config.h instead of running ./configure for it.
102 kmk_sed_config.h.$(KBUILD_TARGET) := $(kmk_sed_DEFPATH)/config.h.$(KBUILD_TARGET)
104 $(kmk_sed_0_OUTDIR)/config.h: $(kmk_sed_config.h.$(KBUILD_TARGET)) | $(call DIRDEP,$(kmk_sed_0_OUTDIR))
105 $(CP) -f $^ $@
108 # Use the regex lib shipped with sed and not anything installed on the system.
110 $(kmk_sed_0_OUTDIR)/regex.h: $(kmk_sed_DEFPATH)/lib/regex_.h | $(call DIRDEP,$(kmk_sed_0_OUTDIR))
111 $(CP) -f $^ $@