From: Bruce Korb Date: Wed, 17 Nov 2010 23:03:14 +0000 (-0800) Subject: derive an installable config.h for libposix X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=18e37ae78e8052340a6d82823da61c9a9bd9e1db;p=gnulib.git derive an installable config.h for libposix --- diff --git a/.gitignore b/.gitignore index a9a9402e46..92cb9b57de 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ allsnippets.tmp amsnippet.tmp testdir* *.diff +*.patch diff --git a/ChangeLog b/ChangeLog index ea219fb1bc..5f1f5cc02e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-11-17 Bruce Korb + + * libposix/lib/Makefile.am (lpx-config.h): generate the new header + and install it. + * libposix/lib/mk-lpx-config-h.sh: script for creating the header + by massaging the config.h header. + 2010-11-17 Bruce Korb * libposix/mk-tarball: script to make a libposix distribution diff --git a/libposix/lib/Makefile.am b/libposix/lib/Makefile.am index 3a7621b1f1..d6d27169f7 100644 --- a/libposix/lib/Makefile.am +++ b/libposix/lib/Makefile.am @@ -1,18 +1,22 @@ -BUILT_SOURCES = +BUILT_SOURCES = lpx-config.h SUFFIXES = -EXTRA_DIST = +EXTRA_DIST = mk-lpx-config-h.sh EXTRA_HEADERS = -nodist_pkginclude_HEADERS = +nodist_pkginclude_HEADERS = lpx-config.h nobase_nodist_pkginclude_HEADERS = pkginclude_HEADERS = version.h CLEANFILES = MOSTLYCLEANDIRS = -MOSTLYCLEANFILES = +MOSTLYCLEANFILES = lpx-config.h MAINTAINERCLEANFILES = include gnulib.mk libposix_la_LDFLAGS += -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) libposix_la_SOURCES += version.c + +version.o : lpx-config.h +lpx-config.h : $(top_builddir)/config.h + $(SHELL) $(srcdir)/mk-lpx-config-h.sh $(top_builddir)/config.h $@ diff --git a/libposix/lib/mk-lpx-config-h.sh b/libposix/lib/mk-lpx-config-h.sh new file mode 100755 index 0000000000..ad3805f977 --- /dev/null +++ b/libposix/lib/mk-lpx-config-h.sh @@ -0,0 +1,54 @@ +#! /bin/sh +# -*- Mode: Shell-script -*- + +# Copyright (C) 2002-2010 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 . + +infile=$1 +outfile=$2 + +{ + echo '/*' + sed '1,/^$/d;s/^#/ */;/http:\/\/www\.gnu\.org/q' $0 + + g='_LPX_CONFIG_H_GUARD' + cat < $outfile diff --git a/libposix/mk-tarball b/libposix/mk-tarball index ed724a4795..d3bc4eeba8 100755 --- a/libposix/mk-tarball +++ b/libposix/mk-tarball @@ -47,8 +47,10 @@ func_init() git --version >/dev/null 2>&1 \ || func_die "git is not operational" + test -d _b && rm -rf _b + case "$*" in - *'--clean'* ) + *'--clean'* | *'--clob'* ) git clean -f -x -d . ;; esac @@ -101,12 +103,12 @@ func_bootstrap() func_mkdistro() { - mkdir _b || die mkdir _b + mkdir _b || func_die mkdir _b cd _b - ../configure || die configure - make || die make - make distcheck || die make distcheck - mv libposix*.tar.gz .. || die cannot move tarball + ../configure || func_die configure + make || func_die make + make distcheck || func_die make distcheck + mv libposix*.tar.gz .. || func_die cannot move tarball } func_init ${1+"$@"}