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

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

automake 1.9.6

File size: 1.5 KB
Line 
1# Check to see how 'make' treats includes. -*- Autoconf -*-
2
3# Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
4#
5# This file is free software; the Free Software Foundation
6# gives unlimited permission to copy and/or distribute it,
7# with or without modifications, as long as this notice is preserved.
8
9# serial 3
10
11# AM_MAKE_INCLUDE()
12# -----------------
13# Check to see how make treats includes.
14AC_DEFUN([AM_MAKE_INCLUDE],
15[am_make=${MAKE-make}
16cat > confinc << 'END'
17am__doit:
18 @echo done
19.PHONY: am__doit
20END
21# If we don't find an include directive, just comment out the code.
22AC_MSG_CHECKING([for style of include used by $am_make])
23am__include="#"
24am__quote=
25_am_result=none
26# First try GNU make style include.
27echo "include confinc" > confmf
28# We grep out `Entering directory' and `Leaving directory'
29# messages which can occur if `w' ends up in MAKEFLAGS.
30# In particular we don't look at `^make:' because GNU make might
31# be invoked under some other name (usually "gmake"), in which
32# case it prints its new name instead of `make'.
33if test "`$am_make -s -f confmf 2> /dev/null | grep -v 'ing directory'`" = "done"; then
34 am__include=include
35 am__quote=
36 _am_result=GNU
37fi
38# Now try BSD make style include.
39if test "$am__include" = "#"; then
40 echo '.include "confinc"' > confmf
41 if test "`$am_make -s -f confmf 2> /dev/null`" = "done"; then
42 am__include=.include
43 am__quote="\""
44 _am_result=BSD
45 fi
46fi
47AC_SUBST([am__include])
48AC_SUBST([am__quote])
49AC_MSG_RESULT([$_am_result])
50rm -f confinc confmf
51])
Note: See TracBrowser for help on using the repository browser.