RE: [AMBER-Developers] Confusing clean targets.

From: Ross Walker <ross.rosswalker.co.uk>
Date: Fri, 29 Jan 2010 14:56:09 -0800

Hi Jason

> Problems in the past have arisen when "clean" made things a bit *too*
> clean. I propose that two levels of clean be kept on, since make -f
> Makefile_at clean is not only necessary before a parallel AT is built,
> but also instructed. Thus, what shouldn't happen is a make clean
> removing libraries that are required for programs built in serial that
> are NOT rebuilt in the parallel build (as I recall, nab especially had
> a problem with this, so what I frequently had to do was make at
> serial, make clean to make at parallel, then make clean and make
> serial again to put the removed libraries back if I forgot to move
> them to a safe place first). Thus, my opinion is that the clean rule
> should remain the way it is, and perhaps consolidate the rest of the
> "cleans" into a single rule that is pretty aggressive in case you want
> to, for instance, switch compilers or something of the sort. This
> could simply be called "uninstall", since I imagine that a rule that
> rips the guts out of an installation should also remove the
> executables as well.

Yes, this is what I am finding looking at things closed. The big problem is
the clean target not cleaning netcdf properly which can cause all sorts of
problems with different compilers etc. I have tweaked things now to contain
the following:

clean
-----
This removes the libraries (.a file) from the lib directory.
Then it cleans netcdf
Then it cleans each src directory.

This means that running make -f Makefile_at clean before building AMBER will
cause it to have to recompile netcdf but this is not such a bad thing.

distclean
---------
This first calls clean
Then calls clean in the test directory
Then removes the config.h file

The last step is problematic because it prevents you for example doing:

make -f Makefile_at distclean
make distclean

since you have to remake the config.h file each time.

This SHOULD go away when we move to a single makefile (as I believe we
should!)

uninstall
---------
This does a uninstall in each src directory which removes the file from the
BINDIR.
Then it removes the .a files in lib.
Then it calls distclean

I have set these up to be the same in Makefile_at and Makefile, with the
ones in Makefile cleaning the AMBER tests etc and the ones in Makefile_at
cleaning the AMBER Tools tests. Previously distclean in Makefile_at was
broken since it used the wrong makefile to do the cleaning in the test tree.

I think this is a reasonable number of clean targets.

Comments?

All the best
Ross

/\
\/
|\oss Walker

| Assistant Research Professor |
| San Diego Supercomputer Center |
| Tel: +1 858 822 0854 | EMail:- ross.rosswalker.co.uk |
| http://www.rosswalker.co.uk | http://www.wmd-lab.org/ |

Note: Electronic Mail is not secure, has no guarantee of delivery, may not
be read every day, and should not be used for urgent or sensitive issues.








_______________________________________________
AMBER-Developers mailing list
AMBER-Developers.ambermd.org
http://lists.ambermd.org/mailman/listinfo/amber-developers
Received on Fri Jan 29 2010 - 15:00:03 PST
Custom Search