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

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

automake 1.7.9

File size: 3.2 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright 1994, 1995, 1996, 1998, 1999, 2001 Free Software Foundation, Inc.
3
4## This program is free software; you can redistribute it and/or modify
5## it under the terms of the GNU General Public License as published by
6## the Free Software Foundation; either version 2, or (at your option)
7## any later version.
8
9## This program is distributed in the hope that it will be useful,
10## but WITHOUT ANY WARRANTY; without even the implied warranty of
11## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12## GNU General Public License for more details.
13
14## You should have received a copy of the GNU General Public License
15## along with this program; if not, write to the Free Software
16## Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
17## 02111-1307, USA.
18
19
20## ----------- ##
21## Variables. ##
22## ----------- ##
23
24if %?FIRST%
25AR = ar
26## For now this is detected when we see AC_PROG_RANLIB
27## RANLIB = @RANLIB@
28endif %?FIRST%
29
30## ------------ ##
31## Installing. ##
32## ------------ ##
33
34if %?INSTALL%
35am__installdirs += $(DESTDIR)$(%NDIR%dir)
36?BASE?%DIR%LIBRARIES_INSTALL = $(INSTALL_DATA)
37?!BASE?%DIR%LIBRARIES_INSTALL = $(install_sh_DATA)
38?EXEC?.PHONY install-exec-am: install-%DIR%LIBRARIES
39?!EXEC?.PHONY install-data-am: install-%DIR%LIBRARIES
40install-%DIR%LIBRARIES: $(%DIR%_LIBRARIES)
41 @$(NORMAL_INSTALL)
42 $(mkinstalldirs) $(DESTDIR)$(%NDIR%dir)
43## Funny invocation because Makefile variable can be empty, leading to
44## a syntax error in sh.
45 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
46 if test -f $$p; then \
47## Compute basename of source file. Unless this is a nobase_ target, we
48## want to install 'python/foo.py' as '$(DESTDIR)$(%NDIR%dir)/foo.yo',
49## not '$(DESTDIR)$(%NDIR%dir)/python/foo.yo'.
50?BASE? f="`echo $$p | sed -e 's|^.*/||'`"; \
51?!BASE? f="$$p"; \
52 echo " $(%DIR%LIBRARIES_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f"; \
53 $(%DIR%LIBRARIES_INSTALL) $$p $(DESTDIR)$(%NDIR%dir)/$$f; \
54 else :; fi; \
55 done
56## We do two loops here so that $(POST_INSTALL) can be empty. If we
57## merge the two loops, we get a syntax error from sh. Anyway, having
58## $(POST_INSTALL) in the middle of the loop essentially renders it
59## useless; sh never actually executes this command. Read the GNU
60## Standards for a little enlightenment on this.
61 @$(POST_INSTALL)
62 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
63 if test -f $$p; then \
64?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
65## Must ranlib after installing because mod time changes.
66 echo " $(RANLIB) $(DESTDIR)$(%NDIR%dir)/$$p"; \
67 $(RANLIB) $(DESTDIR)$(%NDIR%dir)/$$p; \
68 else :; fi; \
69 done
70endif %?INSTALL%
71
72
73## -------------- ##
74## Uninstalling. ##
75## -------------- ##
76
77if %?INSTALL%
78.PHONY uninstall-am: uninstall-%DIR%LIBRARIES
79uninstall-%DIR%LIBRARIES:
80 @$(NORMAL_UNINSTALL)
81 @list='$(%DIR%_LIBRARIES)'; for p in $$list; do \
82?BASE? p="`echo $$p | sed -e 's|^.*/||'`"; \
83 echo " rm -f $(DESTDIR)$(%NDIR%dir)/$$p"; \
84 rm -f $(DESTDIR)$(%NDIR%dir)/$$p; \
85 done
86endif %?INSTALL%
87
88
89## ---------- ##
90## Cleaning. ##
91## ---------- ##
92
93.PHONY clean-am: clean-%DIR%LIBRARIES
94clean-%DIR%LIBRARIES:
95 -test -z "$(%DIR%_LIBRARIES)" || rm -f $(%DIR%_LIBRARIES)
Note: See TracBrowser for help on using the repository browser.