pipadoc uses some bashisms
[nobug.git] / Makefile.am
blob4328a165e2c2a192fb7e66109f36b6e8bdb41d18
1 # This file is part of the NoBug debugging library.
3 # Copyright (C)
4 #   2007, 2008, 2009,   Christian Thaeter <ct@pipapo.org>
6 # This program is free software; you can redistribute it and/or modify
7 # it under the terms of the GNU General Public License as published by
8 # the Free Software Foundation; either version 2 of the License, or
9 # (at your option) any later version.
11 # This program is distributed in the hope that it will be useful,
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14 # GNU General Public License for more details.
16 # You should have received a copy of the GNU General Public License
17 # along with this program; if not, contact Christian Thaeter <ct@pipapo.org>.
19 include_HEADERS                         = src/nobug.h
20 pcdir                                   = $(libdir)/pkgconfig
21 pc_DATA                                 = nobug.pc nobugmt.pc
23 ACLOCAL_AMFLAGS = -I m4
25 AM_CFLAGS = -std=gnu99 -Wall -Wextra -Werror
27 CLEANFILES =
28 EXTRA_DIST =
30 ##### single-threading variant
32 lib_LTLIBRARIES                         = libnobug.la
33 libnobug_la_SOURCES                     = src/nobug.c src/nobug_env.c src/nobug_ringbuffer.c src/nobug_resources.c src/mpool.c
34 libnobug_la_CFLAGS                      = $(AM_CFLAGS) @VALGRIND_CFLAGS@
35 libnobug_la_CPPFLAGS                    = -DNOBUG_USE_PTHREAD=0
37 bin_PROGRAMS                            = nobug_rbdump
38 nobug_rbdump_SOURCES                    = src/nobug_rbdump.c
39 nobug_rbdump_LDADD                      = libnobug.la
40 nobug_rbdump_CFLAGS                     = $(AM_CFLAGS) @VALGRIND_CFLAGS@
42 noinst_HEADERS                          = src/llist.h src/mpool.h
44 ##### multi-threading variant
46 if HAVE_THREADING
48 lib_LTLIBRARIES                         += libnobugmt.la
49 libnobugmt_la_SOURCES                   = src/nobug.c src/nobug_env.c src/nobug_ringbuffer.c src/nobug_resources.c src/nobug_thread.c src/mpool.c
50 libnobugmt_la_CFLAGS                    = $(AM_CFLAGS) @PTHREAD_CFLAGS@ @VALGRIND_CFLAGS@
52 endif   # HAVE_THREADING
54 ##### Testsuite
56 include tests/Makefile.am
59 ##### maintainer targets
60 CLEANFILES      += nobug_manual.txt
61 EXTRA_DIST      += pipadoc doc/nobug_manual.conf doc/asciidoc.pawk doc/verbatim.pawk
63 manual_ASCIIDOCS = \
64         $(include_HEADERS) \
65         $(libnobugmt_la_SOURCES) \
66         $(nobug_rbdump_SOURCES)
68 nobug_manual.txt: doc/nobug_manual.conf doc/asciidoc.pawk doc/verbatim.pawk $(manual_ASCIIDOCS) $(wildcard $(top_srcdir)/doc/*.txt)
69         @which gawk >/dev/null || ( echo "gawk not installed!"; exit 1; )
70         ( cd $(top_srcdir) ; ./pipadoc doc/nobug_manual.conf doc/asciidoc.pawk doc/verbatim.pawk        \
71                 $(patsubst $(top_srcdir)/%,%,$(wildcard $(top_srcdir)/doc/*.txt))               \
72                 $(manual_ASCIIDOCS) ) >$(top_builddir)/nobug_manual.txt
75 .txt.html:
76         asciidoc -a toc $<
78 .txt.pdf:
79         a2x -f pdf $<
81 .txt.ps: .txt
82         a2x -f ps $<
84 README: nobug_manual.txt
85         cp nobug_manual.txt $(top_srcdir)/README || true
87 doc: nobug_manual.html nobug_manual.pdf
89 # TODO create manpage
91 ChangeLog:
92         git whatchanged | sed -e 's/:.*\.\.\.//' > $(top_srcdir)/ChangeLog
94 release: dist ChangeLog README
95         list='$(DIST_ARCHIVES)'; for i in $$list; do \
96                 gpg -s $$i;\
97                 rm $$i;\
98         done