From: Marko Kreen Date: Tue, 20 Dec 2011 15:01:55 +0000 (+0200) Subject: Few build fixes X-Git-Tag: pgbouncer_1_5_rc1~10 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=800f0292271be9aa7c1a0065f824e60454bd9348;p=pgbouncer Few build fixes - drop fixman.py, not needed - support srcdir != builddir - make 'doc' proper subdir --- diff --git a/Makefile b/Makefile index d5ba6e3..4fb7773 100644 --- 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 diff --git a/configure.ac b/configure.ac index 3cde6b5..363c2c0 100644 --- a/configure.ac +++ b/configure.ac @@ -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]) diff --git a/doc/Makefile b/doc/Makefile index 28a0589..318afba 100644 --- a/doc/Makefile +++ b/doc/Makefile @@ -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 index 55f930b..0000000 --- a/doc/fixman.py +++ /dev/null @@ -1,11 +0,0 @@ -#! /usr/bin/env python - -import sys,re - -# hacks to force empty lines into manpage -ln1 = r"\1\2" -xml = sys.stdin.read() -xml = re.sub(r"(\s*)(\s*)(