Re: replacing $<

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

 



Hello.

moseley@xxxxxxxx wrote:
> 
> Solaris 2.6, Autoconf 2.57.
> 
> I guess I need to replace my use of $< in a Makefile.
> 
> In a Makefile.in I have:
> 
> %.1: ../pod/%.pod
>         pod2man --center="SWISH-E Documentation" --lax --release='$(VERSION)' $< > $@
> 
> When I build on Solaris $< doesn't seem to get used:
> 
> pod2man --center="SWISH-E Documentation" --lax --release='2.4.0-pr4-2003-10-19'    > swish-e.1
> *** Error code 2 (ignored)
> 
> Notice that the $< isn't being supplied.
> 
> I don't really understand the problem, but is my only solution to create
> a separate rule for each .pod -> .1 file?
> 
> I guess I'm looking for an example of how to correctly write the above.

Maybe you could use a double suffix rule. Perhaps something like this:

.pod.1:
    pod2man --center="SWISH-E Documentation" \
            --lax --release='$(VERSION)' $< > $@

I'm not sure how to get that to work with your ../pod path, though.

The pattern rules (e.g.: "%.o: %.c") don't seem to be in the Single Unix
Specification and therefore may not be very portable across Unices. (I use
them all the time on Linux, though.)

Hope that's some help.

Bye, Rich =]

-- 
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]

"You can't evaluate a man by logic alone." -- McCoy, "I, Mudd", Star Trek



[Index of Archives]     [GCC Help]     [Kernel Discussion]     [RPM Discussion]     [Red Hat Development]     [Yosemite News]     [Linux USB]     [Samba]

  Powered by Linux