3 # This make fragment is included by the toplevel make to handle configure
4 # and setup. It defines a target called startup that when run will init
5 # the build directory, generate configure from configure.ac, create aclocal
6 # and has rules to run config.status should one of the .in files change.
9 # BUILDDIR - The build directory
10 # CONVERTED - List of files output by configure $(BUILD) is prepended
11 # The caller must provide depends for these files
12 # It would be a fairly good idea to run this after a cvs checkout.
15 .PHONY
: startup missing-config-files
16 startup
: configure
$(BUILDDIR
)/config.status
$(addprefix $(BUILDDIR
)/,$(CONVERTED
))
18 # use the files provided from the system instead of carry around
19 # and use (most of the time outdated) copycats
20 ifeq (file-okay
,$(shell test -r buildlib
/config.sub
&& echo
'file-okay'))
23 ifeq (file-okay
,$(shell test -r
/usr
/share
/misc
/config.sub
&& echo
'file-okay'))
25 ln
-sf
/usr
/share
/misc
/config.sub buildlib
/config.sub
27 buildlib
/config.sub
: missing-config-files
31 ifeq (file-okay
,$(shell test -r buildlib
/config.guess
&& echo
'file-okay'))
32 buildlib
/config.guess
:
34 ifeq (file-okay
,$(shell test -r
/usr
/share
/misc
/config.guess
&& echo
'file-okay'))
35 buildlib
/config.guess
:
36 ln
-sf
/usr
/share
/misc
/config.guess buildlib
/config.guess
38 buildlib
/config.guess
: missing-config-files
43 @echo
"APT needs 'config.guess' and 'config.sub' in buildlib/ for configuration."
44 @echo
"On Debian systems these are available in the 'autotools-dev' package."
46 @echo
"The latest versions can be acquired from the upstream git repository:"
47 @echo
"http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD"
48 @echo
"http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.sub;hb=HEAD"
51 configure
: aclocal.m4 configure.ac buildlib
/config.guess buildlib
/config.sub
54 aclocal.m4
: $(wildcard buildlib
/*.m4
)
57 $(BUILDDIR
)/config.status
: configure
58 /usr
/bin
/test -e
$(BUILDDIR
) || mkdir
$(BUILDDIR
)
59 (HERE
=`pwd`; cd
$(BUILDDIR
) && $$HERE/configure
)
61 $(addprefix $(BUILDDIR
)/,$(CONVERTED
)): $(BUILDDIR
)/config.status