xref: /PHP-7.0/scripts/Makefile.frag (revision 699ab98f)
1
2#
3# Build environment install
4#
5
6phpincludedir = $(includedir)/php
7phpbuilddir = $(libdir)/build
8
9BUILD_FILES = \
10	scripts/phpize.m4 \
11	build/mkdep.awk \
12	build/scan_makefile_in.awk \
13	build/libtool.m4 \
14	build/ax_check_compile_flag.m4 \
15	Makefile.global \
16	acinclude.m4 \
17	ltmain.sh \
18	run-tests.php
19
20BUILD_FILES_EXEC = \
21	build/shtool \
22	config.guess \
23	config.sub
24
25bin_SCRIPTS = phpize php-config
26man_PAGES = phpize php-config
27
28install-build:
29	@echo "Installing build environment:     $(INSTALL_ROOT)$(phpbuilddir)/"
30	@$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
31	(cd $(top_srcdir) && \
32	$(INSTALL) $(BUILD_FILES_EXEC) $(INSTALL_ROOT)$(phpbuilddir) && \
33	$(INSTALL_DATA) $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
34
35install-programs: $(builddir)/phpize $(builddir)/php-config
36	@echo "Installing helper programs:       $(INSTALL_ROOT)$(bindir)/"
37	@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
38	@for prog in $(bin_SCRIPTS); do \
39		echo "  program: $(program_prefix)$${prog}$(program_suffix)"; \
40		$(INSTALL) -m 755 $(builddir)/$${prog} $(INSTALL_ROOT)$(bindir)/$(program_prefix)$${prog}$(program_suffix); \
41	done
42	@echo "Installing man pages:             $(INSTALL_ROOT)$(mandir)/man1/"
43	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
44	@for page in $(man_PAGES); do \
45		echo "  page: $(program_prefix)$${page}$(program_suffix).1"; \
46		$(INSTALL_DATA) $(builddir)/man1/$${page}.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)$${page}$(program_suffix).1; \
47	done
48
49$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
50	(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
51
52$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
53	(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
54