Blame bin/Makefile.am

Packit Service 9646c7
# Make Autoconf commands.
Packit Service 9646c7
Packit Service 9646c7
# Copyright (C) 1999-2007, 2009-2012 Free Software Foundation, Inc.
Packit Service 9646c7
Packit Service 9646c7
# This program is free software: you can redistribute it and/or modify
Packit Service 9646c7
# it under the terms of the GNU General Public License as published by
Packit Service 9646c7
# the Free Software Foundation, either version 3 of the License, or
Packit Service 9646c7
# (at your option) any later version.
Packit Service 9646c7
Packit Service 9646c7
# This program is distributed in the hope that it will be useful,
Packit Service 9646c7
# but WITHOUT ANY WARRANTY; without even the implied warranty of
Packit Service 9646c7
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
Packit Service 9646c7
# GNU General Public License for more details.
Packit Service 9646c7
Packit Service 9646c7
# You should have received a copy of the GNU General Public License
Packit Service 9646c7
# along with this program.  If not, see <http://www.gnu.org/licenses/>.
Packit Service 9646c7
Packit Service 9646c7
include ../lib/freeze.mk
Packit Service 9646c7
Packit Service 9646c7
bin_SCRIPTS = autom4te \
Packit Service 9646c7
	      autoconf autoheader autoreconf ifnames autoscan autoupdate
Packit Service 9646c7
Packit Service 9646c7
EXTRA_DIST = autoconf.as autoheader.in autoreconf.in autoupdate.in ifnames.in \
Packit Service 9646c7
	     autoscan.in autom4te.in
Packit Service 9646c7
Packit Service 9646c7
# Files that should be removed, but which Automake does not know.
Packit Service 9646c7
MOSTLYCLEANFILES = $(bin_SCRIPTS) autoconf.in *.tmp
Packit Service 9646c7
Packit Service 9646c7
# Get the release year from ../ChangeLog.
Packit Service 9646c7
RELEASE_YEAR = \
Packit Service 9646c7
  `sed 's/^\([0-9][0-9][0-9][0-9]\).*/\1/;q' $(top_srcdir)/ChangeLog`
Packit Service 9646c7
Packit Service 9646c7
## ------------- ##
Packit Service 9646c7
## The scripts.  ##
Packit Service 9646c7
## ------------- ##
Packit Service 9646c7
Packit Service 9646c7
edit = sed \
Packit Service 9646c7
	-e 's|@SHELL[@]|$(SHELL)|g' \
Packit Service 9646c7
	-e 's|@PERL[@]|$(PERL)|g' \
Packit Service 9646c7
	-e 's|@PERL_FLOCK[@]|$(PERL_FLOCK)|g' \
Packit Service 9646c7
	-e 's|@bindir[@]|$(bindir)|g' \
Packit Service 9646c7
	-e 's|@pkgdatadir[@]|$(pkgdatadir)|g' \
Packit Service 9646c7
	-e 's|@prefix[@]|$(prefix)|g' \
Packit Service 9646c7
	-e 's|@autoconf-name[@]|'`echo autoconf | sed '$(transform)'`'|g' \
Packit Service 9646c7
	-e 's|@autoheader-name[@]|'`echo autoheader | sed '$(transform)'`'|g' \
Packit Service 9646c7
	-e 's|@autom4te-name[@]|'`echo autom4te | sed '$(transform)'`'|g' \
Packit Service 9646c7
	-e 's|@M4[@]|$(M4)|g' \
Packit Service 9646c7
	-e 's|@M4_DEBUGFILE[@]|$(M4_DEBUGFILE)|g' \
Packit Service 9646c7
	-e 's|@M4_GNU[@]|$(M4_GNU)|g' \
Packit Service 9646c7
	-e 's|@AWK[@]|$(AWK)|g' \
Packit Service 9646c7
	-e 's|@RELEASE_YEAR[@]|'$(RELEASE_YEAR)'|g' \
Packit Service 9646c7
	-e 's|@VERSION[@]|$(VERSION)|g' \
Packit Service 9646c7
	-e 's|@PACKAGE_NAME[@]|$(PACKAGE_NAME)|g' \
Packit Service 9646c7
	-e 's|@configure_input[@]|Generated from $@.in; do not edit by hand.|g'
Packit Service 9646c7
Packit Service 9646c7
$(top_builddir)/bin/autom4te: autom4te
Packit Service 9646c7
Packit Service 9646c7
# autoconf is written in M4sh.
Packit Service 9646c7
# FIXME: this target should depend on the frozen files below lib/m4sugar,
Packit Service 9646c7
# otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
Packit Service 9646c7
# installation below the same $(prefix); work around this with --melt.
Packit Service 9646c7
autoconf.in: $(srcdir)/autoconf.as $(m4sh_m4f_dependencies)
Packit Service 9646c7
	$(MY_AUTOM4TE) --language M4sh --cache '' --melt $(srcdir)/autoconf.as -o $@
Packit Service 9646c7
Packit Service 9646c7
## All the scripts depend on Makefile so that they are rebuilt when the
Packit Service 9646c7
## prefix etc. changes.  It took quite a while to have the rule correct,
Packit Service 9646c7
## don't break it!
Packit Service 9646c7
## Use chmod -w to prevent people from editing the wrong file by accident.
Packit Service 9646c7
$(bin_SCRIPTS): Makefile
Packit Service 9646c7
	rm -f $@ $@.tmp
Packit Service 9646c7
	srcdir=''; \
Packit Service 9646c7
	  test -f ./$@.in || srcdir=$(srcdir)/; \
Packit Service 9646c7
	  $(edit) $${srcdir}$@.in >$@.tmp
Packit Service 9646c7
	chmod +x $@.tmp
Packit Service 9646c7
	chmod a-w $@.tmp
Packit Service 9646c7
	mv $@.tmp $@
Packit Service 9646c7
Packit Service 9646c7
autoconf: autoconf.in
Packit Service 9646c7
autoheader: $(srcdir)/autoheader.in
Packit Service 9646c7
autom4te: $(srcdir)/autom4te.in
Packit Service 9646c7
autoreconf: $(srcdir)/autoreconf.in
Packit Service 9646c7
autoscan: $(srcdir)/autoscan.in
Packit Service 9646c7
autoupdate: $(srcdir)/autoupdate.in
Packit Service 9646c7
ifnames: $(srcdir)/ifnames.in
Packit Service 9646c7
Packit Service 9646c7
Packit Service 9646c7
## --------------- ##
Packit Service 9646c7
## Building TAGS.  ##
Packit Service 9646c7
## --------------- ##
Packit Service 9646c7
Packit Service 9646c7
TAGS_DEPENDENCIES = $(EXTRA_DIST)
Packit Service 9646c7
Packit Service 9646c7
letters = abcdefghijklmnopqrstuvwxyz
Packit Service 9646c7
LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
Packit Service 9646c7
DIGITS = 0123456789
Packit Service 9646c7
WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
Packit Service 9646c7
ETAGS_PERL = --lang=perl \
Packit Service 9646c7
  autoheader.in autoreconf.in autoupdate.in autoscan.in autom4te.in \
Packit Service 9646c7
  ifnames.in
Packit Service 9646c7
ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
Packit Service 9646c7
  autoconf.in
Packit Service 9646c7
Packit Service 9646c7
ETAGS_ARGS = $(ETAGS_PERL) $(ETAGS_SH)