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

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

automake 1.8.5

File size: 3.1 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright (C) 1994, 1995, 1996, 1998, 1999, 2001, 2002, 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## ------------ ##
22## Installing. ##
23## ------------ ##
24
25if %?INSTALL%
26am__installdirs += "$(DESTDIR)$(%NDIR%dir)"
27?BASE?%DIR%LIBRARIES_INSTALL = $(INSTALL_DATA)
28?!BASE?%DIR%LIBRARIES_INSTALL = $(install_sh_DATA)
29?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
30?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
31install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
32 @$(NORMAL_INSTALL)
33 test -z "$(%NDIR%dir)" || $(mkdir_p) "$(DESTDIR)$(%NDIR%dir)"
34## Funny invocation because Makefile variable can be empty, leading to
35## a syntax error in sh.
36 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
37 if test -f $$p; then \
38## Compute basename of source file. Unless this is a nobase_ target, we
39## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
40## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
41?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
42?!BASE? f="$$p"; \
43 echo " $(%DIR%LIBRARIES_INSTALL) '$$p' '$(DESTDIR)$(%NDIR%dir)/$$f'"; \
44 $(%DIR%LIBRARIES_INSTALL) "$$p" "$(DESTDIR)$(%NDIR%dir)/$$f"; \
45 else :; fi; \
46 done
47## We do two loops here so that $(POST_INSTALL) can be empty. If we
48## merge the two loops, we get a syntax error from sh. Anyway, having
49## $(POST_INSTALL) in the middle of the loop essentially renders it
50## useless; sh never actually executes this command. Read the GNU
51## Standards for a little enlightenment on this.
52 @$(POST_INSTALL)
53 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
54 if test -f $$p; then \
55?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
56## Must ranlib after installing because mod time changes.
57 echo " $(RANLIB) '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
58 $(RANLIB) "$(DESTDIR)$(%NDIR%dir)/$$p"; \
59 else :; fi; \
60 done
61endif %?INSTALL%
62
63
64## -------------- ##
65## Uninstalling. ##
66## -------------- ##
67
68if %?INSTALL%
69.PHONY uninstall-am: uninstall-%DIR%LIBRARIES
70uninstall-%DIR%LIBRARIES:
71 @$(NORMAL_UNINSTALL)
72 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
73?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
74 echo " rm -f '$(DESTDIR)$(%NDIR%dir)/$$p'"; \
75 rm -f "$(DESTDIR)$(%NDIR%dir)/$$p"; \
76 done
77endif %?INSTALL%
78
79
80## ---------- ##
81## Cleaning. ##
82## ---------- ##
83
84.PHONY clean-am: clean-%DIR%LIBRARIES
85clean-%DIR%LIBRARIES:
86 -test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)
Note: See TracBrowser for help on using the repository browser.