don't bother resolving onbld python module deps
[unleashed.git] / share / mk / autoconf.mk
blob573a7159957b3b00bfb62d229ebb324c2d32db75
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
10 # left intact.
12 # Please send copies of changes and bug-fixes to:
13 # sjg@crufty.net
16 .NOPATH: config.h config.status
18 .if !target(config.h)
19 config.h: ${.CURDIR}/config.h.in config.status
20 ./config.status
21 .endif
23 .if !target(config.status)
24 # avoid the targets behaving differently
25 .if exists(${.OBJDIR}/config.status)
26 config.status: config.recheck
27 .else
28 config.status: config.gen
29 .endif
31 config.recheck: config.h.in ${.CURDIR}/configure
32 ./config.status --recheck
33 @touch $@
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
40 .endif
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"
47 AUTOCONF ?= autoconf
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
57 ACLOCAL =
58 ACCONFIG =
60 .if exists(${.CURDIR}/aclocal.m4)
61 ACLOCAL += aclocal.m4
62 .endif
63 # use of acconfig.h is deprecated!
64 .if exists(${.CURDIR}/acconfig.h)
65 ACCONFIG += acconfig.h
66 .endif
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}
77 .endif
78 .endif