[Top][All Lists]

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

branch-1_4 hacking aids

From: Eric Blake
Subject: branch-1_4 hacking aids
Date: Sun, 02 Jul 2006 01:33:24 +0000

I am checking in the commit script already present on CVS head
(not attached here) as well as the file HACKING (not intended
for tarballs, just CVS), borrowing heavily from libtool for
inspiration.  Then in the tarball, I liked how coreutils used
GNUmakefile to make the use of Makefile.maint easier for
developers with GNU make.

When I get a chance to port this to CVS head, I will look into
using the Makefile.maint provided by gnuilb rather than our
own hand-rolled one.  But that proved too invasive for the
branch for my liking.

2006-07-01  Eric Blake  <address@hidden>

        * GNUmakefile: New file, borrowed from coreutils.
        * Makefile.am (EXTRA_DIST): Distribute GNUmakefile.
        * Makefile.maint (Makefile): Delete this rule, now that
        GNUmakefile includes Makefile.
Index: Makefile.am
RCS file: /sources/m4/m4/Makefile.am,v
retrieving revision
diff -u -p -r1.25.2.5 Makefile.am
--- Makefile.am 22 Jun 2006 14:54:07 -0000
+++ Makefile.am 2 Jul 2006 01:31:48 -0000
@@ -21,7 +21,8 @@
 ## Written by Gary V. Vaughan <address@hidden>
 SUBDIRS = examples lib src doc checks
-EXTRA_DIST = bootstrap c-boxes.el Makefile.maint m4/gnulib-cache.m4
+EXTRA_DIST = bootstrap c-boxes.el GNUmakefile Makefile.maint \
+       m4/gnulib-cache.m4
 ## maintainer-clean should remove as much as possible that ./bootstrap can
 ## recreate.  In the m4 directory, keep only gnulib-cache.m4.
Index: Makefile.maint
RCS file: /sources/m4/m4/Attic/Makefile.maint,v
retrieving revision
diff -u -p -r1.1.2.4 Makefile.maint
--- Makefile.maint      17 Jun 2006 23:57:32 -0000
+++ Makefile.maint      2 Jul 2006 01:31:48 -0000
@@ -17,18 +17,6 @@
 ## the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
 ## Boston, MA 02110-1301, USA.
-# Need various variables defined by configure, a lot easier to just
-# include the Makefile than figure out a way to put them in here too
-include Makefile
-       @echo " *** Run maintainer rules from the build tree, with"
-       @echo " *** \`make -f../Makefile.maint' for example, where"
-       @echo " *** \`../' is the relative path back to the directory"
-       @echo " *** that contains the \`Makefile.maint'.  Alternatively,"
-       @echo " *** run \`./configure' in the source tree for an in"
-       @echo " *** tree build."
-       @exit 1
 TEXI2HTML = texi2html
 .PHONY: cvs-release
Index: GNUmakefile
RCS file: GNUmakefile
diff -N GNUmakefile
--- /dev/null   1 Jan 1970 00:00:00 -0000
+++ GNUmakefile 2 Jul 2006 01:31:48 -0000
@@ -0,0 +1,57 @@
+# Having a separate GNUmakefile lets me `include' both Makefile.maint
+# and Makefile.
+# This makefile is used only if you run GNU Make.
+# It is necessary if you want to build targets usually of interest
+# only to the maintainer.
+# Copyright (C) 2001, 2003, 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
+# 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, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# Systems where /bin/sh is not the default shell need this.  The $(shell)
+# command below won't work with e.g. stock DOS/Windows shells.
+ifeq ($(wildcard /bin/s[h]),/bin/sh)
+SHELL = /bin/sh
+# will be used only with the next shell-test line, then overwritten
+# by a configured-in value
+SHELL = sh
+have-Makefile := $(shell test -f Makefile && echo yes)
+# If the user runs GNU make but has not yet run ./configure,
+# give them a diagnostic.
+ifeq ($(have-Makefile),yes)
+# Make tar archive easier to reproduce.
+export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+include Makefile
+include $(srcdir)/Makefile.maint
+       @echo There seems to be no Makefile in this directory.   1>&2
+       @echo "You must run ./configure before running \`make'." 1>&2
+       @exit 1
+# Tell version 3.79 and up of GNU make to not build goals in this
+# directory in parallel.  This is necessary in case someone tries to
+# build multiple targets on one command line.

Attachment: HACKING
Description: Binary data

reply via email to

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