1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright 1994, 1995, 1996, 1998, 1999, 2001 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, write to the Free Software
16 ## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
25 ## if doesn't work properly for Automake variables yet.
26 am__installdirs += $(DESTDIR)$(%NDIR%dir)
27 ?BASE?%DIR%SCRIPT_INSTALL = $(INSTALL_SCRIPT)
28 ?!BASE?%DIR%SCRIPT_INSTALL = $(install_sh_SCRIPT)
29 ?EXEC?.PHONY install-exec-am: install-%DIR%SCRIPTS
30 ?!EXEC?.PHONY install-data-am: install-%DIR%SCRIPTS
31 install-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
33 $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
34 ## Funny invocation because Makefile variable can be empty, leading to
35 ## a syntax error in sh.
36 @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
37 ## A file can be in the source directory or the build directory.
38 if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
39 if test -f $$d$$p; then \
40 ## If the _SCRIPTS variable has an entry like foo/bar, install it as
41 ## $(destdir)/bar, not $(destdir)/foo/bar. The user can make a
42 ## new dir variable or use a nobase_ target for the latter case.
43 ## However in all cases $(transform) applies only to the basename,
44 ## so we have to strip the directory part.
45 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
46 ## Prepend the directory part if nobase_ is used.
47 ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
48 echo " $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
49 $(%DIR%SCRIPT_INSTALL) $$d$$p $(DESTDIR)$(%NDIR%dir)/$$f; \
60 .PHONY uninstall-am: uninstall-%DIR%SCRIPTS
61 uninstall-%DIR%SCRIPTS:
63 @list='$(%DIR%_SCRIPTS)'; for p in $$list; do \
64 ## Remove any leading directory before applying $(transform).
65 f=`echo "$$p" | sed 's|^.*/||;$(transform)'`; \
66 ## Prepend the directory part if nobase_ is used.
67 ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
68 echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$f"; \
69 rm -f $(DESTDIR)$(%NDIR%dir)/$$f; \
79 DIST_COMMON += $(%DIR%_SCRIPTS)
88 .PHONY installcheck-am: installcheck-%DIR%SCRIPTS
89 installcheck-%DIR%SCRIPTS: $(%DIR%_SCRIPTS)
90 bad=0; pid=$$$$; list="$(%DIR%_SCRIPTS)"; for p in $$list; do \
91 case ' $(AM_INSTALLCHECK_STD_OPTIONS_EXEMPT) ' in \
92 ## Match $(srcdir)/$$p in addition to $$p because Sun make might rewrite
93 ## filenames in AM_INSTALLCHECK_STD_OPTIONS_EXEMPT during VPATH builds.
94 *" $$p "* | *" $(srcdir)/$$p "*) continue;; \
96 ## Strip any leading directory before applying $(transform).
97 f=`echo "$$p" | sed 's,^.*/,,;$(transform)'`; \
98 ## Insert the directory back if nobase_ is used.
99 ?!BASE? f=`echo "$$p" | sed 's|[^/]*$$||'`"$$f"; \
100 for opt in --help --version; do \
101 if $(DESTDIR)$(%NDIR%dir)/$$f $$opt > c$${pid}_.out 2> c$${pid}_.err \
102 && test -n "`cat c$${pid}_.out`" \
103 && test -z "`cat c$${pid}_.err`"; then :; \
104 else echo "$$f does not support $$opt" 1>&2; bad=1; fi; \
106 done; rm -f c$${pid}_.???; exit $$bad