#
# Goal: build a debian package with all manpages of the DROPS
#       project
#


L4DIR=../..

MANPAGES := $(L4DIR)/pkg/rmgr/man/rmgr.man \
		$(wildcard $(L4DIR)/pkg/l4sys/lib/man/*.man)

PACKAGE = manpages-drops
VERSION = $(shell head -1 debian/changelog | cut -d\( -f2 | cut -d\) -f1)

prefix = /usr/local
mandir = ${prefix}/man

install = /usr/bin/install

all:

clean:
	rm -fr debbuild build-stamp configure-stamp debian/$(PACKAGE)

install:
	$(install) -d -m 755 $(DESTDIR)/$(mandir)/man2
	for manpage in $(MANPAGES); do \
	  $(install) -m 644 $$manpage \
	       $(DESTDIR)/$(mandir)/man2/$$(basename $$manpage .man).2; \
	done

.PHONY: all clean
