Re: [pgadmin-support] Feature request - option to exclude docs when - Mailing list pgadmin-hackers

From Miha Radej
Subject Re: [pgadmin-support] Feature request - option to exclude docs when
Date
Msg-id 4433F40A.1070805@siix.com
Whole thread Raw
Responses Re: [pgadmin-support] Feature request - option to exclude docs
List pgadmin-hackers
Hi!

I've been playing around a bit with this and I am sending attached a
patch which Works For Me(tm).

Since this was my first stab at anything such as this, I do hope it
isn't too horrible :)

The thought was to provide a configure option with which to disable
installation of non-pgAdmin documentation: PostgreSQL and Slony docs.
With the switch omitted, all the documentation should install.

Like I said, this works for me, I've played around a bit and it Seems To
Work(tm) :)

Regards,
Miha

Dave Page wrote:
>> I have the following feature request: is it possible to add
>> an option (maybe at configure time?) which would cause "make
>> install" to exclude installation of the documentation (at
>> least the PostgreSQL and Slony docs)?
>
> Funny, I had the same thought last night when running 'make install'
> into a mac appbundle for the umpteenth time!
Index: acinclude.m4
===================================================================
--- acinclude.m4    (revision 5075)
+++ acinclude.m4    (working copy)
@@ -216,6 +216,25 @@
     ])
 ])

+#################################################################################
+# Check whether to skip installation of external documentation with pgAdmin III #
+#################################################################################
+AC_DEFUN([DISABLE_EXTERN_DOCS],
+[
+    AC_ARG_ENABLE(docs, [  --disable-docs   disable installation of external documentation],
+    [
+        if test "$enableval" = yes
+        then
+            INSTALL_EXTERN_DOCS=yes
+        else
+            INSTALL_EXTERN_DOCS=no
+        fi
+    ],
+    [
+        INSTALL_EXTERN_DOCS=yes
+    ])
+])
+
 #########################################
 # Check for libpq libraries and headers #
 #########################################
@@ -447,6 +466,12 @@
     else
         echo "Building a Mac OS X appbundle:        No"
     fi
+    if test "$INSTALL_EXTERN_DOCS" == yes
+    then
+        echo "Include external documentation:        Yes"
+    else
+        echo "Include external documentation:        No"
+    fi
     echo

     echo "pgAdmin configuration is now complete. You can now compile and"
Index: configure.ac.in
===================================================================
--- configure.ac.in    (revision 5075)
+++ configure.ac.in    (working copy)
@@ -32,7 +32,9 @@
 ENABLE_DEBUG
 ENABLE_STATIC
 ENABLE_APPBUNDLE
+DISABLE_EXTERN_DOCS
 AM_CONDITIONAL([APPBUNDLE], [test x$BUILD_APPBUNDLE = xyes])
+AM_CONDITIONAL([EXTERN_DOCS], [test x$INSTALL_EXTERN_DOCS = xyes])

 LOCATE_POSTGRESQL
 SETUP_POSTGRESQL
Index: Makefile.am
===================================================================
--- Makefile.am    (revision 5075)
+++ Makefile.am    (working copy)
@@ -19,19 +19,15 @@
     $(top_srcdir)/TODO \
     $(top_srcdir)/bootstrap \
     $(top_srcdir)/configure.ac.in \
-        $(top_srcdir)/languages.hwx \
-        $(top_srcdir)/languages.po \
-        $(top_srcdir)/pgadmin3-release.pot \
-        $(top_srcdir)/pgadmin3.pot \
-        $(top_srcdir)/stringextract \
-        $(top_srcdir)/stringextract.bat \
-        $(top_srcdir)/stringmerge
+    $(top_srcdir)/languages.hwx \
+    $(top_srcdir)/languages.po \
+    $(top_srcdir)/pgadmin3-release.pot \
+    $(top_srcdir)/pgadmin3.pot \
+    $(top_srcdir)/stringextract \
+    $(top_srcdir)/stringextract.bat \
+    $(top_srcdir)/stringmerge

-TMP_docs = \
-    $(top_srcdir)/docs/en_US/pg/*.css \
-    $(top_srcdir)/docs/en_US/pg/*.html \
-    $(top_srcdir)/docs/en_US/slony/*.css \
-    $(top_srcdir)/docs/en_US/slony/*.html \
+TMP_docs_local = \
     $(top_srcdir)/docs/en_US/hints/*.html \
     $(top_srcdir)/docs/en_US/images/*.png \
     $(top_srcdir)/docs/en_US/*.html \
@@ -40,7 +36,7 @@
     $(top_srcdir)/docs/en_US/tips.txt \
     $(top_srcdir)/docs/de_DE/tips.txt \
     $(top_srcdir)/docs/de_DE/hints/*.html \
-        $(top_srcdir)/docs/es_ES/tips.txt \
+    $(top_srcdir)/docs/es_ES/tips.txt \
     $(top_srcdir)/docs/es_ES/hints/*.html \
     $(top_srcdir)/docs/fr_FR/*.html \
     $(top_srcdir)/docs/fr_FR/tips.txt \
@@ -48,6 +44,18 @@
     $(top_srcdir)/docs/sl_SI/tips.txt \
     $(top_srcdir)/docs/sl_SI/hints/*.html

+TMP_docs_extern =    $(top_srcdir)/docs/en_US/pg/*.css \
+    $(top_srcdir)/docs/en_US/pg/*.html \
+    $(top_srcdir)/docs/en_US/slony/*.css \
+    $(top_srcdir)/docs/en_US/slony/*.html
+
+if EXTERN_DOCS
+TMP_docs = $(TMP_docs_local) \
+    $(TMP_docs_extern)
+else
+TMP_docs = $(TMP_docs_local)
+endif
+
 if !APPBUNDLE
 nobase_dist_pkgdata_DATA = $(TMP_docs)
 else

pgadmin-hackers by date:

Previous
From: "Dave Page"
Date:
Subject: Re: pgAdmin III 1.4.2 uploaded to Debian/unstable
Next
From: Dave Page
Date:
Subject: Re: [pgadmin-support] Feature request - option to exclude docs