mirror of
https://github.com/qpdf/qpdf.git
synced 2025-01-03 07:12:28 +00:00
Automatically detect outdated generated files
Update documentation to reflect that automatically generated files are committed. Detect when they are outdated if we have the ability to regenerate them.
This commit is contained in:
parent
d1368a3851
commit
aa864d2142
14
Makefile
14
Makefile
@ -97,12 +97,7 @@ $(foreach B,$(BUILD_ITEMS),$(eval \
|
|||||||
clean_$(B): ; \
|
clean_$(B): ; \
|
||||||
$(RM) -r $(B)/$(OUTPUT_DIR)))
|
$(RM) -r $(B)/$(OUTPUT_DIR)))
|
||||||
|
|
||||||
AUTOFILES = configure aclocal.m4 libqpdf/qpdf/qpdf-config.h.in
|
DISTFILES = doc/qpdf-manual.html doc/qpdf-manual.pdf
|
||||||
autofiles.zip: $(AUTOFILES)
|
|
||||||
$(RM) autofiles.zip
|
|
||||||
zip autofiles.zip $(AUTOFILES)
|
|
||||||
|
|
||||||
DISTFILES = $(AUTOFILES) doc/qpdf-manual.html doc/qpdf-manual.pdf
|
|
||||||
distfiles.zip: $(DISTFILES)
|
distfiles.zip: $(DISTFILES)
|
||||||
$(RM) distfiles.zip
|
$(RM) distfiles.zip
|
||||||
zip distfiles.zip $(DISTFILES)
|
zip distfiles.zip $(DISTFILES)
|
||||||
@ -116,10 +111,9 @@ distclean: clean
|
|||||||
$(RM) libqpdf.pc libqpdf.map
|
$(RM) libqpdf.pc libqpdf.map
|
||||||
|
|
||||||
maintainer-clean: distclean
|
maintainer-clean: distclean
|
||||||
$(RM) configure doc/qpdf-manual.* libqpdf/qpdf/qpdf-config.h.in
|
$(RM) doc/qpdf-manual.*
|
||||||
$(RM) aclocal.m4
|
$(RM) -r install-mingw* install-msvc* external-libs
|
||||||
$(RM) -r install-mingw install-msvc external-libs
|
$(RM) distfiles.zip
|
||||||
$(RM) autofiles.zip distfiles.zip
|
|
||||||
|
|
||||||
.PHONY: $(TEST_TARGETS)
|
.PHONY: $(TEST_TARGETS)
|
||||||
|
|
||||||
|
@ -269,10 +269,10 @@ If building or editing documentation, configure with
|
|||||||
`--enable-doc-maintenance`. This will ensure that all tools or files
|
`--enable-doc-maintenance`. This will ensure that all tools or files
|
||||||
required to validate and build documentation are available.
|
required to validate and build documentation are available.
|
||||||
|
|
||||||
If you want to run `make maintainer-clean`, `make distclean`, or `make
|
If you want to run `make maintainer-clean` or `make distclean` and you
|
||||||
autofiles.zip` and you haven't run `./configure`, you can pass
|
haven't run `./configure`, you can pass `CLEAN=1` to make on the
|
||||||
`CLEAN=1` to make on the command line to prevent it from complaining
|
command line to prevent it from complaining about configure not having
|
||||||
about configure not having been run.
|
been run.
|
||||||
|
|
||||||
If you want to run checks without rerunning the build, pass
|
If you want to run checks without rerunning the build, pass
|
||||||
`NO_REBUILD=1` to make. This can be useful for special testing
|
`NO_REBUILD=1` to make. This can be useful for special testing
|
||||||
@ -283,10 +283,8 @@ LOCAL WINDOWS TESTING PROCEDURE
|
|||||||
|
|
||||||
This is what I do for routine testing on Windows.
|
This is what I do for routine testing on Windows.
|
||||||
|
|
||||||
From Linux, run `./autogen.sh` and `make autofiles.zip CLEAN=1`.
|
From Windows, git clone from my Linux clone, and unzip
|
||||||
|
`external-libs`.
|
||||||
From Windows, git clone from my Linux clone, unzip `external-libs`,
|
|
||||||
and unzip `autofiles.zip`.
|
|
||||||
|
|
||||||
Look at `make_windows_releases`. Set up path the same way and run
|
Look at `make_windows_releases`. Set up path the same way and run
|
||||||
whichever `./config-*` is appropriate for whichever compiler I need to
|
whichever `./config-*` is appropriate for whichever compiler I need to
|
||||||
|
@ -40,7 +40,7 @@ You can also download `qpdf-external-libs-src.zip` and follow the instructions i
|
|||||||
|
|
||||||
# Building from version control
|
# Building from version control
|
||||||
|
|
||||||
If you check out qpdf from version control, you will not have the files that are generated by autoconf. If you are not changing these files, you can grab them from a source distribution or create them from a system that has autoconf. To create them from scratch, run `./autogen.sh` on a system that has autoconf installed. Once you have them, you can run `make CLEAN=1 autofiles.zip`. This will create an autofiles.zip that you can extract on top of a fresh checkout.
|
If you check out qpdf from version control, documentation files will not be generated or installed. Documentation files are included in the source distribution, but they can only be built from Linux.
|
||||||
|
|
||||||
# Building with MinGW
|
# Building with MinGW
|
||||||
|
|
||||||
|
@ -1,4 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
aclocal -I m4
|
aclocal -I m4
|
||||||
autoheader
|
autoheader
|
||||||
autoconf
|
autoconf
|
||||||
|
md5sum configure.ac m4/* >| autofiles.sums
|
||||||
|
@ -4,7 +4,6 @@ sudo apt-get update
|
|||||||
sudo apt-get -y install \
|
sudo apt-get -y install \
|
||||||
autoconf build-essential zlib1g-dev libjpeg-dev \
|
autoconf build-essential zlib1g-dev libjpeg-dev \
|
||||||
docbook-xsl fop xsltproc libxml2-utils inkscape imagemagick
|
docbook-xsl fop xsltproc libxml2-utils inkscape imagemagick
|
||||||
./autogen.sh
|
|
||||||
./configure --enable-werror --enable-doc-maintenance \
|
./configure --enable-werror --enable-doc-maintenance \
|
||||||
--enable-show-failed-test-output
|
--enable-show-failed-test-output
|
||||||
make -j$(nproc)
|
make -j$(nproc)
|
||||||
|
16
configure.ac
16
configure.ac
@ -11,6 +11,22 @@ AC_CONFIG_FILES([libqpdf.pc])
|
|||||||
AC_CONFIG_FILES([libqpdf.map])
|
AC_CONFIG_FILES([libqpdf.map])
|
||||||
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
|
AC_CONFIG_HEADERS([libqpdf/qpdf/qpdf-config.h])
|
||||||
|
|
||||||
|
# Check to see if automatically generated files are outdated and if we
|
||||||
|
# can update them.
|
||||||
|
AC_CHECK_PROG(AUTOCONF,autoconf,1,0)
|
||||||
|
AC_CHECK_PROG(AUTOHEADER,autoheader,1,0)
|
||||||
|
AC_CHECK_PROG(ACLOCAL,aclocal,1,0)
|
||||||
|
AC_CHECK_PROG(MD5SUM,md5sum,1,0)
|
||||||
|
if test "$AUTOCONF$AUTOHEADER$ACLOCAL$MD5SUM" = "1111"; then
|
||||||
|
if ! md5sum configure.ac m4/* | diff - autofiles.sums; then
|
||||||
|
AC_MSG_ERROR(autofiles are autodated; rerun autogen.sh)
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
if md5sum configure.ac m4/* | diff -q - autofiles.sums; then
|
||||||
|
echo "Automatically generated files are stale; rerun autogen.sh"
|
||||||
|
fi
|
||||||
|
|
||||||
AC_PROG_CC
|
AC_PROG_CC
|
||||||
AC_PROG_CC_C99
|
AC_PROG_CC_C99
|
||||||
AC_PROG_CXX
|
AC_PROG_CXX
|
||||||
|
@ -111,7 +111,6 @@ auth
|
|||||||
AuthEvent
|
AuthEvent
|
||||||
autobuilder
|
autobuilder
|
||||||
autoconf
|
autoconf
|
||||||
autofiles
|
|
||||||
autogen
|
autogen
|
||||||
autoheader
|
autoheader
|
||||||
autolabel
|
autolabel
|
||||||
|
Loading…
Reference in New Issue
Block a user