1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1996, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
3 ## 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 2, or (at your option)
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, write to the Free Software
17 ## Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
29 @echo 'WARNING: Warnings can be ignored. :-)'
30 @rm -f elc-temp && touch elc-temp
31 if test "$(EMACS)" != no; then \
32 ## Make sure "$@" isn't empty initially.
34 ## Populate "$@" with elisp files (found in the current directory
36 list='$(LISP)'; for p in $$list; do \
37 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
38 set x "$$@" "$$d$$p"; shift; \
40 ## Finally call elisp-comp for all files.
42 EMACS="$(EMACS)" $(SHELL) $(elisp_comp) "$$@" || exit 1; \
46 ## Do not use $(ELCFILES) as target, because it may have been emptied
47 ## by the user (to disable byte-compilation), and POSIX does not allow
49 $(am__ELCFILES): elc-stamp
50 ## Recover from the removal of $@.
52 ## Do not call `make elc-stamp' if emacs is not available, because it would
54 @if test "$(EMACS)" != no && test ! -f $@; then \
55 ## If `make -j' is used and more than one file has been erased, several
56 ## processes can execute this block. We have to make sure that only
57 ## the first one will run `$(MAKE) $(AM_MAKEFLAGS) elc-stamp', and the
58 ## other ones will wait.
60 ## There is a race here if only one child of make receive a signal.
61 ## In that case the build may fail. We remove elc-stamp when we receive
62 ## a signal so we are sure the build will succeed the next time.
63 trap 'rm -rf elc-lock elc-stamp' 1 2 13 15; \
64 if mkdir elc-lock 2>/dev/null; then \
65 ## This code is being executed by the first process.
67 $(MAKE) $(AM_MAKEFLAGS) elc-stamp; \
70 ## This code is being executed by the follower processes.
71 ## Wait until the first process is done.
72 while test -d elc-lock; do sleep 1; done; \
73 ## Succeed if and only if the first process succeeded.
74 test -f elc-stamp; exit $$?; \
84 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
85 ?BASE?%DIR%LISP_INSTALL = $(INSTALL_DATA)
86 ?!BASE?%DIR%LISP_INSTALL = $(install_sh_DATA)
87 ?EXEC?.PHONY install-exec-am: install-%DIR%LISP
88 ?!EXEC?.PHONY install-data-am: install-%DIR%LISP
89 install-%DIR%LISP: $(%DIR%_LISP) $(ELCFILES)
91 ## Do not install anything if EMACS was not found.
92 @if test "$(EMACS)" != no; then \
93 test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"; \
94 ?!BASE? $(am__vpath_adj_setup) \
95 ## Funny invocation because Makefile variable can be empty, leading to
96 ## a syntax error in sh.
97 list='$(%DIR%_LISP)'; for p in $$list; do \
98 ## A lisp file can be in the source directory or the build directory.
99 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
100 ?BASE? f=$(am__strip_dir) \
101 ?!BASE? $(am__vpath_adj) \
102 echo " $(%DIR%LISP_INSTALL) '$$d$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
103 $(%DIR%LISP_INSTALL) "$$d$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
104 ## Only install .elc file if it exists.
105 if test -f $${p}c; then \
106 echo " $(%DIR%LISP_INSTALL) '$${p}c' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
107 $(%DIR%LISP_INSTALL) "$${p}c" "$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
119 .PHONY uninstall-am: uninstall-%DIR%LISP
122 ## Do not uninstall anything if EMACS was not found.
123 @if test "$(EMACS)" != no; then \
124 ?!BASE? $(am__vpath_adj_setup) \
125 list='$(%DIR%_LISP)'; for p in $$list; do \
126 ?BASE? f=$(am__strip_dir) \
127 ?!BASE? $(am__vpath_adj) \
128 echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f' '$(DESTDIR)$(%NDIR%dir)/$${f}c'"; \
129 rm -f "$(DESTDIR)$(%NDIR%dir)/$$f" "$(DESTDIR)$(%NDIR%dir)/$${f}c"; \
139 .PHONY clean-am: clean-lisp
141 -rm -f elc-stamp $(ELCFILES)
149 DIST_COMMON += %DISTVAR%