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

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

automake 1.7.9

File size: 3.9 KB
Line 
1## automake - create Makefile.in from Makefile.am
2## Copyright 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001
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## This file is read several times:
21## - once per *extension* (not per language) for generic compilation rules
22## - once for each file which requires specific flags.
23
24## Note it is on purpose we wrote `if %AMDEP%', since:
25##
26## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
27## the `if FALSE' chunk is removed (automake-time conditionals).
28##
29## - if deps are on, %AMDEP% is mapped onto AMDEP, and therefore
30## the `if AMDEP' chunk is prefix with @AMDEP_TRUE@ just like for any
31## other configure-time conditional.
32##
33## We do likewise for %FASTDEP%; this expands to an ordinary
34## configure-time conditional. %FASTDEP% is used to speed up the
35## common case of building a package with gcc 3.x. In this case we
36## can skip the use of depcomp and easily inline the dependency
37## tracking.
38
39?GENERIC?%EXT%.o:
40?!GENERIC?%OBJ%: %SOURCE%
41if %FASTDEP%
42## In fast-dep mode, we can always use -o.
43 if %COMPILE% -MT %OBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
44 %-c% -o %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
45 then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Po"; \
46 else rm -f "%DEPBASE%.Tpo"; exit 1; \
47 fi
48else !%FASTDEP%
49if %AMDEP%
50 source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
51 depfile='%DEPBASE%.Po' tmpdepfile='%DEPBASE%.TPo' @AMDEPBACKSLASH@
52 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
53endif %AMDEP%
54?-o? %COMPILE% %-c% %-o% %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
55?!-o? %COMPILE% %-c% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
56endif !%FASTDEP%
57
58?GENERIC?%EXT%.obj:
59?!GENERIC?%OBJOBJ%: %SOURCE%
60if %FASTDEP%
61## In fast-dep mode, we can always use -o.
62 if %COMPILE% -MT %OBJOBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
63## Ugly invocation here; using a variable fails due to a parsing
64## problem in automake.
65 %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`; \
66 then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Po"; \
67 else rm -f "%DEPBASE%.Tpo"; exit 1; \
68 fi
69else !%FASTDEP%
70if %AMDEP%
71 source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
72 depfile='%DEPBASE%.Po' tmpdepfile='%DEPBASE%.TPo' @AMDEPBACKSLASH@
73 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
74endif %AMDEP%
75?-o? %COMPILE% %-c% %-o% %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
76?!-o? %COMPILE% %-c% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
77endif !%FASTDEP%
78
79if %?LIBTOOL%
80?GENERIC?%EXT%.lo:
81?!GENERIC?%LTOBJ%: %SOURCE%
82if %FASTDEP%
83## In fast-dep mode, we can always use -o.
84 if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
85 %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
86 then mv -f "%DEPBASE%.Tpo" "%DEPBASE%.Plo"; \
87 else rm -f "%DEPBASE%.Tpo"; exit 1; \
88 fi
89else !%FASTDEP%
90if %AMDEP%
91 source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
92 depfile='%DEPBASE%.Plo' tmpdepfile='%DEPBASE%.TPlo' @AMDEPBACKSLASH@
93 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
94endif %AMDEP%
95## We can always use `-o' with Libtool.
96 %LTCOMPILE% %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
97endif !%FASTDEP%
98endif %?LIBTOOL%
Note: See TracBrowser for help on using the repository browser.