Thread View: gnu.utils.bug
1 messages
1 total messages
Started by mf
Fri, 24 Nov 1989 09:49
gnumake 3.57
Author: mf
Date: Fri, 24 Nov 1989 09:49
Date: Fri, 24 Nov 1989 09:49
29 lines
1388 bytes
1388 bytes
Wildcard characters and functions do not work in static pattern rules.
The following is an excerpt of a Makefile in a directory including
3 (say) man pages, pp.1, qq.2, rr.3, which should end up in
/usr/local/man/man{1,2,3}, respectively, when one of the destination
is out of date. (Makefile is in the "source" directory, not the
destination one).
MANDIR = /usr/local/man
PAGES = pp.1 qq.2 rr.3
DESTPAGES = $(foreach page, $(PAGES), $(MANDIR)/man$(suffix $(page))/$(page))
$(DESTPAGES) : % : @(notdir %)
install -c -g wheel -m 0644 $< $(MANDIR)/man$(suffix $<)
The static rule was meant to say /usr/local/man/man1/pp.1 depends on
pp.1 etc... But the way % works, the stem is added on the right
hand side *after* the @notdir is invoked.
I tried
$(DESTPAGES) : $(MANDIR)/man?/% : %
but this does not work, either. The only solution I found was to have
separate rules for each section, which is a drag. Any suggestions?
Thanks!
Michael Fingerhut
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads