1 # Having a separate GNUmakefile lets me `include' both Makefile.maint
3 # This makefile is used only if you run GNU Make.
4 # It is necessary if you want to build targets usually of interest
5 # only to the maintainer.
7 # Copyright (C) 2001, 2003, 2006, 2007, 2008 Free Software Foundation,
10 # This file is part of GNU M4.
12 # GNU M4 is free software: you can redistribute it and/or modify
13 # it under the terms of the GNU General Public License as published by
14 # the Free Software Foundation, either version 3 of the License, or
15 # (at your option) any later version.
17 # GNU M4 is distributed in the hope that it will be useful,
18 # but WITHOUT ANY WARRANTY; without even the implied warranty of
19 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20 # GNU General Public License for more details.
22 # You should have received a copy of the GNU General Public License
23 # along with this program. If not, see <http://www.gnu.org/licenses/>.
25 # Systems where /bin/sh is not the default shell need this. The $(shell)
26 # command below won't work with e.g. stock DOS/Windows shells.
27 ifeq ($(wildcard /bin
/s
[h
]),/bin
/sh
)
30 # will be used only with the next shell-test line, then overwritten
31 # by a configured-in value
35 _have-Makefile
:= $(shell test -f Makefile
&& echo yes
)
37 # If the user runs GNU make but has not yet run ./configure,
38 # give them a diagnostic.
39 ifeq ($(_have-Makefile
),yes
)
41 # Make tar archive easier to reproduce.
42 export TAR_OPTIONS
= --owner
=0 --group
=0 --numeric-owner
46 _curr-ver
:= $(VERSION
)
48 # Ensure that $(VERSION) is up to date for dist-related targets, but not
49 # for others: running autoreconf and recompiling everything isn't cheap.
51 _is-dist-target
= $(filter-out %clean, \
52 $(filter dist% alpha beta major
,$(MAKECMDGOALS
)))
53 ifneq (,$(_is-dist-target
))
54 _curr-ver
:= $(shell cd
$(srcdir) && build-aux
/git-version-gen \
55 $(srcdir)/.tarball-version
)
56 ifneq ($(_curr-ver
),$(VERSION
))
57 $(info INFO
: running autoreconf for new version string
: $(_curr-ver
))
58 _dummy
:= $(shell (cd
$(srcdir) && rm -rf autom4te.cache
&& autoreconf
))
59 _created_version_file
= 1
64 ifneq ($(_curr-ver
),$(VERSION
))
65 _dummy
:= $(shell echo
$(_curr-ver
) > .version
)
68 ifneq ($(_created_version_file
),1)
69 _dummy
:= $(shell test -f .version || echo
$(VERSION
) > .version
)
72 include $(srcdir)/Makefile.cfg
73 include $(srcdir)/Makefile.maint
78 @echo There seems to be no Makefile in this directory.
1>&2
79 @echo
"You must run ./configure before running \`make'." 1>&2
82 check dist distcheck
install: all
86 # Tell version 3.79 and up of GNU make to not build goals in this
87 # directory in parallel. This is necessary in case someone tries to
88 # build multiple targets on one command line.