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

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

automake 1.8.5

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