[GRASS-dev] compile directions

Glynn Clements glynn at gclements.plus.com
Fri Aug 24 16:26:03 EDT 2007


William Kyngesburye wrote:

> > There have been lots of emails recently about compiling issues, and  
> > one common thread is a question about whether you ran 'make  
> > distclean' first.
> >
> > Is there any reason NOT to always run make distclean? Should it be  
> > part of the standard directions?
> 
> Actually, I'm a little guilty, though I often ask others when  
> troubleshooting.  I usually just run "make clean".  If I see a change  
> in configure or a makefile, then I'll run "make distclean".   
> Occassionally I'll make distclean anyways, to be safe.
> 
> I don't know how valid my method is - assuming that only configure  
> and makefile changes require a distclean.  But something in the build  
> instructions would probably be good.

The distclean target is:

distclean: clean
	-rm -f config.cache config.log config.status config.status.${ARCH} 2>/dev/null
	-rm -f ChangeLog ChangeLog.bak error.log grass.pc
	-rm -f include/config.h include/version.h include/winname.h include/Make/Grass.make include/Make/Platform.make 2>/dev/null
	-rm -f swig/perl/Makefile.PL swig/perl2/make.pl swig/python/Makefile 2>/dev/null

Essentially, the difference between distclean and clean only matters
if there are changes to a file used by configure, i.e. configure
itself or any file whose name ends in ".in".

In most of the cases which are fixed by "make distclean", "make clean"
would also have worked.

The only reason to use "make clean" rather than "make distclean" is if
you're making global changes where a full recompilation is less effort
than figuring out all of the dependencies, and you know that "make
distclean" isn't necessary. In that situation, avoiding the need to
re-run configure may be worthwhile (particularly on Cygwin, where
running configure is particularly slow).

-- 
Glynn Clements <glynn at gclements.plus.com>




More information about the grass-dev mailing list