xref: /PHP-7.2/sapi/phpdbg/Makefile.frag (revision 60a69dae)
1phpdbg: $(BUILD_BINARY)
2
3phpdbg-shared: $(BUILD_SHARED)
4
5$(BUILD_SHARED): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS)
6	$(BUILD_PHPDBG_SHARED)
7
8$(BUILD_BINARY): $(PHP_GLOBAL_OBJS) $(PHP_BINARY_OBJS) $(PHP_PHPDBG_OBJS)
9	$(BUILD_PHPDBG)
10
11%.c: %.y
12%.c: %.l
13
14$(builddir)/phpdbg_lexer.lo: $(srcdir)/phpdbg_parser.h
15
16$(srcdir)/phpdbg_lexer.c: $(srcdir)/phpdbg_lexer.l
17	@(cd $(top_srcdir); $(RE2C) $(RE2C_FLAGS) --no-generation-date -cbdFo sapi/phpdbg/phpdbg_lexer.c sapi/phpdbg/phpdbg_lexer.l)
18
19$(srcdir)/phpdbg_parser.h: $(srcdir)/phpdbg_parser.c
20$(srcdir)/phpdbg_parser.c: $(srcdir)/phpdbg_parser.y
21	@$(YACC) -p phpdbg_ -v -d $(srcdir)/phpdbg_parser.y -o $@
22
23install-phpdbg: $(BUILD_BINARY)
24	@echo "Installing phpdbg binary:         $(INSTALL_ROOT)$(bindir)/"
25	@$(mkinstalldirs) $(INSTALL_ROOT)$(bindir)
26	@$(mkinstalldirs) $(INSTALL_ROOT)$(localstatedir)/log
27	@$(mkinstalldirs) $(INSTALL_ROOT)$(localstatedir)/run
28	@$(INSTALL) -m 0755 $(BUILD_BINARY) $(INSTALL_ROOT)$(bindir)/$(program_prefix)phpdbg$(program_suffix)$(EXEEXT)
29	@echo "Installing phpdbg man page:       $(INSTALL_ROOT)$(mandir)/man1/"
30	@$(mkinstalldirs) $(INSTALL_ROOT)$(mandir)/man1
31	@$(INSTALL_DATA) sapi/phpdbg/phpdbg.1 $(INSTALL_ROOT)$(mandir)/man1/$(program_prefix)phpdbg$(program_suffix).1
32
33clean-phpdbg:
34	@echo "Cleaning phpdbg object files ..."
35	find sapi/phpdbg/ -name *.lo -o -name *.o | xargs rm -f
36
37test-phpdbg:
38	@echo "Running phpdbg tests ..."
39	@$(top_builddir)/sapi/cli/php sapi/phpdbg/tests/run-tests.php --phpdbg sapi/phpdbg/phpdbg
40
41.PHONY: clean-phpdbg test-phpdbg
42