2007-09-06 22:09:11 +00:00
|
|
|
#
|
2008-07-23 05:37:40 +00:00
|
|
|
# (c) 2005-2008 Laurent Vivier <Laurent@lvivier.info>
|
2007-09-06 22:09:11 +00:00
|
|
|
#
|
|
|
|
#
|
|
|
|
|
2005-11-16 14:00:27 +00:00
|
|
|
TOP=$(shell pwd)
|
2005-06-16 05:41:02 +00:00
|
|
|
|
2008-09-05 12:20:41 +00:00
|
|
|
MODULE ?= $(shell basename $(TOP))
|
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
SECTION5 = emile.conf.sgml
|
2005-11-30 00:27:37 +00:00
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
SECTION8 = emile-first-tune.sgml emile-install.sgml emile-map-set.sgml \
|
|
|
|
emile-set-cmdline.sgml emile-set-output.sgml emile.sgml \
|
|
|
|
emile-mkisofs.sgml
|
2005-06-16 05:41:02 +00:00
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
MANPATH ?= /usr/share/man/
|
2005-06-16 05:41:02 +00:00
|
|
|
|
2008-09-05 12:20:41 +00:00
|
|
|
MANPAGES = $(SECTION5:.sgml=.5.gz) $(SECTION8:.sgml=.8.gz)
|
|
|
|
|
|
|
|
DISTFILES ?= $(SECTION5) $(SECTION8) Makefile
|
|
|
|
|
2008-07-23 05:37:40 +00:00
|
|
|
all: man
|
2005-06-16 05:41:02 +00:00
|
|
|
|
2008-09-05 12:20:41 +00:00
|
|
|
%.gz: %
|
|
|
|
gzip -9f $<
|
2008-07-23 05:37:40 +00:00
|
|
|
|
|
|
|
man: $(MANPAGES)
|
2005-06-16 05:41:02 +00:00
|
|
|
|
|
|
|
install: all
|
2008-07-27 16:16:51 +00:00
|
|
|
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)/man5
|
2008-07-23 05:37:40 +00:00
|
|
|
install -m 644 $(SECTION5:.sgml=.5.gz) \
|
|
|
|
$(DESTDIR)/$(PREFIX)/$(MANPATH)/man5
|
2008-07-27 16:16:51 +00:00
|
|
|
install -m 755 -d $(DESTDIR)/$(PREFIX)/$(MANPATH)/man8
|
2008-07-23 05:37:40 +00:00
|
|
|
install -m 644 $(SECTION8:.sgml=.8.gz) \
|
|
|
|
$(DESTDIR)/$(PREFIX)/$(MANPATH)/man8
|
2005-06-16 05:41:02 +00:00
|
|
|
|
|
|
|
uninstall:
|
2008-07-23 05:37:40 +00:00
|
|
|
for file in $(SECTION5:.sgml=.5.gz) ; do \
|
|
|
|
rm -f $(DESTDIR)/$(PREFIX)/$(MANPATH)/man5/$${file}; \
|
|
|
|
done
|
|
|
|
for file in $(SECTION8:.sgml=.8.gz) ; do \
|
|
|
|
rm -f $(DESTDIR)/$(PREFIX)/$(MANPATH)/man8/$${file}; \
|
|
|
|
done
|
2005-11-08 02:18:06 +00:00
|
|
|
|
2008-09-05 12:20:41 +00:00
|
|
|
clean:
|
|
|
|
rm -f $(MANPAGES) $(MANPAGES:.8.gz=.8) $(MANPAGES:.5.gz=.5)
|
|
|
|
|
|
|
|
dist:
|
|
|
|
@echo TAR $(MODULE)
|
|
|
|
@for file in $(DISTFILES); do \
|
|
|
|
dir=$$(dirname $$file); \
|
|
|
|
if [ "$$dir" != "" ] ; then \
|
|
|
|
mkdir -p $(DISTDIR)/$(MODULE)/$$dir; \
|
|
|
|
fi; \
|
|
|
|
cp -p $$file $(DISTDIR)/$(MODULE)/$$file; \
|
|
|
|
done
|
|
|
|
|
2007-09-06 22:09:11 +00:00
|
|
|
include $(TOP)/../tools.mk
|