You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by ns...@apache.org on 2012/11/25 20:33:44 UTC
[2/2] git commit: Add distcheck-hook for checking optional files
Add distcheck-hook for checking optional files
Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/bb549780
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/bb549780
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/bb549780
Branch: refs/heads/docs
Commit: bb549780e9a0c56af38ef993fa0be4eb94654e45
Parents: 98d4afc
Author: Noah Slater <ns...@apache.org>
Authored: Sun Nov 25 19:33:19 2012 +0000
Committer: Noah Slater <ns...@apache.org>
Committed: Sun Nov 25 19:33:19 2012 +0000
----------------------------------------------------------------------
bin/Makefile.am | 9 +++++++++
build-aux/dist-error | 26 ++++++++++++++++++++++++++
share/doc/build/Makefile.am | 13 +++++++++++++
src/couchdb/priv/Makefile.am | 9 +++++++++
4 files changed, 57 insertions(+), 0 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/couchdb/blob/bb549780/bin/Makefile.am
----------------------------------------------------------------------
diff --git a/bin/Makefile.am b/bin/Makefile.am
index 676651b..c8c2ddb 100644
--- a/bin/Makefile.am
+++ b/bin/Makefile.am
@@ -143,3 +143,12 @@ install-data-local:
uninstall-local:
rm -f $(DESTDIR)$(man1dir)/$(man_file)
+
+distcheck-hook:
+ if test ! -s $(man_file); then \
+ $(top_srcdir)/build-aux/dist-error $(man_file)
+ else \
+ if test ! `cat $(man_file) | wc -l` -gt 1; then \
+ $(top_srcdir)/build-aux/dist-error $(man_file); \
+ fi
+ fi
http://git-wip-us.apache.org/repos/asf/couchdb/blob/bb549780/build-aux/dist-error
----------------------------------------------------------------------
diff --git a/build-aux/dist-error b/build-aux/dist-error
new file mode 100755
index 0000000..3762c76
--- /dev/null
+++ b/build-aux/dist-error
@@ -0,0 +1,26 @@
+#!/bin/sh -e
+
+# Licensed under the Apache License, Version 2.0 (the "License"); you may not
+# use this file except in compliance with the License. You may obtain a copy of
+# the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+# License for the specific language governing permissions and limitations under
+# the License.
+
+# This script is called by the build system and is used to provide an error
+# about missing or empty files. Some files are optional, and will be built when
+# the environment allows. But these files are required for distribution.
+
+cat << EOF
+ERROR: The following file is missing or incomplete:
+
+ $1
+
+ This file is optional at build and install time,
+ but is required when preparing a distribution.
+EOF
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/couchdb/blob/bb549780/share/doc/build/Makefile.am
----------------------------------------------------------------------
diff --git a/share/doc/build/Makefile.am b/share/doc/build/Makefile.am
index dda8a5a..55fd8ac 100644
--- a/share/doc/build/Makefile.am
+++ b/share/doc/build/Makefile.am
@@ -296,3 +296,16 @@ distclean-local:
rm -fr html
rm -fr latex
rm -fr texinfo
+
+distcheck-hook:
+ if test ! -s $(info_file_dist); then\
+ $(top_srcdir)/build-aux/dist-error $(info_file_dist)
+ fi
+ if test ! -s $(pdf_file_dist); then\
+ $(top_srcdir)/build-aux/dist-error $(pdf_file_dist)
+ fi
+ for file in $(html_files); do \
+ if test ! -s $$file; then \
+ $(top_srcdir)/build-aux/dist-error $$file; \
+ fi \
+ done
http://git-wip-us.apache.org/repos/asf/couchdb/blob/bb549780/src/couchdb/priv/Makefile.am
----------------------------------------------------------------------
diff --git a/src/couchdb/priv/Makefile.am b/src/couchdb/priv/Makefile.am
index a7435fc..2444585 100644
--- a/src/couchdb/priv/Makefile.am
+++ b/src/couchdb/priv/Makefile.am
@@ -138,3 +138,12 @@ uninstall-local:
if test -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver"; then \
rm -f "$(DESTDIR)$(couchprivlibdir)/couch_erl_driver.so"; \
fi
+
+distcheck-hook:
+ if test ! -s $(man_file); then \
+ $(top_srcdir)/build-aux/dist-error $(man_file)
+ else \
+ if test ! `cat $(man_file) | wc -l` -gt 1; then \
+ $(top_srcdir)/build-aux/dist-error $(man_file); \
+ fi
+ fi