source: trunk/essentials/sys-devel/automake-1.10/lib/am/ltlib.am

Last change on this file was 3147, checked in by bird, 18 years ago

automake 1.10

File size: 3.6 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
3## 2005, 2006 Free Software Foundation, Inc.
4
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)
8## any later version.
9
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.
14
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
18## 02110-1301, USA.
19
20if %?INSTALL%
21include inst-vars.am
22endif %?INSTALL%
23
24## ------------ ##
25## Installing. ##
26## ------------ ##
27
28if %?INSTALL%
29am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
30?BASE?%DIR%LTLIBRARIES_INSTALL = $(INSTALL)
31?!BASE?%DIR%LTLIBRARIES_INSTALL = $(install_sh) -c
32?EXEC?.PHONY install-exec-am: install-%DIR%LTLIBRARIES
33?!EXEC?.PHONY install-data-am: install-%DIR%LTLIBRARIES
34install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
35 @$(NORMAL_INSTALL)
36 test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
37## Funny invocation because Makefile variable can be empty, leading to
38## a syntax error in sh.
39 @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
40 if test -f $$p; then \
41## Compute basename of source file. Unless this is a nobase_ target, we
42## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
43## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
44?BASE? f=$(am__strip_dir) \
45?!BASE? f=$$p; \
46## Note that we explicitly set the libtool mode. This avoids any lossage
47## if the program doesn't have a name that libtool expects.
48## Use INSTALL and not INSTALL_DATA because libtool knows the right
49## permissions to use.
50?LIBTOOL? echo " $(LIBTOOL) --mode=install $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
51?LIBTOOL? $(LIBTOOL) --mode=install $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
52?!LIBTOOL? echo " $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
53?!LIBTOOL? $(%DIR%LTLIBRARIES_INSTALL) $(INSTALL_STRIP_FLAG) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
54 else :; fi; \
55 done
56endif %?INSTALL%
57
58
59## -------------- ##
60## Uninstalling. ##
61## -------------- ##
62
63if %?INSTALL%
64.PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
65uninstall-%DIR%LTLIBRARIES:
66 @$(NORMAL_UNINSTALL)
67 @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
68?BASE? p=$(am__strip_dir) \
69?LIBTOOL? echo " $(LIBTOOL) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
70?LIBTOOL? $(LIBTOOL) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
71?!LIBTOOL? echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
72?!LIBTOOL? rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
73 done
74endif %?INSTALL%
75
76
77## ---------- ##
78## Cleaning. ##
79## ---------- ##
80
81.PHONY clean-am: clean-%DIR%LTLIBRARIES
82clean-%DIR%LTLIBRARIES:
83 -test -z "$(%DIR%_LTLIBRARIES)" || rm -f $(%DIR%_LTLIBRARIES)
84## `so_locations' files are created by some linkers (IRIX, OSF) when
85## building a shared object. Libtool places these files in the
86## directory where the shared object is created.
87 @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
88 dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
89 test "$$dir" != "$$p" || dir=.; \
90 echo "rm -f \"$${dir}/so_locations\""; \
91 rm -f "$${dir}/so_locations"; \
92 done
Note: See TracBrowser for help on using the repository browser.