1 ## -*- makefile-automake -*-
2 ## Copyright (C) 1995-2018 Free Software Foundation, Inc.
4 ## This program is free software; you can redistribute it and/or modify
5 ## it under the terms of the GNU General Public License as published by
6 ## the Free Software Foundation; either version 2, or (at your option)
9 ## This program is distributed in the hope that it will be useful,
10 ## but WITHOUT ANY WARRANTY; without even the implied warranty of
11 ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 ## GNU General Public License for more details.
14 ## You should have received a copy of the GNU General Public License
15 ## along with this program. If not, see <https://www.gnu.org/licenses/>.
17 ## ----------------------------------- ##
18 ## The automake and aclocal scripts. ##
19 ## ----------------------------------- ##
21 bin_SCRIPTS
= %D
%/automake
%D
%/aclocal
22 nodist_noinst_SCRIPTS
+= \
23 %D
%/aclocal-
$(APIVERSION
) \
24 %D
%/automake-
$(APIVERSION
)
28 %D
%/aclocal-
$(APIVERSION
) \
29 %D
%/automake-
$(APIVERSION
)
31 # Used by maintainer checks and such.
32 automake_in
= $(srcdir)/%D
%/automake.in
33 aclocal_in
= $(srcdir)/%D
%/aclocal.in
34 automake_script
= %D
%/automake
35 aclocal_script
= %D
%/aclocal
37 AUTOMAKESOURCES
= $(automake_in
) $(aclocal_in
)
38 TAGS_FILES
+= $(AUTOMAKESOURCES
)
39 EXTRA_DIST
+= $(AUTOMAKESOURCES
)
41 # Make versioned links. We only run the transform on the root name;
42 # then we make a versioned link with the transformed base name. This
43 # seemed like the most reasonable approach.
46 @for p in
$(bin_SCRIPTS
); do \
47 f
=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
48 fv
="$$f-$(APIVERSION)"; \
49 rm -f
"$(DESTDIR)$(bindir)/$$fv"; \
50 echo
" $(LN) '$(DESTDIR)$(bindir)/$$f' '$(DESTDIR)$(bindir)/$$fv'"; \
51 $(LN
) "$(DESTDIR)$(bindir)/$$f" "$(DESTDIR)$(bindir)/$$fv"; \
55 @for p in
$(bin_SCRIPTS
); do \
56 f
=`echo $$p | sed -e 's,.*/,,' -e '$(transform)'`; \
57 fv
="$$f-$(APIVERSION)"; \
58 rm -f
"$(DESTDIR)$(bindir)/$$fv"; \
61 # These files depend on Makefile so they are rebuilt if $(VERSION),
62 # $(datadir) or other do_subst'ituted variables change.
63 %D
%/automake
: %D
%/automake.in
64 %D
%/aclocal
: %D
%/aclocal.in
65 %D
%/automake
%D
%/aclocal
: Makefile
66 $(AM_V_GEN
)rm -f
$@
$@
-t
$@
-t2 \
68 ## Common substitutions.
69 && in
=$@.in
&& $(do_subst
) <$(srcdir)/$$in >$@
-t \
70 ## We can't use '$(generated_file_finalize)' here, because currently
71 ## Automake contains occurrences of unexpanded @substitutions@ in
72 ## comments, and that is perfectly legit.
73 && chmod a
+x
,a-w
$@
-t
&& mv
-f
$@
-t
$@
75 %D
%/aclocal-
$(APIVERSION
): %D
%/aclocal
76 $(AM_V_GEN
) rm -f
$@
; \
79 %D
%/automake-
$(APIVERSION
): %D
%/automake
80 $(AM_V_GEN
) rm -f
$@
; \
83 # vim: ft=automake noet