Whoops, thought this should also go to the mailing list for more general
comment.
-----Original Message-----
From: Masterson, David
Sent: Monday, May 15, 2000 10:25 AM
To: 'François Pinard'; Masterson, David
Subject: RE: shall `make uninstall' remove directories?
How about "rmdir" to remove empty directories? I think it will complain if
you try to remove a non-empty directory or something that is not a directory
(like a link)...
Also, "make install" may test to see if the target directory pre-existed (I
don't see that in my automake 1.4 generated makefiles), but it does not test
to see if parents of the target directory existed -- it uses mkinstalldirs
to create all necessary directories.
Therefore, I think I'd suggest, as "make install" has a call to
"mkinstalldirs" before the loop to install files, perhaps "make uninstall"
should have a call to "mkuninstalldirs" after the loop to remove files. The
"mkuninstalldirs" script can handle the cleanup of supposedly dead
directories (including having environment variables and/or options that
would allow sysadmins/packagers to decide how much they want to clean up).
As "mkinsalldirs" is packaged with automake, so could "mkuninstalldirs".
-----Original Message-----
From: François Pinard [mailto:[EMAIL PROTECTED]]
Sent: Monday, May 15, 2000 10:09 AM
To: Masterson, David
Subject: Re: shall `make uninstall' remove directories?
"Masterson, David" <[EMAIL PROTECTED]> écrit:
> How about attempting to remove the directories *only* if they are empty?
> This would be in keeping with the style of only creating the directories
> during "make install" if something will be put into them.
A test is made in `make install' to see if the directory pre-existed,
empty or not. It is uneasy at `make uninstall' time to know if the
directory was indeed created afresh at `make install' time, or just re-used.
The symmetry cannot be perfect. I do not think we should remove a symbolic
link, because even if pointing to an empty directory, it surely pre-existed.
> -----Original Message-----
> From: François Pinard [mailto:[EMAIL PROTECTED]]
> Sent: Monday, May 15, 2000 7:46 AM
> To: Lars J. Aas
> Cc: Peter Eisentraut; Didier Verna; Tom Tromey; Assar Westerlund;
> [EMAIL PROTECTED]
> Subject: Re: shall `make uninstall' remove directories?
> "Lars J. Aas" <[EMAIL PROTECTED]> writes:
> > I say, remove /usr/local and even /usr if possible ;)
> Yet, not if they are symbolic links :-).
--
François Pinard http://www.iro.umontreal.ca/~pinard