Commit 1c420e852cfb7b670b72354db2f15ffc5e120b0f
1 parent
5b6cf45f
Add maintainer mode to build
Showing
5 changed files
with
41 additions
and
9 deletions
README-maintainer
| ... | ... | @@ -4,17 +4,17 @@ ROUTINE DEVELOPMENT |
| 4 | 4 | |
| 5 | 5 | Default: |
| 6 | 6 | |
| 7 | -./configure CXX="g++ --std=c++14" --enable-werror --enable-doc-maintenance | |
| 7 | +./configure CXX="g++ --std=c++14" --enable-werror --enable-maintainer-mode | |
| 8 | 8 | |
| 9 | 9 | Debugging: |
| 10 | 10 | |
| 11 | 11 | ./configure CXX="g++ --std=c++14" CFLAGS="-g" CXXFLAGS="-g" \ |
| 12 | - --enable-werror --disable-shared | |
| 12 | + --enable-werror --disable-shared --enable-maintainer-mode | |
| 13 | 13 | |
| 14 | 14 | Profiling: |
| 15 | 15 | |
| 16 | 16 | ./configure CXX="g++ --std=c++14" CFLAGS="-g -pg" CXXFLAGS="-g -pg" \ |
| 17 | - LDFLAGS="-pg" --enable-werror --disable-shared | |
| 17 | + LDFLAGS="-pg" --enable-werror --disable-shared --enable-maintainer-mode | |
| 18 | 18 | |
| 19 | 19 | Then run `gprof gmon.out`. Note that gmon.out is not cumulative. |
| 20 | 20 | |
| ... | ... | @@ -24,7 +24,7 @@ Memory checks: |
| 24 | 24 | CXXFLAGS="-fsanitize=address -fsanitize=undefined -g" \ |
| 25 | 25 | LDFLAGS="-fsanitize=address -fsanitize=undefined" \ |
| 26 | 26 | CC=clang CXX="clang++ --std=c++14" \ |
| 27 | - --enable-werror --disable-shared | |
| 27 | + --enable-werror --disable-shared --enable-maintainer-mode | |
| 28 | 28 | |
| 29 | 29 | |
| 30 | 30 | CHECKING DOCS ON readthedocs | ... | ... |
autoconf.mk.in
| ... | ... | @@ -34,6 +34,7 @@ LIBTOOL=@LIBTOOL@ |
| 34 | 34 | USE_CRYPTO_NATIVE=@USE_CRYPTO_NATIVE@ |
| 35 | 35 | USE_CRYPTO_OPENSSL=@USE_CRYPTO_OPENSSL@ |
| 36 | 36 | USE_CRYPTO_GNUTLS=@USE_CRYPTO_GNUTLS@ |
| 37 | +MAINTAINER_MODE=@MAINTAINER_MODE@ | |
| 37 | 38 | SPHINX=@SPHINX@ |
| 38 | 39 | BUILD_HTML=@BUILD_HTML@ |
| 39 | 40 | BUILD_PDF=@BUILD_PDF@ | ... | ... |
autofiles.sums
| 1 | -c2704f4dca902266b5356fc80558ee642a5df6fac0ca97367903cb62efef5e75 configure.ac | |
| 1 | +16ac2eb6f8e5b191f8f89d6447338b672c43c49c6d682b17a489ae584d38de4c configure.ac | |
| 2 | 2 | d3f9ee6f6f0846888d9a10fd3dad2e4b1258be84205426cf04d7cef02d61dad7 aclocal.m4 |
| 3 | 3 | c12d837479fa9a3fa4c278b6dc7d6b449503d663e0f0d294305595a51ff43f70 libqpdf/qpdf/qpdf-config.h.in |
| 4 | 4 | 5297971a0ef90bcd5563eb3f7127a032bb76d3ae2af7258bf13479caf8983a60 m4/ax_cxx_compile_stdcxx.m4 | ... | ... |
configure
| ... | ... | @@ -722,6 +722,7 @@ SHA256SUM |
| 722 | 722 | ACLOCAL |
| 723 | 723 | AUTOHEADER |
| 724 | 724 | AUTOCONF |
| 725 | +MAINTAINER_MODE | |
| 725 | 726 | target_alias |
| 726 | 727 | host_alias |
| 727 | 728 | build_alias |
| ... | ... | @@ -764,6 +765,7 @@ SHELL' |
| 764 | 765 | ac_subst_files='' |
| 765 | 766 | ac_user_opts=' |
| 766 | 767 | enable_option_checking |
| 768 | +enable_maintainer_mode | |
| 767 | 769 | enable_check_autofiles |
| 768 | 770 | enable_shared |
| 769 | 771 | enable_static |
| ... | ... | @@ -1445,6 +1447,10 @@ Optional Features: |
| 1445 | 1447 | --disable-option-checking ignore unrecognized --enable/--with options |
| 1446 | 1448 | --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) |
| 1447 | 1449 | --enable-FEATURE[=ARG] include FEATURE [ARG=yes] |
| 1450 | + --enable-maintainer-mode | |
| 1451 | + turn on features intended for maintainers that may | |
| 1452 | + change generated files and require additional tools; | |
| 1453 | + implies enable-doc-maintenances | |
| 1448 | 1454 | --enable-check-autofiles |
| 1449 | 1455 | if specified, verify checksums on automatically |
| 1450 | 1456 | generated files (default=yes); package maintainers |
| ... | ... | @@ -1488,7 +1494,8 @@ Optional Features: |
| 1488 | 1494 | console; useful for building on build servers where |
| 1489 | 1495 | you can't easily open the test output files |
| 1490 | 1496 | --enable-doc-maintenance |
| 1491 | - if set, enables all documentation options | |
| 1497 | + if set, enables all documentation options; also | |
| 1498 | + turned on by maintainer mode | |
| 1492 | 1499 | --enable-html-doc whether to build HTML documents |
| 1493 | 1500 | --enable-pdf-doc whether to build PDF documents |
| 1494 | 1501 | --enable-oss-fuzz if set, build static fuzzers for oss-fuzz |
| ... | ... | @@ -2647,6 +2654,19 @@ ac_config_files="$ac_config_files libqpdf.map" |
| 2647 | 2654 | ac_config_headers="$ac_config_headers libqpdf/qpdf/qpdf-config.h" |
| 2648 | 2655 | |
| 2649 | 2656 | |
| 2657 | + | |
| 2658 | +# Check whether --enable-maintainer-mode was given. | |
| 2659 | +if test "${enable_maintainer_mode+set}" = set; then : | |
| 2660 | + enableval=$enable_maintainer_mode; if test "$enableval" = "no"; then | |
| 2661 | + MAINTAINER_MODE=0 | |
| 2662 | + else | |
| 2663 | + MAINTAINER_MODE=1 | |
| 2664 | + fi | |
| 2665 | +else | |
| 2666 | + MAINTAINER_MODE=0 | |
| 2667 | +fi | |
| 2668 | + | |
| 2669 | + | |
| 2650 | 2670 | # Check whether --enable-check-autofiles was given. |
| 2651 | 2671 | if test "${enable_check_autofiles+set}" = set; then : |
| 2652 | 2672 | enableval=$enable_check_autofiles; if test "$enableval" = "no"; then |
| ... | ... | @@ -18594,7 +18614,7 @@ if test "${enable_doc_maintenance+set}" = set; then : |
| 18594 | 18614 | doc_default=0; |
| 18595 | 18615 | fi |
| 18596 | 18616 | else |
| 18597 | - doc_default=0 | |
| 18617 | + doc_default=$MAINTAINER_MODE | |
| 18598 | 18618 | fi |
| 18599 | 18619 | |
| 18600 | 18620 | ... | ... |
configure.ac
| ... | ... | @@ -10,6 +10,17 @@ AC_CONFIG_FILES([libqpdf.pc]) |
| 10 | 10 | AC_CONFIG_FILES([libqpdf.map]) |
| 11 | 11 | AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h]) |
| 12 | 12 | |
| 13 | +AC_SUBST(MAINTAINER_MODE) | |
| 14 | +AC_ARG_ENABLE(maintainer-mode, | |
| 15 | + AS_HELP_STRING([--enable-maintainer-mode], | |
| 16 | + [turn on features intended for maintainers that may change generated files and require additional tools; implies enable-doc-maintenances]), | |
| 17 | + [if test "$enableval" = "no"; then | |
| 18 | + MAINTAINER_MODE=0 | |
| 19 | + else | |
| 20 | + MAINTAINER_MODE=1 | |
| 21 | + fi], | |
| 22 | + [MAINTAINER_MODE=0]) | |
| 23 | + | |
| 13 | 24 | AC_ARG_ENABLE(check-autofiles, |
| 14 | 25 | AS_HELP_STRING([--enable-check-autofiles], |
| 15 | 26 | [if specified, verify checksums on automatically generated files (default=yes); package maintainers may want to disable this]), |
| ... | ... | @@ -801,13 +812,13 @@ AC_CHECK_PROG(SPHINX,sphinx-build,sphinx-build,[]) |
| 801 | 812 | |
| 802 | 813 | AC_ARG_ENABLE(doc-maintenance, |
| 803 | 814 | AS_HELP_STRING([--enable-doc-maintenance], |
| 804 | - [if set, enables all documentation options]), | |
| 815 | + [if set, enables all documentation options; also turned on by maintainer mode]), | |
| 805 | 816 | [if test "$enableval" = "yes"; then |
| 806 | 817 | doc_default=1; |
| 807 | 818 | else |
| 808 | 819 | doc_default=0; |
| 809 | 820 | fi], |
| 810 | - [doc_default=0]) | |
| 821 | + [doc_default=$MAINTAINER_MODE]) | |
| 811 | 822 | |
| 812 | 823 | BUILD_HTML=0 |
| 813 | 824 | AC_SUBST(BUILD_HTML) | ... | ... |