Update automake to version 1.10
[msysgit.git] / share / automake-1.10 / am / libs.am
blob4b71218c988b230f79a2aa373653d8518ec0b355
1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 2003, 2004, 2006
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%LIBRARIES_INSTALL = $(INSTALL_DATA)
31 ?!BASE?%DIR%LIBRARIES_INSTALL = $(install_sh_DATA)
32 ?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
33 ?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
34 install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
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%_LIBRARIES)'; 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             echo " $(%DIR%LIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
47             $(%DIR%LIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
48           else :; fi; \
49         done
50 ## We do two loops here so that $(POST_INSTALL) can be empty.  If we
51 ## merge the two loops, we get a syntax error from sh.  Anyway, having
52 ## $(POST_INSTALL) in the middle of the loop essentially renders it
53 ## useless; sh never actually executes this command.  Read the GNU
54 ## Standards for a little enlightenment on this.
55         @$(POST_INSTALL)
56         @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
57           if test -f $$p; then \
58 ?BASE?      p=$(am__strip_dir) \
59 ## Must ranlib after installing because mod time changes.
60             echo " $(RANLIB) '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
61             $(RANLIB) "$(DESTDIR)$(%NDIR%dir)/$$p"; \
62           else :; fi; \
63         done
64 endif %?INSTALL%
67 ## -------------- ##
68 ## Uninstalling.  ##
69 ## -------------- ##
71 if %?INSTALL%
72 .PHONY uninstall-am: uninstall-%DIR%LIBRARIES
73 uninstall-%DIR%LIBRARIES:
74         @$(NORMAL_UNINSTALL)
75         @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
76 ?BASE?    p=$(am__strip_dir) \
77           echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
78           rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
79         done
80 endif %?INSTALL%
83 ## ---------- ##
84 ## Cleaning.  ##
85 ## ---------- ##
87 .PHONY clean-am: clean-%DIR%LIBRARIES
88 clean-%DIR%LIBRARIES:
89         -test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)