groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: an angry rant about *BSD Make


From: G. Branden Robinson
Subject: Re: an angry rant about *BSD Make
Date: Wed, 30 Mar 2022 06:37:17 +1100
User-agent: NeoMutt/20180716

At 2022-03-29T21:04:54+0200, Ingo Schwarze wrote:
> This works for me and seems pretty simple and straightforward:
> 
>   SUFFIXES += .me.in
> 
>   .me.in.me:
>       $(GROFF_V)$(MKDIR_P) `dirname $@` && $(DOC_SED) $< >$@

It _doesn't_ work for me in a stripped-down scenario.

$ cat hello.me.in
.p
We're going to run @g@troff.
$ cat Makefile.double-suffix.gnu
SUFFIXES += .me.in
.me.in.me:
        sed 's/@g@//' $< >$@

all: hello.me

clean:
        rm -f *.me
$ make -f Makefile.double-suffix.gnu
make: *** No rule to make target 'hello.me', needed by 'all'.  Stop.

Adding '.me' to the 'SUFFIXES' macro/variable doesn't help.

The following works with NetBSD make ("bmake" on my Debian system) and
GNU Make, but '.SUFFIXES' is unfortunately forbidden by Automake.

$ cat Makefile.double-suffix
.SUFFIXES: .me.in .me
#.SUFFIXES: .me.in
.me.in.me:
        sed 's/@g@//' $< >$@

all: hello.me

clean:
        rm -f *.me

Note the commented line, corresponding to your original example.  _Both_
suffixes must be present.  (In the groff build, I think '.in' is already
in 'SUFFIXES', either thanks to "hdtbl.am" or GNU Make or Automake's own
internal pre-definitions.)

Regards,
Branden

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]