Prefer HTTPS to FTP and HTTP
[autoconf.git] / bin / local.mk
blob8910320eee787771d7cfe5649609c085df0e98de
1 # Make Autoconf commands.
3 # Copyright (C) 1999-2007, 2009-2017 Free Software Foundation, Inc.
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 # GNU General Public License for more details.
15 # You should have received a copy of the GNU General Public License
16 # along with this program. If not, see <https://www.gnu.org/licenses/>.
18 bin_SCRIPTS = \
19 bin/autoconf \
20 bin/autoheader \
21 bin/autom4te \
22 bin/autoreconf \
23 bin/autoscan \
24 bin/autoupdate \
25 bin/ifnames
27 EXTRA_DIST += \
28 bin/autoconf.as \
29 bin/autoheader.in \
30 bin/autom4te.in \
31 bin/autoreconf.in \
32 bin/autoscan.in \
33 bin/autoupdate.in \
34 bin/ifnames.in
36 # Files that should be removed, but which Automake does not know.
37 MOSTLYCLEANFILES += $(bin_SCRIPTS) bin/autoconf.in bin/*.tmp
39 ## ------------- ##
40 ## The scripts. ##
41 ## ------------- ##
43 # autoconf is written in M4sh.
44 # FIXME: this target should depend on the frozen files below lib/m4sugar,
45 # otherwise autom4te may pick up a frozen m4sh.m4f from an earlier
46 # installation below the same $(prefix); work around this with --melt.
47 bin/autoconf.in: $(srcdir)/bin/autoconf.as $(m4sh_m4f_dependencies)
48 $(MY_AUTOM4TE) --language M4sh --cache '' \
49 --melt $(srcdir)/bin/autoconf.as -o $@
51 ## All the scripts depend on Makefile so that they are rebuilt when the
52 ## prefix etc. changes. It took quite a while to have the rule correct,
53 ## don't break it!
54 ## Use chmod -w to prevent people from editing the wrong file by accident.
55 $(bin_SCRIPTS): Makefile
56 rm -f $@ $@.tmp
57 $(MKDIR_P) $(@D)
58 srcdir=''; \
59 test -f ./$@.in || srcdir=$(srcdir)/; \
60 $(edit) $${srcdir}$@.in >$@.tmp
61 chmod +x $@.tmp
62 chmod a-w $@.tmp
63 mv $@.tmp $@
65 bin/autoconf: bin/autoconf.in
66 bin/autoheader: $(srcdir)/bin/autoheader.in
67 bin/autom4te: $(srcdir)/bin/autom4te.in
68 bin/autoreconf: $(srcdir)/bin/autoreconf.in
69 bin/autoscan: $(srcdir)/bin/autoscan.in
70 bin/autoupdate: $(srcdir)/bin/autoupdate.in
71 bin/ifnames: $(srcdir)/bin/ifnames.in
74 ## --------------- ##
75 ## Building TAGS. ##
76 ## --------------- ##
78 TAGS_DEPENDENCIES = $(EXTRA_DIST)
80 letters = abcdefghijklmnopqrstuvwxyz
81 LETTERS = ABCDEFGHIJKLMNOPQRSTUVWXYZ
82 DIGITS = 0123456789
83 WORD_REGEXP = [$(LETTERS)$(letters)_][$(LETTERS)$(letters)$(DIGITS)_]*
84 ETAGS_PERL = --lang=perl \
85 bin/autoheader.in \
86 bin/autoreconf.in \
87 bin/autoupdate.in \
88 bin/autoscan.in \
89 bin/autom4te.in \
90 bin/ifnames.in
91 ETAGS_SH = --lang=none --regex='/\($(WORD_REGEXP)\)=/\1/' \
92 bin/autoconf.in
94 ETAGS_ARGS += $(ETAGS_PERL) $(ETAGS_SH)