RT-AC56 3.0.0.4.374.37 core
[tomato.git] / release / src-rt-6.x.4708 / toolchains / hndtools-arm-linux-2.6.36-uclibc-4.5.3 / share / automake-1.11 / am / ltlib.am
blob29aa00ce78dbe07975e5a7fda9c4eff9959fe272
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2001, 2003, 2004,
3 ## 2005, 2006, 2007, 2008, 2009 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, see <http://www.gnu.org/licenses/>.
18 if %?INSTALL%
19 include inst-vars.am
20 endif %?INSTALL%
22 ## ------------ ##
23 ## Installing.  ##
24 ## ------------ ##
26 if %?INSTALL%
27 am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
28 .PHONY install-%EXEC?exec:data%-am: install-%DIR%LTLIBRARIES
29 install-%DIR%LTLIBRARIES: $(%DIR%_LTLIBRARIES)
30         @$(NORMAL_INSTALL)
31         test -z "$(%NDIR%dir)" || $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)"
32 if %?BASE%
33 ## Funny invocation because Makefile variable can be empty, leading to
34 ## a syntax error in sh.
35         @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
36         list2=; for p in $$list; do \
37           if test -f $$p; then \
38             list2="$$list2 $$p"; \
39           else :; fi; \
40         done; \
41         test -z "$$list2" || { \
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) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 '$(DESTDIR)$(%NDIR%dir)'"; \
47 ?LIBTOOL?         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$list2 "$(DESTDIR)$(%NDIR%dir)"; \
48 ?!LIBTOOL?        echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$list '$(DESTDIR)$(%NDIR%dir)'"; \
49 ?!LIBTOOL?        $(INSTALL) $(INSTALL_STRIP_FLAG) $$list "$(DESTDIR)$(%NDIR%dir)"; \
50         }
51 else !%?BASE%
52         @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)"  || list=; \
53         for p in $$list; do if test -f "$$p"; then echo "$$p $$p"; else :; fi; done | \
54         sed '/ .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
55         $(AWK) 'BEGIN { cur = "." } \
56           { if ($$2 == cur) { files = files " " $$1 } \
57             else { print cur, files; files = $$1; cur = $$2 } } \
58           END { print cur, files }' | \
59         while read dir files; do \
60           test -z "$$files" || { \
61             test "x$$dir" = x. || { \
62               echo "$(MKDIR_P) '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
63               $(MKDIR_P) "$(DESTDIR)$(%NDIR%dir)/$$dir"; }; \
64 ## Note that we explicitly set the libtool mode.  This avoids any lossage
65 ## if the program doesn't have a name that libtool expects.
66 ## Use INSTALL and not INSTALL_DATA because libtool knows the right
67 ## permissions to use.
68 ?LIBTOOL?           echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
69 ?LIBTOOL?           $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=install $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
70 ?!LIBTOOL?          echo " $(INSTALL) $(INSTALL_STRIP_FLAG) $$files '$(DESTDIR)$(%NDIR%dir)/$$dir'"; \
71 ?!LIBTOOL?          $(INSTALL) $(INSTALL_STRIP_FLAG) $$files "$(DESTDIR)$(%NDIR%dir)/$$dir" || exit $$?; \
72           }; \
73         done
74 endif !%?BASE%
75 endif %?INSTALL%
78 ## -------------- ##
79 ## Uninstalling.  ##
80 ## -------------- ##
82 if %?INSTALL%
83 .PHONY uninstall-am: uninstall-%DIR%LTLIBRARIES
84 uninstall-%DIR%LTLIBRARIES:
85         @$(NORMAL_UNINSTALL)
86         @list='$(%DIR%_LTLIBRARIES)'; test -n "$(%NDIR%dir)" || list=; \
87         for p in $$list; do \
88           %BASE?$(am__strip_dir):f=$$p;% \
89 ?LIBTOOL?         echo " $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
90 ?LIBTOOL?         $(LIBTOOL) $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=uninstall rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
91 ?!LIBTOOL?        echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
92 ?!LIBTOOL?        rm -f "$(DESTDIR)$(%NDIR%dir)/$$f"; \
93         done
94 endif %?INSTALL%
97 ## ---------- ##
98 ## Cleaning.  ##
99 ## ---------- ##
101 .PHONY clean-am: clean-%DIR%LTLIBRARIES
102 clean-%DIR%LTLIBRARIES:
103         -test -z "$(%DIR%_LTLIBRARIES)" || rm -f $(%DIR%_LTLIBRARIES)
104 ## `so_locations' files are created by some linkers (IRIX, OSF) when
105 ## building a shared object.  Libtool places these files in the
106 ## directory where the shared object is created.
107         @list='$(%DIR%_LTLIBRARIES)'; for p in $$list; do \
108           dir="`echo $$p | sed -e 's|/[^/]*$$||'`"; \
109           test "$$dir" != "$$p" || dir=.; \
110           echo "rm -f \"$${dir}/so_locations\""; \
111           rm -f "$${dir}/so_locations"; \
112         done