1 # $Id: autoconf.mk,v 1.8 2012/11/19 05:37:48 sjg Exp $
3 # @(#) Copyright (c) 1996-2009, Simon J. Gerraty
5 # This file is provided in the hope that it will
6 # be of use. There is absolutely NO WARRANTY.
7 # Permission to copy, redistribute or otherwise
8 # use this file is hereby granted provided that
9 # the above copyright notice and this notice are
12 # Please send copies of changes and bug-fixes to:
16 .NOPATH
: config.h config.status
19 config.h
: ${.CURDIR
}/config.h.in config.status
23 .if
!target
(config.status
)
24 # avoid the targets behaving differently
25 .if exists
(${.OBJDIR
}/config.status
)
26 config.status
: config.recheck
28 config.status
: config.gen
31 config.recheck
: config.h.in
${.CURDIR
}/configure
32 .
/config.status
--recheck
35 config.gen
: config.h.in
${.CURDIR
}/configure
36 CC
="${CC} ${CCMODE}" ${.CURDIR
}/configure
--no-create
${CONFIGURE_ARGS}
37 @touch
$@ config.recheck
39 CLEANFILES
+= config.recheck config.gen config.status
*.meta
42 # avoid things blowing up if these are not here...
43 # this is not quite per the autoconf manual,
44 # and is extremely convoluted - but all utterly necessary!
46 .if make
(autoconf-in
) || make
(configure
) || make
(config.h.in
) ||
${AUTO_AUTOCONF
:Uno
:tl
} == "yes"
48 AUTOHEADER ?
= autoheader
50 # expand it to a full path
51 AUTOCONF
:= ${AUTOCONF
:${M_whence}}
53 .if exists
(${AUTOCONF})
55 .PRECIOUS
: configure config.h.in config.status
60 .if exists
(${.CURDIR
}/aclocal.m4
)
63 # use of acconfig.h is deprecated!
64 .if exists
(${.CURDIR
}/acconfig.h
)
65 ACCONFIG
+= acconfig.h
68 config.h.in
: ${.CURDIR
}/configure.in
${ACCONFIG}
69 (cd
${.CURDIR
} && ${AUTOHEADER})
71 configure
: ${.CURDIR
}/configure.in
${ACLOCAL}
72 (cd
${.CURDIR
} && ${AUTOCONF})
74 AUTOCONF_INPUTS
+= configure
75 autoconf-input
: ${AUTOCONF_INPUTS}