# HG changeset patch # User Bruce Korb # Date 1290034994 28800 # Node ID a852b7d095462e6f7b800005192fc8dd51a5515c # Parent aa63a2324d1570ead9c857b84047567239804019 derive an installable config.h for libposix diff --git a/.gitignore b/.gitignore --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,4 @@ amsnippet.tmp testdir* *.diff +*.patch diff --git a/ChangeLog b/ChangeLog --- 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 --- 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 --- /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 --- a/libposix/mk-tarball +++ b/libposix/mk-tarball @@ -47,8 +47,10 @@ 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_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+"$@"}