source: trunk/essentials/sys-devel/automake-1.8/m4/make.m4

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

automake 1.8.5

File size: 2.0 KB
Line 
1# Check to see how 'make' treats includes. -*- Autoconf -*-
2
3# Copyright (C) 2001, 2002, 2003 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# serial 2
21
22# AM_MAKE_INCLUDE()
23# -----------------
24# Check to see how make treats includes.
25AC_DEFUN([AM_MAKE_INCLUDE],
26[am_make=${MAKE-make}
27cat > confinc << 'END'
28am__doit:
29 @echo done
30.PHONY: am__doit
31END
32# If we don't find an include directive, just comment out the code.
33AC_MSG_CHECKING([for style of include used by $am_make])
34am__include="#"
35am__quote=
36_am_result=none
37# First try GNU make style include.
38echo "include confinc" > confmf
39# We grep out `Entering directory' and `Leaving directory'
40# messages which can occur if `w' ends up in MAKEFLAGS.
41# In particular we don't look at `^make:' because GNU make might
42# be invoked under some other name (usually "gmake"), in which
43# case it prints its new name instead of `make'.
44if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
45 am__include=include
46 am__quote=
47 _am_result=GNU
48fi
49# Now try BSD make style include.
50if test "$am__include" = "#"; then
51 echo '.include "confinc"' > confmf
52 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
53 am__include=.include
54 am__quote="\""
55 _am_result=BSD
56 fi
57fi
58AC_SUBST([am__include])
59AC_SUBST([am__quote])
60AC_MSG_RESULT([$_am_result])
61rm -f confinc confmf
62])
Note: See TracBrowser for help on using the repository browser.