Skip to content

Commit 52e00b8

Browse files
author
foobar
committed
Added --debug option to buildconf
1 parent ed25ab6 commit 52e00b8

File tree

2 files changed

+16
-8
lines changed

2 files changed

+16
-8
lines changed

build/build2.mk

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -32,33 +32,36 @@ acconfig_h_SOURCES = acconfig.h.in $(config_h_files)
3232

3333
targets = $(TOUCH_FILES) configure $(config_h_in)
3434

35+
ifeq ($(SHOW_WARNINGS), no)
36+
SUPPRESS_WARNINGS = 2>&1 | (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times|AC_DECL_YYTEXT is expanded from...|the top level)'||true)
37+
libtoolize_flags = --automake
38+
endif
39+
3540

3641
all: $(targets)
3742

3843
acconfig.h: $(acconfig_h_SOURCES)
3944
@echo rebuilding $@
4045
cat $(acconfig_h_SOURCES) > $@
4146

42-
SUPPRESS_WARNINGS = (egrep -v '(AC_TRY_RUN called without default to allow cross compiling|AC_PROG_CXXCPP was called before AC_PROG_CXX|defined in acinclude.m4 but never used|AC_PROG_LEX invoked multiple times)'||true)
43-
4447
$(config_h_in): configure acconfig.h
4548
# explicitly remove target since autoheader does not seem to work
4649
# correctly otherwise (timestamps are not updated)
4750
@echo rebuilding $@
4851
@rm -f $@
49-
@autoheader 2>&1 | $(SUPPRESS_WARNINGS)
52+
@autoheader $(SUPPRESS_WARNINGS)
5053

5154
$(TOUCH_FILES):
5255
touch $(TOUCH_FILES)
5356

5457
aclocal.m4: configure.in acinclude.m4
5558
@echo rebuilding $@
5659
@libtoolize=`./build/shtool path glibtoolize libtoolize`; \
57-
$$libtoolize --copy --automake; \
60+
$$libtoolize --copy $(libtoolize_flags); \
5861
ltpath=`dirname $$libtoolize`; \
5962
ltfile=`cd $$ltpath/../share/aclocal; pwd`/libtool.m4; \
6063
cat acinclude.m4 $$ltfile > $@
6164

6265
configure: aclocal.m4 configure.in $(config_m4_files)
6366
@echo rebuilding $@
64-
@autoconf 2>&1 | $(SUPPRESS_WARNINGS)
67+
@autoconf $(SUPPRESS_WARNINGS)

buildconf

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ case "$EXTRA_VERSION" in
1212
esac
1313

1414
devok=0
15+
debug=no
1516

1617
while test $# -gt 0; do
1718
if test "$1" = "--copy"; then
@@ -23,6 +24,10 @@ while test $# -gt 0; do
2324
echo "Forcing buildconf"
2425
fi
2526

27+
if test "$1" = "--debug"; then
28+
debug=yes
29+
fi
30+
2631
shift
2732
done
2833

@@ -48,17 +53,17 @@ if test -z "$ZENDDIR"; then
4853
fi
4954
else
5055
if test -r "Zend/zend_execute_globals.h"; then
51-
:
56+
:
5257
else
5358
mv Zend ZendEngine2 2>/dev/null
5459
mv ZendEngine1 Zend
5560
fi
5661
fi
57-
62+
5863
ZENDDIR=Zend
5964
echo "using default Zend directory"
6065
fi
6166

6267
rm -f generated_lists
6368

64-
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR"
69+
${MAKE:-make} -s -f build/build.mk AMFLAGS="$automake_flags" ZENDDIR="$ZENDDIR" SHOW_WARNINGS="$debug"

0 commit comments

Comments
 (0)