You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Malcolm Rowe <ma...@farside.org.uk> on 2005/10/04 13:02:57 UTC

[PATCH] Remove extra files in make distclean/extraclean

Hello list,

According to the comments for make extraclean and make distclean, the
former should return us to before './autogen.sh' was run, and the latter
to before './configure' was run.

However, there are some generated files that are left behind, as follows:

For 'make extraclean' (which cleans files generated by ./autogen.sh):
	gen-make.opts
	subversion/svn_private_config.h.in
	[a bunch of .pyc files under build/]

For 'make distclean' (which cleans files generated by ./configure):
	config.nice

	subversion/svn_private_config.h

	tools/backup/hot-backup.py
	contrib/client-side/svn_load_dirs.pl
	contrib/client-side/svncopy.pl
	contrib/client-side/testsvncopy.pl
	tools/hook-scripts/commit-access-control.pl
	tools/hook-scripts/commit-email.pl
	tools/hook-scripts/propchange-email.pl
	subversion/bindings/swig/perl/native/Makefile.PL

	[and these two directories, created by 'make mkdir-init'
	subversion/bindings/java/javahl/classes/
	subversion/bindings/java/javahl/include/]

I've attached a patch that adds most of these files to the relevant
parts of Makefile.in.  I've not added the two javahl directories because
I couldn't see any obvious place to remove them (and I don't build the
java bindings, so I'd have no way to properly test such a change), and
I've not added the .pyc files, because, again, I'm not entirely sure where
to clear them up (or even what they are - compiled python bytecode?).

[[[
Make 'make extraclean' and 'make distclean' clean up files that are created
by ./autogen.sh and ./configure, respectively.

* Makefile.in
  (fast-distclean): Add config.nice, correct the path used for
    subversion/svn_private_config.h, and add all the outstanding files
    generated by SVN_CONFIG_SCRIPT in ./configure.in.
  (local-extraclean): Add gen-make.opts, and correct the path used for
    subversion/svn_private_config.h.in.
]]]

Regards,
Malcolm

Re: [PATCH] Remove extra files in make distclean/extraclean

Posted by Daniel Rall <dl...@finemaltcoding.com>.
On Thu, 06 Oct 2005, Malcolm Rowe wrote:

> On Thu, Oct 06, 2005 at 12:06:43PM +0100, Max Bowsher wrote:
... 
> > I've left out the addition of gen-make.opts and config.nice, because it is 
> > possible that their omission is deliberate, not accidental, as after a 
> > clean, you might well want to reconfigure with your saved build settings.
> > 
> > Do you (and anyone else reading this thread) think that gen-make.opts and 
> > config.nice should be retained, due to the above possible usage, or 
> > cleaned, so that the cleaning is total?
> 
> I'm ambivalent. 'make extraclean' is supposed to take us back to pristine
> (prior to autogen.sh),

I've heard almost the same thing verbatim from other developers.

> so in theory we should blow them away; but on
> the other hand, you point out a valid reason to keep them. (Though note
> that ./autogen.sh re-runs gen-make.py [and therefore overwrites
> gen-make.opts] anyway, so you'll have to be careful if you did want to
> retain gen-make.opts for a later run.)
 
Blowing away config.nice is kinda annoying (this has bitten me before -- I
save off a copy of it now), but is probably the Right thing to do from a
correctness standpoint.

> Hm, while we're here, I think that all the 'make extraclean' targets
> need to be prefixed with $(top_srcdir), because currently it'll fail
> for VPATH builds (though the concept of 'make extraclean' is a bit dubious
> for a VPATH build anyway, I guess).
> 
> > >[and these two directories, created by 'make mkdir-init'
> > >subversion/bindings/java/javahl/classes/
> > >subversion/bindings/java/javahl/include/]
> > 
> > >I've not added the two javahl directories because
> > >I couldn't see any obvious place to remove them (and I don't build the
> > >java bindings, so I'd have no way to properly test such a change),
> > 
> > That's fair - I don't build the javahl bindings either - let's leave that 
> > matter up to those with experience in that area.
 
distclean should be blowing away both of those directories.  Even clean
should probably be blowing them away.

> Actually, in extraclean, we should probably just remove _all_ the
> directories that 'make mkdir-init' can create (and that are also empty),
> because that way we'd clear up VPATH builds completely. Perhaps we should
> create a 'rmdir-init' companion to 'mkdir-init'?

You're likely right.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

[PATCH] Fix 'make extraclean' for VPATH builds

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Oct 06, 2005 at 01:16:31PM +0100, Malcolm Rowe wrote:
> Hm, while we're here, I think that all the 'make extraclean' targets
> need to be prefixed with $(top_srcdir), because currently it'll fail
> for VPATH builds (though the concept of 'make extraclean' is a bit dubious
> for a VPATH build anyway, I guess).

See attached patch, which does just that. If we're not going to disallow
'make extraclean' for VPATH builds, we might as well fix it to delete
the files from the correct location.

I also noticed that we no longer need to remove ac-helpers/ltconfig,
since it no longer exists (it dates from libtool 1.3, pre-r212), so the
patch also removes that from the list of files to delete and removes it
from svn:ignore in ac-helpers/. I realise that this could be considered
to be combining two separate changes, but they're both in exactly the
same area and it seemed to me that splitting them would be completely
over-the-top, even to someone as anal as myself.

[The property change to svn:ignore will have to be applied manually, of
course, but there didn't seem any harm in leaving the text in the patch.]

[[[
* Makefile.in
  (local-extraclean): Fix 'make extraclean' in a VPATH build: remove
    generated files from the srcdir, where they are, not the build dir, where
    they're not. Also, stop trying to remove ac-helpers/ltconfig, which
    hasn't been generated since before r212.

* ac-helpers/
  Remove 'ltconfig' from the svn:ignore list.
]]]

Regards,
Malcolm

Re: [PATCH] Remove extra files in make distclean/extraclean

Posted by Malcolm Rowe <ma...@farside.org.uk>.
On Thu, Oct 06, 2005 at 12:06:43PM +0100, Max Bowsher wrote:
> Malcolm Rowe wrote:
> >According to the comments for make extraclean and make distclean, the
> >former should return us to before './autogen.sh' was run, and the latter
> >to before './configure' was run.
> >
> >However, there are some generated files that are left behind,
> 
> I've committed a correction to the path of svn_private_config.*, and made 
> changes so that configure substitutes an automatically generated list of 
> files generated by SVN_CONFIG_SCRIPT into Makefile.

Oh, that's _much_ nicer. I didn't even think of that - nice!

> I've left out the addition of gen-make.opts and config.nice, because it is 
> possible that their omission is deliberate, not accidental, as after a 
> clean, you might well want to reconfigure with your saved build settings.
> 
> Do you (and anyone else reading this thread) think that gen-make.opts and 
> config.nice should be retained, due to the above possible usage, or 
> cleaned, so that the cleaning is total?

I'm ambivalent. 'make extraclean' is supposed to take us back to pristine
(prior to autogen.sh), so in theory we should blow them away; but on
the other hand, you point out a valid reason to keep them. (Though note
that ./autogen.sh re-runs gen-make.py [and therefore overwrites
gen-make.opts] anyway, so you'll have to be careful if you did want to
retain gen-make.opts for a later run.)


Hm, while we're here, I think that all the 'make extraclean' targets
need to be prefixed with $(top_srcdir), because currently it'll fail
for VPATH builds (though the concept of 'make extraclean' is a bit dubious
for a VPATH build anyway, I guess).

> >[and these two directories, created by 'make mkdir-init'
> >subversion/bindings/java/javahl/classes/
> >subversion/bindings/java/javahl/include/]
> 
> >I've not added the two javahl directories because
> >I couldn't see any obvious place to remove them (and I don't build the
> >java bindings, so I'd have no way to properly test such a change),
> 
> That's fair - I don't build the javahl bindings either - let's leave that 
> matter up to those with experience in that area.

Actually, in extraclean, we should probably just remove _all_ the
directories that 'make mkdir-init' can create (and that are also empty),
because that way we'd clear up VPATH builds completely. Perhaps we should
create a 'rmdir-init' companion to 'mkdir-init'?

Regards,
Malcolm

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] Remove extra files in make distclean/extraclean

Posted by Max Bowsher <ma...@ukf.net>.
Malcolm Rowe wrote:
> According to the comments for make extraclean and make distclean, the
> former should return us to before './autogen.sh' was run, and the latter
> to before './configure' was run.
>
> However, there are some generated files that are left behind,
...
> I've attached a patch that adds most of these files to the relevant
> parts of Makefile.in.
...
> * Makefile.in
>  (fast-distclean): Add config.nice, correct the path used for
>    subversion/svn_private_config.h, and add all the outstanding files
>    generated by SVN_CONFIG_SCRIPT in ./configure.in.
>  (local-extraclean): Add gen-make.opts, and correct the path used for
>    subversion/svn_private_config.h.in.

I've committed a correction to the path of svn_private_config.*, and made 
changes so that configure substitutes an automatically generated list of 
files generated by SVN_CONFIG_SCRIPT into Makefile.

I've left out the addition of gen-make.opts and config.nice, because it is 
possible that their omission is deliberate, not accidental, as after a 
clean, you might well want to reconfigure with your saved build settings.

Do you (and anyone else reading this thread) think that gen-make.opts and 
config.nice should be retained, due to the above possible usage, or cleaned, 
so that the cleaning is total?


This means the remaining files not handled are:
> For 'make extraclean' (which cleans files generated by ./autogen.sh):
> gen-make.opts
> [a bunch of .pyc files under build/]
>
> For 'make distclean' (which cleans files generated by ./configure):
> config.nice
> [and these two directories, created by 'make mkdir-init'
> subversion/bindings/java/javahl/classes/
> subversion/bindings/java/javahl/include/]

> I've not added the two javahl directories because
> I couldn't see any obvious place to remove them (and I don't build the
> java bindings, so I'd have no way to properly test such a change),

That's fair - I don't build the javahl bindings either - let's leave that 
matter up to those with experience in that area.

> and
> I've not added the .pyc files, because, again, I'm not entirely sure where
> to clear them up (or even what they are - compiled python bytecode?).

Yes, compiled python bytecode. They are harmless, so I'm not really 
concerned about them, but I think extraclean would probably be a reasonable 
place to delete them from.

Max.



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org