bug-cppi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug-cppi] minor clean-up/improvement patches


From: Jim Meyering
Subject: [bug-cppi] minor clean-up/improvement patches
Date: Fri, 20 Apr 2012 21:31:47 +0200

FYI,

>From 3e01d9c89abf241d7ab7f672b04dd7e853f50ea9 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 18 Apr 2012 19:22:27 +0200
Subject: [PATCH 1/4] maint: remove unused files

* build-aux/ChangeLog: Remove file.
* lib/.cppi-disable: Likewise.
* tests/.gitignore: Likewise.
---
 build-aux/ChangeLog |  226 ---------------------------------------------------
 lib/.cppi-disable   |   13 ---
 tests/.gitignore    |    2 -
 3 files changed, 241 deletions(-)
 delete mode 100644 build-aux/ChangeLog
 delete mode 100644 lib/.cppi-disable
 delete mode 100644 tests/.gitignore

diff --git a/build-aux/ChangeLog b/build-aux/ChangeLog
...[elided]
diff --git a/lib/.cppi-disable b/lib/.cppi-disable
deleted file mode 100644
index 2cf7fa2..0000000
--- a/lib/.cppi-disable
+++ /dev/null
@@ -1,13 +0,0 @@
-alloca.h
-alloca_.h
-error.h
-exit.h
-getopt.c
-getopt1.c
-getopt_.h
-getopt_int.h
-gettext.h
-obstack.h
-stdbool_.h
-stpcpy.h
-unlocked-io.h
diff --git a/tests/.gitignore b/tests/.gitignore
deleted file mode 100644
index 282522d..0000000
--- a/tests/.gitignore
+++ /dev/null
@@ -1,2 +0,0 @@
-Makefile
-Makefile.in
--
1.7.10.208.gb4267


>From 5b387b66940012527c28706783776582d2eb6ccd Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Wed, 18 Apr 2012 20:24:49 +0200
Subject: [PATCH 2/4] build: tell bootstrap to sync itself from gnulib

* bootstrap.conf (bootstrap_sync): Set it.
* bootstrap: Update from gnulib.
---
 bootstrap      |    8 +++++---
 bootstrap.conf |    3 +++
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/bootstrap b/bootstrap
index 6910abf..16dc15c 100755
--- a/bootstrap
+++ b/bootstrap
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Print a version string.
-scriptversion=2012-01-21.16; # UTC
+scriptversion=2012-04-16.16; # UTC

 # Bootstrap this package from checked-out sources.

@@ -423,7 +423,7 @@ check_versions() {
       $use_git || continue
     fi
     # Honor $APP variables ($TAR, $AUTOCONF, etc.)
-    appvar=`echo $app | tr '[a-z]-' '[A-Z]_'`
+    appvar=`echo $app | LC_ALL=C tr '[a-z]-' '[A-Z]_'`
     test "$appvar" = TAR && appvar=AMTAR
     case $appvar in
         GZIP) ;; # Do not use $GZIP:  it contains gzip options.
@@ -604,7 +604,7 @@ if $bootstrap_sync; then
 fi

 gnulib_tool=$GNULIB_SRCDIR/gnulib-tool
-<$gnulib_tool || exit
+<$gnulib_tool || exit $?

 # Get translations.

@@ -863,6 +863,8 @@ if test $with_gettext = yes; then
     }
   ' po/Makevars.template >po/Makevars || exit 1

+  cat $GNULIB_SRCDIR/build-aux/po/Makefile.in.in > po/Makefile.in.in || exit 1
+
   if test -d runtime-po; then
     # Similarly for runtime-po/Makevars, but not quite the same.
     rm -f runtime-po/Makevars
diff --git a/bootstrap.conf b/bootstrap.conf
index 4bcc89c..8b7e002 100644
--- a/bootstrap.conf
+++ b/bootstrap.conf
@@ -140,3 +140,6 @@ bootstrap_epilogue()

 # Automake requires that ChangeLog exist.
 touch ChangeLog
+
+# Tell bootstrap to sync itself from gnulib.
+bootstrap_sync=true
--
1.7.10.208.gb4267


>From 7fc2a51c1882e4d109bf0645d314a062c3e2af34 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 20 Apr 2012 20:25:54 +0200
Subject: [PATCH 3/4] build: create src/ and man/ via configure, not via
 Makefile rules

* configure.ac: Create the directories here, not via commands
in four separate rules distributed across two files:
* man/local.mk (.x.1): Remove mkdir -p.
* src/local.mk (src/localedir.h): Likewise.
(src/cppi.c): Likewise.
(src/cpp.h): Likewise.
---
 configure.ac |    5 +++++
 man/local.mk |    5 ++---
 src/local.mk |    3 ---
 3 files changed, 7 insertions(+), 6 deletions(-)

diff --git a/configure.ac b/configure.ac
index 2c91d04..bab7390 100644
--- a/configure.ac
+++ b/configure.ac
@@ -98,5 +98,10 @@ do
   esac
 done

+# Now that configure no longer creates src/ or man/, create them here.
+# Doing it this way is more maintainable that adding to each individual
+# Makefile rule that creates a file in one of those sub-directories.
+$MKDIR_P man src
+
 AC_CONFIG_FILES([Makefile po/Makefile.in])
 AC_OUTPUT
diff --git a/man/local.mk b/man/local.mk
index 4206588..1e1f134 100644
--- a/man/local.mk
+++ b/man/local.mk
@@ -13,10 +13,9 @@ man/cppi.1: $(common_dep) $(srcdir)/man/cppi.x src/cppi
 SUFFIXES += .x .1

 # FIXME: when we depend on GNU make, remove $$prog; use $(*F) in its place
-# Also, use a %.1: man/%.x pattern rule and remove the mkdir (required for
-# non-srcdir builds).
+# Also, use a %.1: man/%.x pattern rule.
 .x.1:
-       $(AM_V_GEN)mkdir -p man;                                \
+       $(AM_V_GEN):;                                           \
        PATH=src$(PATH_SEPARATOR)$$PATH; export PATH;           \
        prog=`basename $*`;                                     \
        $(HELP2MAN)                                             \
diff --git a/src/local.mk b/src/local.mk
index 05527da..01231d1 100644
--- a/src/local.mk
+++ b/src/local.mk
@@ -38,7 +38,6 @@ BUILT_SOURCES += src/localedir.h
 DISTCLEANFILES += src/localedir.h
 src/localedir.h: src/local.mk
        $(AM_V_GEN)rm -f address@hidden
-       $(AM_V_at)mkdir -p src
        $(AM_V_at)echo '#define LOCALEDIR "$(localedir)"' >address@hidden
        $(AM_V_at)chmod a-w address@hidden
        $(AM_V_at)cmp address@hidden $@ > /dev/null 2>&1 && rm -f 
address@hidden \
@@ -59,14 +58,12 @@ AM_LFLAGS = $(flex_debug) $(flex_optimize) $(flex_8_bit)
 # I prefer to make generated .c files unwritable.
 src/cppi.c: src/cppi.l
        $(AM_V_GEN)rm -f $@
-       $(AM_V_at)mkdir -p src
        $(AM_V_at)$(LEXCOMPILE) $(top_srcdir)/src/cppi.l
        $(AM_V_at)chmod a-w $(LEX_OUTPUT_ROOT).c
        $(AM_V_at)mv $(LEX_OUTPUT_ROOT).c $@

 src/cpp.h: src/cpp.gp src/local.mk
        $(AM_V_GEN)rm -f address@hidden $@
-       $(AM_V_at)mkdir -p src
        $(AM_V_at)(                                                     \
         echo '/* This file is generated automatically from cpp.gp.  */'; \
         echo;                                                          \
--
1.7.10.208.gb4267


>From 7a338ced0e05ce8c91bcdf3c1becb4fa520d1787 Mon Sep 17 00:00:00 2001
From: Jim Meyering <address@hidden>
Date: Fri, 20 Apr 2012 20:30:56 +0200
Subject: [PATCH 4/4] build: require latest version of gettext

* configure.ac: Require gettext version 0.18.1.
---
 configure.ac |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure.ac b/configure.ac
index bab7390..e3d4b0c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -81,7 +81,7 @@ AC_HEADER_DIRENT
 AC_HEADER_ASSERT

 AM_GNU_GETTEXT([external])
-AM_GNU_GETTEXT_VERSION([0.17])
+AM_GNU_GETTEXT_VERSION([0.18.1])

 # This is copied from bison.  FIXME: keep it in sync!
 # We use gnulib, but from lib/local.mk instead of lib/Makefile.am.
--
1.7.10.208.gb4267



reply via email to

[Prev in Thread] Current Thread [Next in Thread]