🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.unix.programmer
Article #3755

Re: A simple make rule looks hard....

#3755
From: Eli Zaretskii
Date: Sat, 16 Feb 2002 06:45
11 lines
1392 bytes
Steve Simmons wrote:
> 
> .1.man .2.man .3.man:
>         cp $< /usr/local/man/man$(S)/$<
> 
> where $(S) is the suffix 1, 2, 3, etc.  Damned if I can find a
> way to get the suffix as any of gnu makes canned variables.

Did you miss the description of the $(suffix) built-in function in the
manual?  AFAICS, something like $(subst .,,$(suffix $<)) should do what you
want.  (Warning: untested!)
Technical Details
Message-ID: <3C6E0014.E0A67815@is.elta.co.il>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!192.116.55.139!not-for-mail
References: <3c6d5bc3$0$16579$4c41069e@reader0.ash.ops.us.uu.net>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit
X-Google-Thread: 109f73,dc69bb7b45b9a336
X-Google-Attributes: gid109f73,public
X-Google-Thread: fc89c,dc69bb7b45b9a336
X-Google-Attributes: gidfc89c,public
X-Google-ArrivalTime: 2002-02-15 22:47:16 PST
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!fu-berlin.de!uni-berlin.de!192.116.55.139!not-for-mail
From: Eli Zaretskii <eliz@is.elta.co.il>
Newsgroups: comp.unix.programmer,gnu.utils.help
Subject: Re: A simple make rule looks hard....
Date: Sat, 16 Feb 2002 08:45:40 +0200
Lines: 11
Message-ID: <3C6E0014.E0A67815@is.elta.co.il>
References: <3c6d5bc3$0$16579$4c41069e@reader0.ash.ops.us.uu.net>
NNTP-Posting-Host: 192.116.55.139
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Trace: fu-berlin.de 1013842034 1140087 192.116.55.139 (16 [61365])
X-Mailer: Mozilla 4.7 [en] (Win98; I)
X-Accept-Language: en