Hi,
On Thu, Mar 04, 2010 at 04:07:15PM -0800, Ross Walker wrote:
> I am hoping I can get some help figuring out the syntax in the AMBER
> Makefiles. The following is what I want to do, in what I believe is
> understandable. However this is not the right syntax. Does anyone know what
> this should look like?
>
> in $AMBERHOME/src/pmemd/src/Makefile.amber
>
> CUDA_DPDP_TOKEN=Duse_DPDP
> CUDA_SPSP_TOKEN=Duse_SPSP
>
> cuda: configured_cuda pmemd.cuda$(SFX)
> .( \
> if grep $(CUDA_SPSP_TOKEN) $(CONFIG_FILE) > /dev/null ; then \
> mv pmemd.cuda$(SFX) $(BINDIR)/pmemd.cuda_SPSP$(SFX)
> elif grep $(CUDA_DPDP_TOKEN) $(CONFIG_FILE) > /dev/null ; then \
> mv pmemd.cuda$(SFX) $(BINDIR)/pmemd.cuda_DPDP$(SFX)
> else ; then \
> mv pmemd.cuda$(SFX) $(BINDIR)
> fi ;\
> )
your just missing ;\ on the end of your mv's:
mv pmemd.cuda$(SFX) $(BINDIR)/pmemd.cuda_SPSP$(SFX) ;\
Another minor improvement is to make your redirections bullet proof:
if grep $(CUDA_SPSP_TOKEN) $(CONFIG_FILE) 1> /dev/null 2>&1 ; then \
I recall some issues with the exit status of grep on some non-Linux
unices; i dont remember the details and a quick check of some cvs logs
didnt find any bread crumbs; other targets use grep; so probably best to
ignore.
scott
_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Thu Mar 04 2010 - 16:30:06 PST