source: trunk/essentials/sys-devel/automake-1.9/m4/depout.m4

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

automake 1.9.6

File size: 2.6 KB
Line 
1# Generate code to set up dependency tracking. -*- Autoconf -*-
2
3# Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005
4# Free Software Foundation, Inc.
5#
6# This file is free software; the Free Software Foundation
7# gives unlimited permission to copy and/or distribute it,
8# with or without modifications, as long as this notice is preserved.
9
10#serial 3
11
12# _AM_OUTPUT_DEPENDENCY_COMMANDS
13# ------------------------------
14AC_DEFUN([_AM_OUTPUT_DEPENDENCY_COMMANDS],
15[for mf in $CONFIG_FILES; do
16 # Strip MF so we end up with the name of the file.
17 mf=`echo "$mf" | sed -e 's/:.*$//'`
18 # Check whether this is an Automake generated Makefile or not.
19 # We used to match only the files named `Makefile.in', but
20 # some people rename them; so instead we look at the file content.
21 # Grep'ing the first line is not enough: some people post-process
22 # each Makefile.in and add a new line on top of each file to say so.
23 # So let's grep whole file.
24 if grep '^#.*generated by automake' $mf > /dev/null 2>&1; then
25 dirpart=`AS_DIRNAME("$mf")`
26 else
27 continue
28 fi
29 # Extract the definition of DEPDIR, am__include, and am__quote
30 # from the Makefile without running `make'.
31 DEPDIR=`sed -n 's/^DEPDIR = //p' < "$mf"`
32 test -z "$DEPDIR" && continue
33 am__include=`sed -n 's/^am__include = //p' < "$mf"`
34 test -z "am__include" && continue
35 am__quote=`sed -n 's/^am__quote = //p' < "$mf"`
36 # When using ansi2knr, U may be empty or an underscore; expand it
37 U=`sed -n 's/^U = //p' < "$mf"`
38 # Find all dependency output files, they are included files with
39 # $(DEPDIR) in their names. We invoke sed twice because it is the
40 # simplest approach to changing $(DEPDIR) to its actual value in the
41 # expansion.
42 for file in `sed -n "
43 s/^$am__include $am__quote\(.*(DEPDIR).*\)$am__quote"'$/\1/p' <"$mf" | \
44 sed -e 's/\$(DEPDIR)/'"$DEPDIR"'/g' -e 's/\$U/'"$U"'/g'`; do
45 # Make sure the directory exists.
46 test -f "$dirpart/$file" && continue
47 fdir=`AS_DIRNAME(["$file"])`
48 AS_MKDIR_P([$dirpart/$fdir])
49 # echo "creating $dirpart/$file"
50 echo '# dummy' > "$dirpart/$file"
51 done
52done
53])# _AM_OUTPUT_DEPENDENCY_COMMANDS
54
55
56# AM_OUTPUT_DEPENDENCY_COMMANDS
57# -----------------------------
58# This macro should only be invoked once -- use via AC_REQUIRE.
59#
60# This code is only required when automatic dependency tracking
61# is enabled. FIXME. This creates each `.P' file that we will
62# need in order to bootstrap the dependency handling code.
63AC_DEFUN([AM_OUTPUT_DEPENDENCY_COMMANDS],
64[AC_CONFIG_COMMANDS([depfiles],
65 [test x"$AMDEP_TRUE" != x"" || _AM_OUTPUT_DEPENDENCY_COMMANDS],
66 [AMDEP_TRUE="$AMDEP_TRUE" ac_aux_dir="$ac_aux_dir"])
67])
Note: See TracBrowser for help on using the repository browser.