]> granicus.if.org Git - pgbouncer/commitdiff
Few build fixes
authorMarko Kreen <markokr@gmail.com>
Tue, 20 Dec 2011 15:01:55 +0000 (17:01 +0200)
committerMarko Kreen <markokr@gmail.com>
Tue, 20 Dec 2011 15:01:55 +0000 (17:01 +0200)
- drop fixman.py, not needed
- support srcdir != builddir
- make 'doc' proper subdir

Makefile
configure.ac
doc/Makefile
doc/fixman.py [deleted file]
lib

index d5ba6e3d43f05d5a98de9d8721d1824f10bea389..4fb77730ae7992f1ac0aabe14aac062dc8e99c54 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -40,27 +40,26 @@ pgbouncer_SOURCES = \
        include/util.h \
        include/varcache.h
 
+pgbouncer_CPPFLAGS = -Iinclude
+
 pgbouncer_EMBED_LIBUSUAL = 1
 
 # docs to install as-is
-dist_doc_DATA = doc/overview.txt doc/usage.txt doc/config.txt doc/todo.txt doc/faq.txt \
-               README NEWS etc/pgbouncer.ini etc/userlist.txt
+dist_doc_DATA = README NEWS etc/pgbouncer.ini etc/userlist.txt
 
 DISTCLEANFILES = config.mak config.status lib/usual/config.h
 
-# manpages
-man_MANS = doc/pgbouncer.1 doc/pgbouncer.5
-
 SUBDIRS = doc
 
 # files in tgz
 EXTRA_DIST = AUTHORS COPYRIGHT Makefile \
             config.mak.in etc/mkauth.py \
             config.sub config.guess install-sh autogen.sh \
-            configure configure.ac debian/packages debian/changelog doc/Makefile \
+            configure configure.ac \
+            debian/compat debian/changelog debian/control debian/rules debian/copyright \
             test/Makefile test/asynctest.c test/conntest.sh test/ctest6000.ini \
             test/ctest7000.ini test/run-conntest.sh test/stress.py test/test.ini \
-            test/test.sh test/userlist.txt etc/example.debian.init.sh doc/fixman.py \
+            test/test.sh test/userlist.txt etc/example.debian.init.sh \
             win32/Makefile \
             $(shell cd lib; git ls-files | sed 's,^,lib/,') \
             lib/usual/config.h.in
@@ -79,7 +78,7 @@ LIBS :=
 EXTRA_pgbouncer_SOURCES = win32/win32support.c win32/win32support.h
 EXTRA_PROGRAMS = pgbevent
 ifeq ($(PORTNAME),win32)
-pgbouncer_CPPFLAGS = -I$(srcdir)/win32
+pgbouncer_CPPFLAGS += -Iwin32
 pgbouncer_SOURCES += $(EXTRA_pgbouncer_SOURCES)
 bin_PROGRAMS += pgbevent
 endif
@@ -99,7 +98,7 @@ AM_LANG_RC_LINK = false
 # now load antimake
 #
 
-USUAL_DIR = $(top_srcdir)/lib
+USUAL_DIR = lib
 
 abs_top_srcdir ?= $(CURDIR)
 include $(abs_top_srcdir)/lib/mk/antimake.mk
index 3cde6b566153eed2c2def6c87c3e721145f7c5ea..363c2c0144c642d48eac88f63d1ebd9726a1bdb5 100644 (file)
@@ -139,10 +139,6 @@ AC_USUAL_DEBUG
 AC_USUAL_CASSERT
 AC_USUAL_WERROR
 
-if test \! "$srcdir" = "$builddir"; then
-  CPPFLAGS="-I\$(builddir)/include $CPPFLAGS"
-fi
-
 dnl Output findings
 AC_OUTPUT([config.mak])
 
index 28a058988e42d44902c57859aa213f34179af343..318afba9f818b30ee11cc06d9c45250b4a6a0e60 100644 (file)
@@ -1,63 +1,33 @@
-
-web = pgf:/home/pgfoundry.org/groups/pgbouncer/htdocs/
-
 -include ../config.mak
 
-MANPAGES = pgbouncer.1 pgbouncer.5
-HTML = config.html usage.html todo.html faq.html README.html
-
-#FIXMAN = python fixman.py
-FIXMAN = cat
-
-ifneq ($(ASCIIDOC),)
-all: $(MANPAGES)
-install: $(MANPAGES)
-       mkdir -p $(DESTDIR)$(mandir)/man1/
-       mkdir -p $(DESTDIR)$(mandir)/man5/
-       install -m 644 pgbouncer.1 $(DESTDIR)$(mandir)/man1/
-       install -m 644 pgbouncer.5 $(DESTDIR)$(mandir)/man5/
-else
-all:
+web = pgf:/home/pgfoundry.org/groups/pgbouncer/htdocs/
 
-install:
-       mkdir -p $(DESTDIR)$(mandir)/man1/
-       mkdir -p $(DESTDIR)$(mandir)/man5/
-       test -f pgbouncer.1 && install -m 644 pgbouncer.1 $(DESTDIR)$(mandir)/man1/
-       test -f pgbouncer.5 && install -m 644 pgbouncer.5 $(DESTDIR)$(mandir)/man5/
-endif
+manpages = pgbouncer.1 pgbouncer.5
+EXTRA_DIST = config.txt usage.txt todo.txt faq.txt Makefile $(manpages)
+man_MANS = $(manpages)
+doc_DATA = config.html usage.html todo.html faq.html README.html
 
-html: $(HTML)
+SUBLOC = doc
+XMLTO ?= xmlto
+ASCIIDOC ?= asciidoc
+abs_top_srcdir ?= $(CURDIR)/..
+include $(abs_top_srcdir)/lib/mk/antimake.mk
 
-ifneq ($(XMLTO),)
 pgbouncer.1: usage.xml
-       xmlto man $<
+       $(XMLTO) man $<
 
 pgbouncer.5: config.xml
-       xmlto man $<
-endif
+       $(XMLTO) man $<
 
-ifneq ($(ASCIIDOC),)
 %.xml: %.txt
-       #asciidoc -b docbook -d manpage -o - $< > $@
-       asciidoc -b docbook -d manpage -o - $< \
-       | $(FIXMAN) > $@
+       $(ASCIIDOC) -b docbook -d manpage -o $@ $<
 
 %.html: %.txt
-       asciidoc -a toc $<
+       $(ASCIIDOC) -a toc -o $@ $<
 
 README.html: ../README
-       asciidoc -a toc -o $@ $<
-endif
-
-clean:
-       rm -f *.html
-
-distclean: clean
-       rm -f *.xml
-
-realclean: distclean
-       rm -f *.[1-9]
+       $(ASCIIDOC) -a toc -o $@ $<
 
-web: $(HTML)
-       rsync -av $(HTML) $(web)/doc/
+web: $(doc_DATA)
+       rsync -av $(doc_DATA) $(web)/doc/
 
diff --git a/doc/fixman.py b/doc/fixman.py
deleted file mode 100755 (executable)
index 55f930b..0000000
+++ /dev/null
@@ -1,11 +0,0 @@
-#! /usr/bin/env python
-
-import sys,re
-
-# hacks to force empty lines into manpage
-ln1 = r"\1<simpara></simpara>\2"
-xml = sys.stdin.read()
-xml = re.sub(r"(</literallayout>\s*)(<simpara)", ln1, xml)
-xml = re.sub(r"(</variablelist>\s*)(<simpara)", ln1, xml)
-sys.stdout.write(xml)
-
diff --git a/lib b/lib
index 5c1fbc72da6ff7e448189e537b992d6bc3b40fce..031f6d73fa3f482aaf4ffc77e1d3f7d9f3fe7af5 160000 (submodule)
--- a/lib
+++ b/lib
@@ -1 +1 @@
-Subproject commit 5c1fbc72da6ff7e448189e537b992d6bc3b40fce
+Subproject commit 031f6d73fa3f482aaf4ffc77e1d3f7d9f3fe7af5