jrincayc / ucblogo-code

Berkeley Logo interpreter
https://people.eecs.berkeley.edu/~bh/logo.html
GNU General Public License v3.0
182 stars 34 forks source link

"make distclean" leaves some stuff behind. #133

Open pmetzger opened 2 years ago

pmetzger commented 2 years ago

Doing make distclean (following make mac) on MacOS Monterey leaves behind the following files:

Makefile.in
UCBLogo.app/**
aclocal.m4
autom4te.cache/**
compile
config.h.in
configure
csls/Makefile.in
depcomp
docs/Makefile.in
docs/texinfo.tex
helpfiles/ALL_NAMES
helpfiles/HELPCONTENTS
helpfiles/Makefile.in
install-sh
logolib/Makefile.in
makehelp
missing
tests/Makefile.in
dmalec commented 2 years ago

I think we can definitely cleanup stuff like UCBLogo.app, helpfiles/ALL_NAMES, etc.

With the caveat that I haven't used autotools on a daily basis in a while and so am rusty on details, I think some of the remainder (E.G. Makefile.in) are left behind by design by autotools. I tried a small hello world autotools project and it behaves the same way. That does seem to line up with what I found around make distclean not removing files needed to run configure on a system that doesn't have autotools installed.

All that said, happy to look at a counter example or documentation to the contrary (also, fully acknowledge I am not an expert in this space, so this is me just thinking it through and poking at it a bit :) )

pmetzger commented 2 years ago

Some of them are probably intentional. I suspect some aren't. This may be relevant: https://www.gnu.org/software/automake/manual/automake.html#Clean

dmalec commented 2 years ago

Agreed, particularly this heuristic:

If configure built it, then distclean should delete it.

My plan is to get a sense of what is built by autoreconf vs what is built by configure

brianharvey commented 2 years ago

Maybe this is unnecessary given modern fast computers, but I used to keep the documentation files in the "clean" distro because they took a long time to reconstruct.

As for the executable logos, and especially the Mac one, I know this is heretical but leaving them allows the source distro also to be the runnable distro. (Especially the Mac one because Mac users don't necessarily have the tools to build software from source.) But these days we have git's release versions feature so I guess that's no longer necessary.

pmetzger commented 2 years ago

It's also the case that most mac users will expect to download a .dmg and won't be expecting a .app file inside their source distribution.