xref: /PHP-7.3/build/build2.mk (revision 1c850bfc)
1#  +----------------------------------------------------------------------+
2#  | PHP Version 7                                                        |
3#  +----------------------------------------------------------------------+
4#  | Copyright (c) 1997-2018 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
17include generated_lists
18
19TOUCH_FILES = mkinstalldirs install-sh missing
20
21LT_TARGETS = ltmain.sh config.guess config.sub
22
23config_h_in = main/php_config.h.in
24
25targets = $(TOUCH_FILES) configure $(config_h_in)
26
27PHP_AUTOCONF ?= 'autoconf'
28PHP_AUTOHEADER ?= 'autoheader'
29
30SUPPRESS_WARNINGS ?= 2>&1 | (egrep -v '(AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used)'||true)
31
32all: $(targets)
33
34$(config_h_in): configure
35# explicitly remove target since autoheader does not seem to work
36# correctly otherwise (timestamps are not updated)
37	@echo rebuilding $@
38	@rm -f $@
39	$(PHP_AUTOHEADER) $(SUPPRESS_WARNINGS)
40
41$(TOUCH_FILES):
42	touch $(TOUCH_FILES)
43
44aclocal.m4: configure.ac acinclude.m4
45	@echo rebuilding $@
46	cat acinclude.m4 ./build/libtool.m4 > $@
47
48configure: aclocal.m4 configure.ac $(config_m4_files)
49	@echo rebuilding $@
50	@rm -f $@
51	$(PHP_AUTOCONF) -f $(SUPPRESS_WARNINGS)
52