Welcome to little lamb

Code » anopa » commit e6c0dc2

Tweak doc generation (use common footer)

author Olivier Brunel
2015-02-21 13:19:23 UTC
committer Olivier Brunel
2015-04-04 12:47:34 UTC
parent c78c78dd582b382fd7b3e809bddce9ee50f284fe

Tweak doc generation (use common footer)

.gitignore +2 -5
Makefile +4 -2
doc/aa-echo.pod +0 -19
doc/aa-enable.pod +0 -19
doc/aa-start.pod +0 -19
doc/aa-stop.pod +0 -19
doc/anopa.pod +0 -20
doc/footer.pod +20 -0
package/targets.mak +5 -5

diff --git a/.gitignore b/.gitignore
index fd1fd1f..6cda3ad 100644
--- a/.gitignore
+++ b/.gitignore
@@ -10,9 +10,6 @@
 /package/deps.mak
 /config.mak
 /src/include/anopa/config.h
-/doc/*.1
+/anopa.1
+/aa-*
 /libanopa.a
-/aa-echo
-/aa-enable
-/aa-start
-/aa-stop
diff --git a/Makefile b/Makefile
index 7fc3726..d6f119e 100644
--- a/Makefile
+++ b/Makefile
@@ -123,8 +123,10 @@ lib%.a:
 lib%.so:
 	exec $(REALCC) -o $@ $(CFLAGS_ALL) $(CFLAGS_SHARED) $(LDFLAGS_ALL) $(LDFLAGS_SHARED) -Wl,-soname,$@.$(version_l) $^
 
-%.1: %.pod
-	exec $(POD2MAN) --center="anopa" --section=1 --release=$(version) $< > $@
+%.1: doc/%.pod doc/footer.pod
+	@exec cat $< doc/footer.pod > $(basename $@).pod
+	exec $(POD2MAN) --center="anopa" --section=1 --release=$(version) $(basename $@).pod > $@
+	@exec rm $(basename $@).pod
 
 .PHONY: it all clean distclean tgz strip install install-dynlib install-bin install-sbin install-lib install-include
 
diff --git a/doc/aa-echo.pod b/doc/aa-echo.pod
index 93d53d7..574d5de 100644
--- a/doc/aa-echo.pod
+++ b/doc/aa-echo.pod
@@ -86,22 +86,3 @@ To print +TEXT
 =back
 
 For example: `aa-echo -w "The file " +r "/foo/bar" +n " doesn't exist"`
-
-=head1 BUGS
-
-They're probably crawling somewhere in there... if you happen to catch one,
-(or more) report it and I'll do my best to squash it.
-
-=head1 REPOSITORY
-
-You can find the latest source code of B<anopa> as well as report bugs and/or
-suggest features on its GitHub repository, available at
-L<https://github.com/jjk-jacky/anopa>
-
-=head1 AUTHOR
-
-=over
-
-=item Olivier Brunel <jjk@jjacky.com>
-
-=back
diff --git a/doc/aa-enable.pod b/doc/aa-enable.pod
index 80efa7a..df7407b 100644
--- a/doc/aa-enable.pod
+++ b/doc/aa-enable.pod
@@ -148,22 +148,3 @@ source directory); Or use a directory to simply specify/add configuration files.
 Note that you can also still provide files from the configuration directory in
 listdir, since it is copied last (and that this always includes providing a new
 I<run> file).
-
-=head1 BUGS
-
-They're probably crawling somewhere in there... if you happen to catch one,
-(or more) report it and I'll do my best to squash it.
-
-=head1 REPOSITORY
-
-You can find the latest source code of B<anopa> as well as report bugs and/or
-suggest features on its GitHub repository, available at
-L<https://github.com/jjk-jacky/anopa>
-
-=head1 AUTHOR
-
-=over
-
-=item Olivier Brunel <jjk@jjacky.com>
-
-=back
diff --git a/doc/aa-start.pod b/doc/aa-start.pod
index 77d5843..2605481 100644
--- a/doc/aa-start.pod
+++ b/doc/aa-start.pod
@@ -134,22 +134,3 @@ simply doing the same again.
 
 Note that it is not possible to show a progress bar while asking for user input,
 not that there should be a need for it anyways.
-
-=head1 BUGS
-
-They're probably crawling somewhere in there... if you happen to catch one,
-(or more) report it and I'll do my best to squash it.
-
-=head1 REPOSITORY
-
-You can find the latest source code of B<anopa> as well as report bugs and/or
-suggest features on its GitHub repository, available at
-L<https://github.com/jjk-jacky/anopa>
-
-=head1 AUTHOR
-
-=over
-
-=item Olivier Brunel <jjk@jjacky.com>
-
-=back
diff --git a/doc/aa-stop.pod b/doc/aa-stop.pod
index df07eaa..c43eba3 100644
--- a/doc/aa-stop.pod
+++ b/doc/aa-stop.pod
@@ -82,22 +82,3 @@ all process further down in stage 3.
 
 Obviously, the script used is I<stop> and not I<start>. Other than that, the
 process is much the same, so you can refer to B<aa-start>(1) for more.
-
-=head1 BUGS
-
-They're probably crawling somewhere in there... if you happen to catch one,
-(or more) report it and I'll do my best to squash it.
-
-=head1 REPOSITORY
-
-You can find the latest source code of B<anopa> as well as report bugs and/or
-suggest features on its GitHub repository, available at
-L<https://github.com/jjk-jacky/anopa>
-
-=head1 AUTHOR
-
-=over
-
-=item Olivier Brunel <jjk@jjacky.com>
-
-=back
diff --git a/doc/anopa.pod b/doc/anopa.pod
index 841ce91..25ead84 100644
--- a/doc/anopa.pod
+++ b/doc/anopa.pod
@@ -336,23 +336,3 @@ L<http://skarnet.org/software/execline/>
 L<http://skarnet.org/software/s6/servicedir.html>
 
 =back
-
-=head1 BUGS
-
-They're probably crawling somewhere in there... if you happen to catch one,
-(or more) report it and I'll do my best to squash it.
-
-=head1 REPOSITORY
-
-You can find the latest source code of B<anopa> as well as report bugs and/or
-suggest features on its GitHub repository, available at
-L<https://github.com/jjk-jacky/anopa>; or visit its official website at
-L<http://jjacky.com/anopa>
-
-=head1 AUTHOR
-
-=over
-
-=item Olivier Brunel <jjk@jjacky.com>
-
-=back
diff --git a/doc/footer.pod b/doc/footer.pod
new file mode 100644
index 0000000..b178101
--- /dev/null
+++ b/doc/footer.pod
@@ -0,0 +1,20 @@
+
+=head1 BUGS
+
+They're probably crawling somewhere in there... if you happen to catch one,
+(or more) report it and I'll do my best to squash it.
+
+=head1 REPOSITORY
+
+You can find the latest source code of B<anopa> as well as report bugs and/or
+suggest features on its GitHub repository, available at
+L<https://github.com/jjk-jacky/anopa>; or visit its official website at
+L<http://jjacky.com/anopa>
+
+=head1 AUTHOR
+
+=over
+
+=item Olivier Brunel <jjk@jjacky.com>
+
+=back
diff --git a/package/targets.mak b/package/targets.mak
index f5a9f1e..a078cfb 100644
--- a/package/targets.mak
+++ b/package/targets.mak
@@ -5,11 +5,11 @@ aa-enable \
 aa-echo
 
 DOC_TARGETS := \
-doc/anopa.1 \
-doc/aa-start.1 \
-doc/aa-stop.1 \
-doc/aa-enable.1 \
-doc/aa-echo.1
+anopa.1 \
+aa-start.1 \
+aa-stop.1 \
+aa-enable.1 \
+aa-echo.1
 
 ifdef DO_ALLSTATIC
 LIBANOPA := libanopa.a