%% "Michael Sterrett -Mr. Bones.-" <[EMAIL PROTECTED]> writes:
ms> Is there a more elegant way of dealing with man pages other then:
ms> $(MANDIR)/man1/%.1: %.1
ms> $(INSTALL) -v -m664 $(<) $(@)
ms> $(MANDIR)/man2/%.2: %.2
ms> $(INSTALL) -v -m664 $(<) $(@)
...
Not really.
ms> It would be really cool if I could do:
ms> $(MANDIR)/man(\d)/(.*).(\d): $2.$3
ms> $(INSTALL) -v -m664 $(<) $(@)
ms> But that's just perl-influenced wishing. ;-)
Your only other choice is the favourite: auto-re-exec with an included
makefile:
include man-install.mk
man-install.mk: Makefile
@rm -f $@
@for m in 1 2 3 5 8; do \
echo '$$(MANDIR)/man'"$$m/%.$$m: %.$$m ; "'$$(INSTALL) -v -m664 $$< $$@'
>> $@ \
done
Untested, but you get the idea. Probably messier than just writing out
the individual rules, but... :)
--
-------------------------------------------------------------------------------
Paul D. Smith <[EMAIL PROTECTED]> Find some GNU make tips at:
http://www.gnu.org http://www.paulandlesley.org/gmake/
"Please remain calm...I may be mad, but I am a professional." --Mad Scientist