1 ## automake - create Makefile.in from Makefile.am
2 ## Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003
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)
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., 59 Temple Place - Suite 330, Boston, MA
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.
24 ## Note it is on purpose we wrote `if %AMDEP%', since:
26 ## - if deps are turned off, %AMDEP% is mapped onto FALSE, and therefore
27 ## the `if FALSE' chunk is removed (automake-time conditionals).
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.
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
40 ?!GENERIC?%OBJ%: %SOURCE%
42 ## In fast-dep mode, we can always use -o.
43 if %COMPILE% -MT %OBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
44 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
45 ?!GENERIC? %-c% -o %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
46 ?GENERIC? %-c% -o %OBJ% %SOURCE%; \
47 then mv "%DEPBASE%.Tpo" "%DEPBASE%.Po"; \
48 else rm -f "%DEPBASE%.Tpo"; exit 1; \
52 source='%SOURCE%' object='%OBJ%' libtool=no @AMDEPBACKSLASH@
53 depfile='%DEPBASE%.Po' tmpdepfile='%DEPBASE%.TPo' @AMDEPBACKSLASH@
54 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
57 ?-o? %COMPILE% %-c% %-o% %OBJ% %SOURCE%
58 ?!-o? %COMPILE% %-c% %SOURCE%
60 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
61 ?-o? %COMPILE% %-c% %-o% %OBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
62 ?!-o? %COMPILE% %-c% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%
67 ?!GENERIC?%OBJOBJ%: %SOURCE%
69 ## In fast-dep mode, we can always use -o.
70 if %COMPILE% -MT %OBJOBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
71 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
72 ?!GENERIC? %-c% -o %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`; \
73 ?GENERIC? %-c% -o %OBJOBJ% `$(CYGPATH_W) '%SOURCE%'`; \
74 then mv "%DEPBASE%.Tpo" "%DEPBASE%.Po"; \
75 else rm -f "%DEPBASE%.Tpo"; exit 1; \
79 source='%SOURCE%' object='%OBJOBJ%' libtool=no @AMDEPBACKSLASH@
80 depfile='%DEPBASE%.Po' tmpdepfile='%DEPBASE%.TPo' @AMDEPBACKSLASH@
81 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
84 ?-o? %COMPILE% %-c% %-o% %OBJOBJ% `$(CYGPATH_W) '%SOURCE%'`
85 ?!-o? %COMPILE% %-c% `$(CYGPATH_W) '%SOURCE%'`
87 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
88 ?-o? %COMPILE% %-c% %-o% %OBJOBJ% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
89 ?!-o? %COMPILE% %-c% `if test -f '%SOURCE%'; then $(CYGPATH_W) '%SOURCE%'; else $(CYGPATH_W) '$(srcdir)/%SOURCE%'; fi`
95 ?!GENERIC?%LTOBJ%: %SOURCE%
97 ## In fast-dep mode, we can always use -o.
98 if %LTCOMPILE% -MT %LTOBJ% -MD -MP -MF "%DEPBASE%.Tpo" \
99 ?GENERIC? %-c% -o %LTOBJ% %SOURCE%; \
100 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
101 ?!GENERIC? %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%; \
102 then mv "%DEPBASE%.Tpo" "%DEPBASE%.Plo"; \
103 else rm -f "%DEPBASE%.Tpo"; exit 1; \
107 source='%SOURCE%' object='%LTOBJ%' libtool=yes @AMDEPBACKSLASH@
108 depfile='%DEPBASE%.Plo' tmpdepfile='%DEPBASE%.TPlo' @AMDEPBACKSLASH@
109 $(%FPFX%DEPMODE) $(depcomp) @AMDEPBACKSLASH@
111 ## We can always use `-o' with Libtool.
112 ?GENERIC? %LTCOMPILE% %-c% -o %LTOBJ% %SOURCE%
113 ## For non-suffix rules, we must emulate a VPATH search on %SOURCE%.
114 ?!GENERIC? %LTCOMPILE% %-c% -o %LTOBJ% `test -f '%SOURCE%' || echo '$(srcdir)/'`%SOURCE%