1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1996-2024 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/>.
26 ## We add $(builddir) and $(srcdir) to load-path, so that any '.el' files
27 ## that $< depends upon can be found (including generated ones).
28 ## We prefer files from the build directory to those from the source
29 ## directory, in true VPATH spirit.
30 ## The destination file is normally determined by appending "c" to the
31 ## input (which would erroneously put it in $(srcdir) in VPATH builds),
32 ## so we override that, too.
33 $(AM_V_GEN)if test '$(EMACS)' != no; then \
34 am__dir=. am__subdir_includes=''; \
36 am__dir=`echo '$@' | sed 's,/[^/]*$$,,'`; \
37 am__subdir_includes="-L $$am__dir -L $(srcdir)/$$am__dir"; \
39 ## Emacs byte-compilation won't create this automatically, sadly.
40 $(MKDIR_P) "$$am__dir" || exit 1; \
41 $(EMACS) --batch --no-site-file \
42 $(AM_ELCFLAGS) $(ELCFLAGS) \
43 $$am__subdir_includes -L $(builddir) -L $(srcdir) \
45 --eval '$(am__emacs_byte_compile_setup)' \
46 -f batch-byte-compile '$<'; \
50 ## In Automake 1.16, byte compilation was changed to use
51 ## byte-compile-dest-file-function, but that doesn't exist in Emacs
52 ## versions earlier than 25, which are still widespread (likely
53 ## permanently). There's no harm in supporting the older versions, which
54 ## require defining the byte-compile-file defun, so do so.
55 ## Otherwise, various of our lisp-related tests fail with the older
56 ## Emacsen, since they would try to byte-compile into a read-only srcdir.
58 ## This is used, single-quoted, in the shell sequence above.
59 ## So use (quote) instead of another single quote in the Lisp.
61 am__emacs_byte_compile_setup = \
62 (if (boundp (quote byte-compile-dest-file-function)) \
63 (setq byte-compile-dest-file-function (lambda (_) "$@")) \
64 (defun byte-compile-dest-file (_) "$@") \
66 ## Just to be clear: that "$@" above is an Elisp string of the make target.
74 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
76 ?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
77 ?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
79 ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
80 ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
82 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
84 ## Do not install anything if EMACS was not found.
85 @if test "$(EMACS)" != no && test -n "$(%NDIR%dir)"; then \
86 ?!BASE? $(am__vpath_adj_setup) \
87 ## Funny invocation because Makefile variable can be empty, leading to
88 ## a syntax error in sh.
89 list='$(%DIR%_LISP)'; \
90 if test -n "$$list"; then \
91 echo " $(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)'"; \
92 $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)" || exit 1; \
95 ## A lisp file can be in the source directory or the build directory.
96 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
97 ?BASE? $(am__strip_dir) \
98 ?!BASE? $(am__vpath_adj) \
99 echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
100 $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f" || exit $$?; \
101 ## Only install .elc file if it exists.
102 if test -f $${p}c; then \
103 echo " $(%DIR%LISP_INSTALL) '$${p}c' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
104 $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c" || exit $$?; \
116 .PHONY uninstall-am: uninstall-%DIR%LISP
119 ## Do not uninstall anything if EMACS was not found.
120 @test "$(EMACS)" != no && test -n "$(%NDIR%dir)" || exit 0; \
121 list='$(%DIR%_LISP)'; \
122 ?BASE? files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
123 ?!BASE? $(am__nobase_strip_setup); files=`$(am__nobase_strip)`; \
124 files="$$files "`echo "$$files" | sed 's|$$|c|'`; \
125 dir='$(DESTDIR)$(%NDIR%dir)'; $(am__uninstall_files_from_dir)
133 .PHONY clean-am: clean-lisp
143 DIST_COMMON += %DISTVAR%