xref: /PHP-7.4/scripts/Makefile.frag (revision 4e7064d1)
1#
2# Build environment install
3#
4
5phpincludedir = $(includedir)/php
6phpbuilddir = $(libdir)/build
7
8BUILD_FILES = \
9	scripts/phpize.m4 \
10	build/libtool.m4 \
11	build/ltmain.sh \
12	build/ax_check_compile_flag.m4 \
13	build/ax_gcc_func_attribute.m4 \
14	build/php_cxx_compile_stdcxx.m4 \
15	build/pkg.m4 \
16	build/Makefile.global \
17	build/php.m4 \
18	run-tests.php
19
20BUILD_FILES_EXEC = \
21	build/shtool \
22	build/config.guess \
23	build/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