xref: /PHP-8.2/scripts/Makefile.frag (revision e11d3b16)
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	build/gen_stub.php \
19	run-tests.php
20
21BUILD_FILES_EXEC = \
22	build/shtool \
23	build/config.guess \
24	build/config.sub
25
26bin_SCRIPTS = phpize php-config
27man_PAGES = phpize php-config
28
29install-build:
30	@echo "Installing build environment:     $(INSTALL_ROOT)$(phpbuilddir)/"
31	@$(mkinstalldirs) $(INSTALL_ROOT)$(phpbuilddir) $(INSTALL_ROOT)$(bindir) && \
32	(cd $(top_srcdir) && \
33	$(INSTALL) $(BUILD_FILES_EXEC) $(INSTALL_ROOT)$(phpbuilddir) && \
34	$(INSTALL_DATA) $(BUILD_FILES) $(INSTALL_ROOT)$(phpbuilddir))
35
36install-programs: $(builddir)/phpize $(builddir)/php-config
37	@echo "Installing helper programs:       $(INSTALL_ROOT)$(bindir)/"
38	@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
39	@for prog in $(bin_SCRIPTS); do \
40		echo "  program: $(program_prefix)$${prog}$(program_suffix)"; \
41		$(INSTALL) -m 755 $(builddir)/$${prog} $(INSTALL_ROOT)$(bindir)/$(program_prefix)$${prog}$(program_suffix); \
42	done
43	@echo "Installing man pages:             $(INSTALL_ROOT)$(mandir)/man1/"
44	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
45	@for page in $(man_PAGES); do \
46		echo "  page: $(program_prefix)$${page}$(program_suffix).1"; \
47		$(INSTALL_DATA) $(builddir)/man1/$${page}.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)$${page}$(program_suffix).1; \
48	done
49
50$(builddir)/phpize: $(srcdir)/phpize.in $(top_builddir)/config.status
51	(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
52
53$(builddir)/php-config: $(srcdir)/php-config.in $(top_builddir)/config.status
54	(CONFIG_FILES=$@ CONFIG_HEADERS= $(top_builddir)/config.status)
55