m4-patches
[Top][All Lists]
Advanced

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

FYI: branch-1_4 now uses automake


From: Eric Blake
Subject: FYI: branch-1_4 now uses automake
Date: Mon, 29 May 2006 19:37:37 +0000

I thought the benefits were worth it, so I converted the 1.4 branch
to use automake.  Hand-maintaining Makefile.in to meet GNU Coding
standards was proving too effort-intensive.  This is not quite
the same as the non-recursive Makefile.am on CVS head, but
it did the job, as tested by 'make distcheck'.  I had problems
converting checks/Makefile.in because of its use of wildcards for the
generated test names, which CVS head solved by using autotest.

This patch also obsoletes some entries in Makefile.maint, but I
did not attempt changes there.  I wonder if it is worth copying the
idea of coreutils and adding a GNUmakefile that includes both
Makefile.maint and Makefile so that you don't have to do
'make -f Makefile.maint' if you use GNU make.

2006-05-29  Eric Blake  <address@hidden>

        * doc/m4.texinfo (Maketemp): Work even when running 'make check'
        in read-only dir.

        Use automake.
        * Makefile.am: New file.
        * doc/Makefile.am: Ditto.
        * examples/Makefile.am: Ditto.
        * lib/Makefile.am: Ditto.
        * src/Makefile.am: Ditto.
        * acinclude.m4: New file, renamed from aclocal.m4.
        * configure.ac (AM_INIT_AUTOMAKE): Invoke new macro.
        (AC_ARG_PROGRAM): Now redundant.
        (STACKOVF): Turn into automake conditional.
        (AC_CONFIG_COMMANDS): stamp-h is a command, not a file.
        * checks/Makefile.in: Converting this dir to automake was not
        trivial; for now, just add missing targets demanded by top-level.
        * INSTALL: Remove files that are now generated from CVS.
        * Makefile.in: Ditto.
        * aclocal.m4: Ditto.
        * install-sh: Ditto.
        * mkinstalldirs: Ditto.
        * doc/Makefile.in: Ditto.
        * doc/texinfo.tex: Ditto.
        * examples/Makefile.in: Ditto.
        * lib/Makefile.in: Ditto.
        * src/Makefile.in: Ditto.

Files removed from CVS are omitted from the patch.
Index: Makefile.am
===================================================================
RCS file: Makefile.am
diff -N Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ Makefile.am 29 May 2006 18:13:35 -0000
@@ -0,0 +1,25 @@
+## This file is part of GNU M4.
+##
+## Copyright (C) 2000, 2001, 2003, 2004, 2005, 2006 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 2 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+##
+## Written by Gary V. Vaughan <address@hidden>
+
+SUBDIRS = doc examples lib src checks
+EXTRA_DIST = bootstrap c-boxes.el Makefile.maint
+DISTCLEANFILES = stamp-h
Index: acinclude.m4
===================================================================
RCS file: acinclude.m4
diff -N acinclude.m4
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ acinclude.m4        29 May 2006 18:13:35 -0000
@@ -0,0 +1,20 @@
+# Local additions to Autoconf macros.
+# Copyright (C) 1992, 1994, 2004, 2006 Free Software Foundation, Inc.
+# Francois Pinard <address@hidden>, 1992.
+
+# Check if --with-dmalloc was given.
+
+AC_DEFUN([M4_WITH_DMALLOC],
+[AC_MSG_CHECKING([if malloc debugging is wanted])
+AC_ARG_WITH([dmalloc],
+[AS_HELP_STRING([--with-dmalloc],
+   [use dmalloc, as in dmalloc.tar.gz from
+ @/ftp.antaire.com:antaire/src/dmalloc.])],
+[if test "$withval" = yes; then
+  AC_MSG_RESULT([yes])
+  AC_DEFINE([WITH_DMALLOC], [1], [Define to 1 if malloc debugging is enabled])
+  LIBS="$LIBS -ldmalloc"
+  LDFLAGS="$LDFLAGS -g"
+else
+  AC_MSG_RESULT([no])
+fi], [AC_MSG_RESULT([no])])])
Index: configure.ac
===================================================================
RCS file: /sources/m4/m4/configure.ac,v
retrieving revision 1.36.2.8
diff -u -p -r1.36.2.8 configure.ac
--- configure.ac        27 May 2006 18:11:23 -0000      1.36.2.8
+++ configure.ac        29 May 2006 18:13:35 -0000
@@ -19,6 +19,7 @@
 
 AC_PREREQ([2.59])
 AC_INIT([GNU M4], [1.4.4a], address@hidden)
+AM_INIT_AUTOMAKE([1.9.6 dist-bzip2 gnu])
 PACKAGE=$PACKAGE_TARNAME; AC_SUBST([PACKAGE])
 VERSION=$PACKAGE_VERSION; AC_SUBST([VERSION])
 
@@ -26,7 +27,6 @@ m4_pattern_forbid([^M4_])
 
 AC_CONFIG_SRCDIR([src/m4.h])
 AC_CONFIG_HEADERS([config.h:config-h.in])
-AC_ARG_PROGRAM
 
 AC_PROG_AWK
 AC_PROG_CC
@@ -81,11 +81,10 @@ choke me            /* SA_ONSTACK and/or SV_ONSTAC
   fi
 fi
 AC_MSG_RESULT([$use_stackovf])
+AM_CONDITIONAL([STACKOVF], [test "$use_stackovf" = yes])
 if test "$use_stackovf" = yes; then
   AC_DEFINE([USE_STACKOVF], [1],
     [Define to 1 if using stack overflow detection])
-  STACKOVF=stackovf.$(OBJEXT)
-  AC_SUBST([STACKOVF])
   AC_EGREP_HEADER([rlim_t], [sys/resource.h], [],
     [AC_DEFINE([rlim_t], [int],
       [Define to int if rlim_t is not defined in sys/resource.h])
@@ -114,7 +113,7 @@ AC_ARG_ENABLE([changeword],
 
 M4_WITH_DMALLOC
 
-AC_CONFIG_FILES([stamp-h], [[test -z "$CONFIG_HEADERS" || date > stamp-h]])
+AC_CONFIG_COMMANDS([stamp-h], [[test -z "$CONFIG_HEADERS" || date > stamp-h]])
 
 AC_CONFIG_FILES([Makefile
                 doc/Makefile
Index: checks/Makefile.in
===================================================================
RCS file: /sources/m4/m4/checks/Attic/Makefile.in,v
retrieving revision 1.1.1.1.2.3
diff -u -p -r1.1.1.1.2.3 Makefile.in
--- checks/Makefile.in  11 May 2006 12:56:19 -0000      1.1.1.1.2.3
+++ checks/Makefile.in  29 May 2006 18:13:35 -0000
@@ -21,6 +21,7 @@ VERSION = @VERSION@
 
 SHELL = /bin/sh
 
+bindir = @bindir@
 srcdir = @srcdir@
 VPATH = @srcdir@
 
@@ -40,12 +41,19 @@ stamp-checks: get-them ../doc/m4.texinfo
 
 install:
 
+dvi pdf ps html info:
+install-dvi install-pdf install-ps install-html install-info:
+
 uninstall:
 
 check: stamp-checks
        PATH=`pwd`/../src:$$PATH; export PATH; \
        cd $(srcdir) && ./check-them $(CHECKS)
 
+installcheck: stamp-checks
+       PATH=$(bindir):$$PATH; export PATH; \
+       cd $(srcdir) && ./check-them $(CHECKS)
+
 tags:
 
 mostlyclean:
@@ -58,6 +66,8 @@ distclean: clean
 realclean: distclean
        rm -f $(CHECKS) stamp-checks
 
+distdir: dist
+
 dist: $(DISTFILES) stamp-checks
        @echo "Copying distribution files"
        @for file in $(DISTFILES); do \
Index: doc/m4.texinfo
===================================================================
RCS file: /sources/m4/m4/doc/m4.texinfo,v
retrieving revision 1.1.1.1.2.13
diff -u -p -r1.1.1.1.2.13 m4.texinfo
--- doc/m4.texinfo      29 May 2006 16:38:07 -0000      1.1.1.1.2.13
+++ doc/m4.texinfo      29 May 2006 18:13:36 -0000
@@ -3033,8 +3033,8 @@ maketemp(`/tmp/fooXXXXXX')
 @c This test makes sure maketemp gets testsuite coverage, but is
 @c somewhat complex for use in the manual.
 @example
-define(`file1', maketemp(`./fooXXXXXX'))dnl
-define(`file2', maketemp(`./fooXXXXXX'))dnl
+define(`file1', maketemp(`/tmp/fooXXXXXX'))dnl
+define(`file2', maketemp(`/tmp/fooXXXXXX'))dnl
 ifelse(file1, file2, `same', `different')
 @result{}different
 syscmd(`rm 'file1 file2)
Index: doc/Makefile.am
===================================================================
RCS file: doc/Makefile.am
diff -N doc/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ doc/Makefile.am     29 May 2006 18:13:36 -0000
@@ -0,0 +1,22 @@
+## This file is part of GNU M4.
+##
+## Copyright (C) 2006 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 2 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+##
+## This file written by Eric Blake <address@hidden>
+
+info_TEXINFOS = m4.texinfo
Index: examples/Makefile.am
===================================================================
RCS file: examples/Makefile.am
diff -N examples/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ examples/Makefile.am        29 May 2006 18:13:36 -0000
@@ -0,0 +1,26 @@
+## This file is part of GNU M4.
+##
+## Copyright (C) 2006 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 2 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+##
+## This file written by Eric Blake <address@hidden>
+
+EXTRA_DIST = capitalize.m4 comments.m4 ddivert.m4 \
+debug.m4 esyscmd.m4 exp.m4 file.m4 foreach.m4 forloop.m4 fstab.m4 \
+hanoi.m4 incl-test.m4 include.m4 indir.m4 misc.m4 multiquotes.m4 \
+patsubst.m4 pushpop.m4 regexp.m4 reverse.m4 stackovf.sh sync-lines.m4 \
+sysv-args.m4 trace.m4 translit.m4 undivert.incl undivert.m4 wrap.m4
Index: lib/Makefile.am
===================================================================
RCS file: lib/Makefile.am
diff -N lib/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ lib/Makefile.am     29 May 2006 18:13:36 -0000
@@ -0,0 +1,25 @@
+## This file is part of GNU M4.
+##
+## Copyright (C) 2006 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 2 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+##
+## This file written by Eric Blake <address@hidden>
+
+noinst_LIBRARIES = libm4.a
+libm4_a_SOURCES = getopt.h obstack.h regex.h \
+regex.c getopt.c getopt1.c error.c obstack.c xmalloc.c xstrdup.c
+libm4_a_LIBADD = $(LIBOBJS) $(ALLOCA)
Index: src/Makefile.am
===================================================================
RCS file: src/Makefile.am
diff -N src/Makefile.am
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ src/Makefile.am     29 May 2006 18:13:36 -0000
@@ -0,0 +1,29 @@
+## This file is part of GNU M4.
+##
+## Copyright (C) 2006 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 2 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; see the file COPYING.  If not, write to
+## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
+## Boston, MA 02110-1301, USA.
+##
+## This file written by Eric Blake <address@hidden>
+
+AM_CPPFLAGS = -I $(top_srcdir)/lib
+bin_PROGRAMS = m4
+m4_SOURCES = m4.h m4.c builtin.c debug.c eval.c format.c freeze.c input.c \
+macro.c output.c path.c symtab.c
+if STACKOVF
+m4_SOURCES += stackovf.c
+endif
+m4_LDADD = ../lib/libm4.a

reply via email to

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