[MITgcm-devel] genmake2 fails with netcdf on SUN
Martin Losch
mlosch at awi-bremerhaven.de
Wed Jan 5 09:46:10 EST 2005
On Jan 5, 2005, at 3:30 PM, Alistair Adcroft wrote:
> Martin Losch wrote:
>> Good idea .template was not in the line, unfortunately it doesn't
>> make a difference.
>
> Of course it was a good idea. Now try this, replace the lines with a
> rule:
> .template.F:
> cat $< | ...
Alistair, this will not work because the target and depency do not have
the same root name (see for yourself in pkg/mnc/Makefile):
MNC_CW_READWRITE_RS.F: mnc_cw_readwrite.template
cat $< | sed -e 's/RX/RS/g' | sed -e 's/__V/_RS/g' > $@
MNC_CW_READWRITE_RL.F: mnc_cw_readwrite.template
cat $< | sed -e 's/RX/RL/g' | sed -e 's/__V/_RL/g' > $@
MNC_CW_READWRITE_I.F: mnc_cw_readwrite.template
cat $< | sed -e 's/RX/I/g' | sed -e 's/__V/INTEGER/g' > $@
These are actually the only three instances of a .template.F rule. It
may make sense to replace $< with mnc_cw_readwrite.template in these
three cases, as long as Ed didn't plan to extend this Makefile
infinitely. Ed, what's your opinion?
Martin
>
> The $< symbol was originally designed for use in rules.
>
>> I have no clue.
>
> You're too hard on yourself. Maybe you've had too much abuse now.
>
> Your solution of expanding the $< with the actual file name would be
> the most robust but how many instances are there?
>
> A.
> --
> Dr Alistair Adcroft http://www.mit.edu/~adcroft
> MIT Climate Modeling Initiative tel: (617) 253-5938
> EAPS 54-1624, 77 Massachusetts Ave, Cambridge, MA, USA
> _______________________________________________
> MITgcm-devel mailing list
> MITgcm-devel at mitgcm.org
> http://dev.mitgcm.org/mailman/listinfo/mitgcm-devel
More information about the MITgcm-devel
mailing list