xref: /PHP-5.3/build/build2.mk (revision 2df73864)
1#  +----------------------------------------------------------------------+
2#  | PHP Version 5                                                        |
3#  +----------------------------------------------------------------------+
4#  | Copyright (c) 1997-2007 The PHP Group                                |
5#  +----------------------------------------------------------------------+
6#  | This source file is subject to version 3.01 of the PHP license,      |
7#  | that is bundled with this package in the file LICENSE, and is        |
8#  | available through the world-wide-web at the following url:           |
9#  | http://www.php.net/license/3_01.txt                                  |
10#  | If you did not receive a copy of the PHP license and are unable to   |
11#  | obtain it through the world-wide-web, please send a note to          |
12#  | license@php.net so we can mail you a copy immediately.               |
13#  +----------------------------------------------------------------------+
14#  | Author: Sascha Schumann <sascha@schumann.cx>                         |
15#  +----------------------------------------------------------------------+
16#
17# $Id$
18#
19
20include generated_lists
21
22TOUCH_FILES = mkinstalldirs install-sh missing
23
24LT_TARGETS = ltmain.sh config.guess config.sub
25
26config_h_in = main/php_config.h.in
27
28acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
29
30targets = $(TOUCH_FILES) configure $(config_h_in)
31
32PHP_AUTOCONF ?= 'autoconf'
33PHP_AUTOHEADER ?= 'autoheader'
34
35SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
36
37all: $(targets)
38
39acconfig.h: $(acconfig_h_SOURCES)
40	@echo rebuilding $@
41	cat $(acconfig_h_SOURCES) > $@
42
43$(config_h_in): configure acconfig.h
44# explicitly remove target since autoheader does not seem to work
45# correctly otherwise (timestamps are not updated)
46	@echo rebuilding $@
47	@rm -f $@
48	$(PHP_AUTOHEADER) $(SUPPRESS_WARNINGS)
49
50$(TOUCH_FILES):
51	touch $(TOUCH_FILES)
52
53aclocal.m4: configure.in acinclude.m4
54	@echo rebuilding $@
55	cat acinclude.m4 ./build/libtool.m4 > $@
56
57configure: aclocal.m4 configure.in $(config_m4_files)
58	@echo rebuilding $@
59	$(PHP_AUTOCONF) $(SUPPRESS_WARNINGS)
60
61