diff options
Diffstat (limited to 'lib/gnulib.mk')
-rw-r--r-- | lib/gnulib.mk | 400 |
1 files changed, 400 insertions, 0 deletions
diff --git a/lib/gnulib.mk b/lib/gnulib.mk new file mode 100644 index 0000000..c10e764 --- /dev/null +++ b/lib/gnulib.mk @@ -0,0 +1,400 @@ +## Process this file with automake to produce Makefile.in. +# Copyright (C) 2004-2006 Free Software Foundation, Inc. +# +# This file is free software, distributed under the terms of the GNU +# General Public License. As a special exception to the GNU General +# Public License, this file may be distributed as part of a program +# that contains a configuration script generated by Autoconf, under +# the same distribution terms as the rest of that program. +# +# Generated by gnulib-tool. +# Reproduce by: gnulib-tool --import --dir=. --lib=libsed --source-base=lib --m4-base=build-aux --doc-base=doc --aux-dir=build-aux --makefile_name=gnulib.mk --no-libtool --macro-prefix=gl acl alloca getline getopt gettext localcharset memchr memcmp memmove mkstemp obstack pathmax regex stat-macros stdbool strerror strverscmp unlocked-io verify + + +noinst_LIBRARIES += libsed.a + +libsed_a_SOURCES = +libsed_a_LIBADD = $(LIBOBJS) +MOSTLYCLEANFILES += core *.stackdump + +## begin gnulib module acl + +EXTRA_DIST += acl.h + +## end gnulib module acl + +## begin gnulib module alloca + + +libsed_a_LIBADD += @ALLOCA@ +## end gnulib module alloca + +## begin gnulib module alloca-opt + +BUILT_SOURCES += $(ALLOCA_H) +EXTRA_DIST += alloca_.h + +# We need the following in order to create <alloca.h> when the system +# doesn't have one that works with the given compiler. +alloca.h: alloca_.h + cp -f $(srcdir)/alloca_.h $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += alloca.h alloca.h-t + +## end gnulib module alloca-opt + +## begin gnulib module configmake + +# Retrieve values of the variables through 'configure' followed by +# 'make', not directly through 'configure', so that a user who +# sets some of these variables consistently on the 'make' command +# line gets correct results. +# +# One advantage of this approach, compared to the classical +# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, +# is that it protects against the use of undefined variables. +# If, say, $(libdir) is not set in the Makefile, LIBDIR is not +# defined by this module, and code using LIBDIR gives a +# compilation error. +# +# Another advantage is that 'make' output is shorter. +# +# Listed in the same order as the GNU makefile conventions. +# The Automake-defined pkg* macros are appended, in the order +# listed in the Automake documentation. +configmake.h: Makefile + rm -f $@-t $@ + ( \ + echo '#define PREFIX "$(prefix)"'; \ + echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ + echo '#define BINDIR "$(bindir)"'; \ + echo '#define SBINDIR "$(sbindir)"'; \ + echo '#define LIBEXECDIR "$(libexecdir)"'; \ + echo '#define DATAROOTDIR "$(datarootdir)"'; \ + echo '#define DATADIR "$(datadir)"'; \ + echo '#define SYSCONFDIR "$(sysconfdir)"'; \ + echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ + echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define INCLUDEDIR "$(includedir)"'; \ + echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ + echo '#define DOCDIR "$(docdir)"'; \ + echo '#define INFODIR "$(infodir)"'; \ + echo '#define HTMLDIR "$(htmldir)"'; \ + echo '#define DVIDIR "$(dvidir)"'; \ + echo '#define PDFDIR "$(pdfdir)"'; \ + echo '#define PSDIR "$(psdir)"'; \ + echo '#define LIBDIR "$(libdir)"'; \ + echo '#define LISPDIR "$(lispdir)"'; \ + echo '#define LOCALEDIR "$(localedir)"'; \ + echo '#define MANDIR "$(mandir)"'; \ + echo '#define MANEXT "$(manext)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + :) | sed '/""/d' >$@-t + mv $@-t $@ +BUILT_SOURCES += configmake.h +CLEANFILES += configmake.h configmake.h-t + +## end gnulib module configmake + +## begin gnulib module exit + +libsed_a_SOURCES += exit.h + +## end gnulib module exit + +## begin gnulib module exitfail + +EXTRA_DIST += exitfail.h + +## end gnulib module exitfail + +## begin gnulib module getdelim + +EXTRA_DIST += getdelim.h + +## end gnulib module getdelim + +## begin gnulib module getline + +EXTRA_DIST += getline.h + +## end gnulib module getline + +## begin gnulib module getopt + +BUILT_SOURCES += $(GETOPT_H) +EXTRA_DIST += getopt_.h getopt_int.h + +# We need the following in order to create <getopt.h> when the system +# doesn't have one that works with the given compiler. +getopt.h: getopt_.h + cp -f $(srcdir)/getopt_.h $@-t + mv -f $@-t $@ +MOSTLYCLEANFILES += getopt.h getopt.h-t + +## end gnulib module getopt + +## begin gnulib module gettext + +# This is for those projects which use "gettextize --intl" to put a source-code +# copy of libintl into their package. In such projects, every Makefile.am needs +# -I$(top_builddir)/intl, so that <libintl.h> can be found in this directory. +# For the Makefile.ams in other directories it is the maintainer's +# responsibility; for the one from gnulib we do it here. +# This option has no effect when the user disables NLS (because then the intl +# directory contains no libintl.h file) or when the project does not use +# "gettextize --intl". +AM_CPPFLAGS += -I$(top_builddir)/intl + +## end gnulib module gettext + +## begin gnulib module gettext-h + +libsed_a_SOURCES += gettext.h + +## end gnulib module gettext-h + +## begin gnulib module localcharset + +libsed_a_SOURCES += localcharset.h localcharset.c +EXTRA_DIST += config.charset ref-add.sin ref-del.sin + +# We need the following in order to install a simple file in $(libdir) +# which is shared with other installed packages. We use a list of referencing +# packages so that "make uninstall" will remove the file if and only if it +# is not used by another installed package. +# On systems with glibc-2.1 or newer, the file is redundant, therefore we +# avoid installing it. + +all-local: charset.alias ref-add.sed ref-del.sed + +charset_alias = $(DESTDIR)$(libdir)/charset.alias +charset_tmp = $(DESTDIR)$(libdir)/charset.tmp +install-exec-local: all-local + test $(GLIBC21) != no || $(mkinstalldirs) $(DESTDIR)$(libdir) + if test -f $(charset_alias); then \ + sed -f ref-add.sed $(charset_alias) > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + else \ + if test $(GLIBC21) = no; then \ + sed -f ref-add.sed charset.alias > $(charset_tmp) ; \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias) ; \ + rm -f $(charset_tmp) ; \ + fi ; \ + fi + +uninstall-local: all-local + if test -f $(charset_alias); then \ + sed -f ref-del.sed $(charset_alias) > $(charset_tmp); \ + if grep '^# Packages using this file: $$' $(charset_tmp) \ + > /dev/null; then \ + rm -f $(charset_alias); \ + else \ + $(INSTALL_DATA) $(charset_tmp) $(charset_alias); \ + fi; \ + rm -f $(charset_tmp); \ + fi + +charset.alias: config.charset + rm -f t-$@ $@ + $(SHELL) $(srcdir)/config.charset '$(host)' > t-$@ + mv t-$@ $@ + +SUFFIXES += .sed .sin +.sin.sed: + rm -f t-$@ $@ + sed -e '/^#/d' -e 's/@''PACKAGE''@/$(PACKAGE)/g' $< > t-$@ + mv t-$@ $@ + +CLEANFILES += charset.alias ref-add.sed ref-del.sed + +## end gnulib module localcharset + +## begin gnulib module mbchar + +libsed_a_SOURCES += mbchar.h + +## end gnulib module mbchar + +## begin gnulib module mbuiter + +libsed_a_SOURCES += mbuiter.h + +## end gnulib module mbuiter + +## begin gnulib module mkstemp + +EXTRA_DIST += mkstemp.h + +## end gnulib module mkstemp + +## begin gnulib module pathmax + +EXTRA_DIST += pathmax.h + +## end gnulib module pathmax + +## begin gnulib module quote + +EXTRA_DIST += quote.h + +## end gnulib module quote + +## begin gnulib module quotearg + +EXTRA_DIST += quotearg.h + +## end gnulib module quotearg + +## begin gnulib module regex + +EXTRA_DIST += regcomp.c regex.h regex_internal.c regex_internal.h regexec.c + +## end gnulib module regex + +## begin gnulib module stat-macros + +EXTRA_DIST += stat-macros.h + +## end gnulib module stat-macros + +## begin gnulib module stdbool + +BUILT_SOURCES += $(STDBOOL_H) +EXTRA_DIST += stdbool_.h + +# We need the following in order to create <stdbool.h> when the system +# doesn't have one that works. +stdbool.h: stdbool_.h + rm -f $@-t $@ + sed -e 's/@''HAVE__BOOL''@/$(HAVE__BOOL)/g' < $(srcdir)/stdbool_.h > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdbool.h stdbool.h-t + +## end gnulib module stdbool + +## begin gnulib module stdint + +BUILT_SOURCES += $(STDINT_H) +EXTRA_DIST += stdint_.h + +# We need the following in order to create <stdint.h> when the system +# doesn't have one that works with the given compiler. +stdint.h: stdint_.h + rm -f $@-t $@ + sed -e 's/@''HAVE_WCHAR_H''@/$(HAVE_WCHAR_H)/g' \ + -e 's/@''HAVE_STDINT_H''@/$(HAVE_STDINT_H)/g' \ + -e 's|@''ABSOLUTE_STDINT_H''@|$(ABSOLUTE_STDINT_H)|g' \ + -e 's/@''HAVE_SYS_TYPES_H''@/$(HAVE_SYS_TYPES_H)/g' \ + -e 's/@''HAVE_INTTYPES_H''@/$(HAVE_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_INTTYPES_H''@/$(HAVE_SYS_INTTYPES_H)/g' \ + -e 's/@''HAVE_SYS_BITYPES_H''@/$(HAVE_SYS_BITYPES_H)/g' \ + -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''BITSIZEOF_PTRDIFF_T''@/$(BITSIZEOF_PTRDIFF_T)/g' \ + -e 's/@''PTRDIFF_T_SUFFIX''@/$(PTRDIFF_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIG_ATOMIC_T''@/$(BITSIZEOF_SIG_ATOMIC_T)/g' \ + -e 's/@''HAVE_SIGNED_SIG_ATOMIC_T''@/$(HAVE_SIGNED_SIG_ATOMIC_T)/g' \ + -e 's/@''SIG_ATOMIC_T_SUFFIX''@/$(SIG_ATOMIC_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_SIZE_T''@/$(BITSIZEOF_SIZE_T)/g' \ + -e 's/@''SIZE_T_SUFFIX''@/$(SIZE_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WCHAR_T''@/$(BITSIZEOF_WCHAR_T)/g' \ + -e 's/@''HAVE_SIGNED_WCHAR_T''@/$(HAVE_SIGNED_WCHAR_T)/g' \ + -e 's/@''WCHAR_T_SUFFIX''@/$(WCHAR_T_SUFFIX)/g' \ + -e 's/@''BITSIZEOF_WINT_T''@/$(BITSIZEOF_WINT_T)/g' \ + -e 's/@''HAVE_SIGNED_WINT_T''@/$(HAVE_SIGNED_WINT_T)/g' \ + -e 's/@''WINT_T_SUFFIX''@/$(WINT_T_SUFFIX)/g' \ + < $(srcdir)/stdint_.h > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += stdint.h stdint.h-t + +## end gnulib module stdint + +## begin gnulib module strcase + +libsed_a_SOURCES += strcase.h + +## end gnulib module strcase + +## begin gnulib module strnlen1 + +libsed_a_SOURCES += strnlen1.h strnlen1.c + +## end gnulib module strnlen1 + +## begin gnulib module strverscmp + +EXTRA_DIST += strverscmp.h + +## end gnulib module strverscmp + +## begin gnulib module sys_stat + +BUILT_SOURCES += $(SYS_STAT_H) +EXTRA_DIST += stat_.h + +# We need the following in order to create <sys/stat.h> when the system +# has one that is incomplete. +sys/stat.h: stat_.h + test -d sys || mkdir sys + rm -f $@-t $@ + sed -e 's|@''ABSOLUTE_SYS_STAT_H''@|$(ABSOLUTE_SYS_STAT_H)|g' \ + < $(srcdir)/stat_.h > $@-t + mv $@-t $@ +MOSTLYCLEANFILES += sys/stat.h sys/stat.h-t +MOSTLYCLEANDIRS += sys + +## end gnulib module sys_stat + +## begin gnulib module unistd + +BUILT_SOURCES += $(UNISTD_H) + +# We need the following in order to create an empty placeholder for +# <unistd.h> when the system doesn't have one. +unistd.h: + echo '/* Empty placeholder for $@. */' >$@ +MOSTLYCLEANFILES += unistd.h + +## end gnulib module unistd + +## begin gnulib module unlocked-io + +EXTRA_DIST += unlocked-io.h + +## end gnulib module unlocked-io + +## begin gnulib module verify + +libsed_a_SOURCES += verify.h + +## end gnulib module verify + +## begin gnulib module wcwidth + +libsed_a_SOURCES += wcwidth.h + +## end gnulib module wcwidth + +## begin gnulib module xalloc + +EXTRA_DIST += xalloc.h + +## end gnulib module xalloc + +## begin gnulib module xalloc-die + +libsed_a_SOURCES += xalloc-die.c + +## end gnulib module xalloc-die + + +mostlyclean-local: mostlyclean-generic + @test -z "$(MOSTLYCLEANDIRS)" || \ + for dir in $(MOSTLYCLEANDIRS); do \ + if test -d $$dir; then \ + echo "rmdir $$dir"; rmdir $$dir; \ + fi; \ + done |