summaryrefslogtreecommitdiff
path: root/sed/local.mk
diff options
context:
space:
mode:
Diffstat (limited to 'sed/local.mk')
-rw-r--r--sed/local.mk57
1 files changed, 57 insertions, 0 deletions
diff --git a/sed/local.mk b/sed/local.mk
new file mode 100644
index 0000000..dd1da0a
--- /dev/null
+++ b/sed/local.mk
@@ -0,0 +1,57 @@
+# Copyright (C) 2016 Free Software Foundation, Inc.
+
+# This program 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 3 of the License, or
+# (at your option) any later version.
+
+# This program 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 this program. If not, see <http://www.gnu.org/licenses/>.
+
+bin_PROGRAMS += sed/sed
+
+localedir = $(datadir)/locale
+
+sed_sed_SOURCES = \
+ sed/compile.c \
+ sed/execute.c \
+ sed/mbcs.c \
+ sed/regexp.c \
+ sed/sed.c \
+ sed/utils.c
+
+noinst_HEADERS += \
+ sed/sed.h \
+ sed/utils.h
+
+sed_sed_CPPFLAGS = $(AM_CPPFLAGS) -DLOCALEDIR=\"$(localedir)\"
+sed_sed_CFLAGS = $(AM_CFLAGS) $(WARN_CFLAGS) $(WERROR_CFLAGS)
+sed_sed_LDADD = sed/libver.a lib/libsed.a $(INTLLIBS) $(LIB_ACL) $(LIB_SELINUX)
+sed_sed_DEPENDENCIES = lib/libsed.a sed/libver.a
+
+$(sed_sed_OBJECTS): $(BUILT_SOURCES)
+
+BUILT_SOURCES += sed/version.c
+DISTCLEANFILES += sed/version.c
+sed/version.c: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf '#include <config.h>\n' > $@t
+ $(AM_V_at)printf 'char const *Version = "$(PACKAGE_VERSION)";\n' >> $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+BUILT_SOURCES += sed/version.h
+DISTCLEANFILES += sed/version.h
+sed/version.h: Makefile
+ $(AM_V_GEN)rm -f $@
+ $(AM_V_at)printf 'extern char const *Version;\n' > $@t
+ $(AM_V_at)chmod a-w $@t
+ $(AM_V_at)mv $@t $@
+
+noinst_LIBRARIES += sed/libver.a
+nodist_sed_libver_a_SOURCES = sed/version.c sed/version.h