2008-02-10 01:43:52 +03:00
|
|
|
|
2010-06-23 18:55:55 +04:00
|
|
|
targ = for k in $(MANPAGES); do echo $$k | sed 's/ .*//'; done
|
2010-08-29 16:53:15 +04:00
|
|
|
TARG:= $(shell $(targ))
|
|
|
|
TARG!= $(targ)
|
2010-06-23 18:55:55 +04:00
|
|
|
|
2008-12-10 02:06:10 +03:00
|
|
|
all: $(TARG)
|
2010-06-23 18:55:55 +04:00
|
|
|
install: $(TARG:.1=.install) $(TARG:.3=.install) maninstall
|
|
|
|
uninstall: $(TARG:.1=.uninstall) $(TARG:.3=.uninstall) manuninstall
|
|
|
|
|
|
|
|
.PHONY: maninstall manuninstall
|
|
|
|
|
|
|
|
MANLOOP = \
|
|
|
|
set -ef; \
|
|
|
|
for k in $(MANPAGES); do \
|
|
|
|
set -- $$k; \
|
|
|
|
real=$$1; shift; \
|
|
|
|
for targ; do \
|
|
|
|
_ $$real $(MAN)/man$${real\#\#*.}/$$targ; \
|
|
|
|
done; \
|
|
|
|
done
|
|
|
|
maninstall:
|
|
|
|
_() { echo LN $$1 $${2##*/}; ln -sf $$1 $(DESTDIR)$$2; }; $(MANLOOP)
|
|
|
|
manuninstall:
|
|
|
|
_() { echo RM $${2##*/}; rm -f $(DESTDIR)$$2; }; $(MANLOOP)
|
2007-03-26 08:48:00 +04:00
|
|
|
|
|
|
|
printinstall:
|
|
|
|
echo 'Install directories:'
|
2008-01-18 01:50:35 +03:00
|
|
|
echo ' Man: $(MAN)'
|
2007-03-26 08:48:00 +04:00
|
|
|
|