* lib/am/ltlib.am (uninstall-%DIR%LTLIBRARIES): Do not put
[automake.git] / lib / am / ltlib.am
blob4be1e6d6656c36f2f91b8984269d7952fe7b71b2
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004, 2005
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)
8 ## any later version.
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
18 ## 02110-1301, USA.
20 if %?INSTALL%
21 include inst-vars.am
22 endif %?INSTALL%
24 ## ------------ ##
25 ## Installing.  ##
26 ## ------------ ##
28 if %?INSTALL%
29 am__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
34 install-%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
56 endif %?INSTALL%
59 ## -------------- ##
60 ## Uninstalling.  ##
61 ## -------------- ##
63 if %?INSTALL%
64 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
65 uninstall-%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
74 endif %?INSTALL%
77 ## ---------- ##
78 ## Cleaning.  ##
79 ## ---------- ##
81 .PHONY clean-am: clean-%DIR%LTLIBRARIES
82 clean-%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