[GRASS5] Makefile target distclean non-standard
Justin Hickey
jhickey at hpcc.nectec.or.th
Wed Oct 4 00:12:12 EDT 2000
Hello James
James Cameron wrote:
> I just updated from CVS, did a "make distclean", and it deleted stuff
> from /usr/local/grass-5.0b/ ... that's unusual, no other open source
> package I know does that sort of thing.
It's unusual because at this time Grass compilation is unusual :)
> I understood the "distclean" target to mean "cause the source tree to
> return to the state it would have been in at time of distribution and
> unpacking."
>
> The target "uninstall" is for removing /usr/local/grass-5.0b stuff.
The problem here is that you are expecting the make operations to
perform similar to other open source packages. I agree, they should.
Unfortunately, the compilation of Grass is not similar to other packages
yet. In other packages the command "make" usually creates all the files
necessary to run the program under the same directory as the user typed
"make". Then to install the program, the user usually needs root access
and then types "make install". The only thing this target should do is
copy files to a standard location where all users can run the program.
Then as you say, "make uninstall" would remove these copied files.
Unfortunately in Grass, we do not have this situation. The compiled
files are stored under the $PREFIX directory which is usually not the
same as the source directory (I am guessing here since I do not do this
- I always install grass in the same directory as the source). According
to the link you provide below, "distclean" should delete all files
created by the build. Thus, the Grass "distclean" removes files from
$PREFIX since they are the files created by the build. Grass does not
have an "uninstall" target because we never install the program by
copying files to a directory accessible by all users. Therefore, the
Grass clean targets do not perform as you expect because the
installation is not what is expected to begin with.
Since we are currently thinking about changing the directory structure
of grass, and creating a new Makefile system, then I propose that we
include in this overhaul, a change so that Grass compiles similar to
other packages (like I described above). Then the "distclean" and
"uninstall" targets will work as you expect them to. Obviously, a lot of
discussion is required to work out the details, but I believe this is
the way Grass should be compiled.
> See <http://www.gnu.org/manual/make-3.77/html_node/make_118.html> for
> the standard targets.
Thank you for the link. I always wanted to know the usual target names.
> Note that "distclean" should not delete the
> Bison or Flex output files, that job is left for "maintainer-clean".
> That recently added Lex and Yacc clean rule should be part of
> "maintainer-clean".
Well it actually is, I just didn't call it "maintainer-clean", but
"yacclexclean" instead. I'll change the target name to
"maintainer-clean".
So, I propose the following changes to the clean target names based on
the standard GNU target names from the link above.
Change "clean" to "mostlyclean" no dependencies
Change "distclean" to "clean" dependent on "mostlyclean"
Change "veryclean" to "distclean" dependent on "clean"
Change "yacclexclean" to "maintainer-clean" dependent on "distclean"
Does anybody have any objections to these changes?
> Reading this suggests that after all my yelling, Bison and Yacc output
> is considered okay for inclusion in the source .tar.gz distribution
> file, even though it would not normally be held in CVS.
I'm not sure what you are trying to say here. But the way I understood
it, we all agreed that the flex and bison output files would be deleted
from CVS, which was my main concern. I didn't know whether there was a
consensus on including them in the source tar files yet. The last I
recall is that you wanted them excluded from the tar files, but Bernhard
wanted them included. I was indifferent on this issue since I did not
see a problem either way. Is this the way you saw it? Perhaps Markus
should make a final decision on this or is more discussion necessary?
--
Sincerely,
Jazzman (a.k.a. Justin Hickey) e-mail: jhickey at hpcc.nectec.or.th
High Performance Computing Center
National Electronics and Computer Technology Center (NECTEC)
Bangkok, Thailand
==================================================================
People who think they know everything are very irritating to those
of us who do. ---Anonymous
Jazz and Trek Rule!!!
==================================================================
----------------------------------------
If you want to unsubscribe from GRASS Development Team mailing list write to:
minordomo at geog.uni-hannover.de with
subject 'unsubscribe grass5'
More information about the grass-dev
mailing list