🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #560

gnumake 3.57

#560
From: mf
Date: Fri, 24 Nov 1989 09:49
29 lines
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
Technical Details
Message-ID: <8911240949.AA18570@igor.ircam.fr>
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!ircam!mf

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!tmsoft!torsqnt!jarvis.csri.toronto.edu!rutgers!tut.cis.ohio-state.edu!UUNET.UU.NET!ircam!mf
From: ircam!mf@UUNET.UU.NET (mf)
Newsgroups: gnu.utils.bug
Subject: gnumake 3.57
Message-ID: <8911240949.AA18570@igor.ircam.fr>
Date: 24 Nov 89 09:49:36 GMT
Sender: daemon@tut.cis.ohio-state.edu
Distribution: gnu
Organization: GNUs Not Usenet
Lines: 29