diff options
Diffstat (limited to 'buildlib')
-rw-r--r-- | buildlib/configure.mak | 2 | ||||
-rw-r--r-- | buildlib/defaults.mak | 1 | ||||
-rw-r--r-- | buildlib/environment.mak.in | 3 | ||||
-rw-r--r-- | buildlib/yodl_manpage.mak | 42 |
4 files changed, 47 insertions, 1 deletions
diff --git a/buildlib/configure.mak b/buildlib/configure.mak index 2338717b2..b6a847961 100644 --- a/buildlib/configure.mak +++ b/buildlib/configure.mak @@ -22,5 +22,5 @@ aclocal.m4: $(BUILDDIR)/config.status: configure test -e $(BUILDDIR) || mkdir $(BUILDDIR) (HERE=`pwd`; cd $(BUILDDIR) && $$HERE/configure) -$(addprefix $(BUILDDIR)/,$(CONVERTED)): $(BUILDDIR)/config.status +$(addprefix $(BUILDDIR)/,$(CONVERTED)): (cd $(BUILDDIR) && ./config.status) diff --git a/buildlib/defaults.mak b/buildlib/defaults.mak index 464e82ff3..f46e6156c 100644 --- a/buildlib/defaults.mak +++ b/buildlib/defaults.mak @@ -63,6 +63,7 @@ DEBIANDOC_H = $(BASE)/buildlib/debiandoc.mak MANPAGE_H = $(BASE)/buildlib/manpage.mak PROGRAM_H = $(BASE)/buildlib/program.mak COPY_H = $(BASE)/buildlib/copy.mak +YODL_MANPAGE_H = $(BASE)/buildlib/yodl_manpage.mak ifdef STATICLIBS LIBRARY_H += $(BASE)/buildlib/staticlibrary.mak diff --git a/buildlib/environment.mak.in b/buildlib/environment.mak.in index 9b13c72a6..6af5ebe42 100644 --- a/buildlib/environment.mak.in +++ b/buildlib/environment.mak.in @@ -19,6 +19,9 @@ INLINEDEPFLAG = -MD DEBIANDOC_HTML = @DEBIANDOC_HTML@ DEBIANDOC_TEXT = @DEBIANDOC_TEXT@ +# YODL for the man pages +YODL_MAN = @YODL_MAN@ + # Various library checks X11LIB = @X11LIB@ GPMLIB = @GPMLIB@ diff --git a/buildlib/yodl_manpage.mak b/buildlib/yodl_manpage.mak new file mode 100644 index 000000000..a5f436f60 --- /dev/null +++ b/buildlib/yodl_manpage.mak @@ -0,0 +1,42 @@ +# -*- make -*- + +# This handles man pages in YODL format. We convert to the respective +# output in the source directory then copy over to the final dest. This +# means yodl is only needed if compiling from CVS + +# Input +# $(SOURCE) - The documents to use, in the form foo.sect, ie apt-cache.8 +# the yodl files are called apt-cache.8.yo + +# See defaults.mak for information about LOCAL + +# Some local definitions +ifdef YODL_MAN + +LOCAL := yodl-manpage-$(firstword $(SOURCE)) +$(LOCAL)-LIST := $(SOURCE) + +# Install generation hooks +doc: $($(LOCAL)-LIST) +veryclean: veryclean/$(LOCAL) + +$($(LOCAL)-LIST) :: % : %.yo + echo Creating man page $@ + yodl2man -o $@ $< + +# Clean rule +.PHONY: veryclean/$(LOCAL) +veryclean/$(LOCAL): + -rm -rf $($(@F)-LIST) + +else + +# Strip from the source list any man pages we dont have compiled already +SOURCE := $(wildcard $(SOURCE)) + +endif + +# Chain to the manpage rule +ifneq ($(words $(SOURCE)),0) +include $(MANPAGE_H) +endif |