pldubouilh / gossa

🎶 a fast and simple multimedia fileserver
MIT License
874 stars 73 forks source link

Make `make clean` output cleaner #88

Closed syncom closed 1 year ago

syncom commented 1 year ago

Use rm -f to suppress errors on removal of nonexistent files.

Also make clean a phony target.

syncom commented 1 year ago

I'm not sure if it's intentional to show these errors in output when files to remove do not exist, but the "after the change" make clean output seems cleaner.

On a cleanly cloned repo:

Before the change:

make clean
rm gossa
rm: cannot remove 'gossa': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)
rm gossa-linux64
rm: cannot remove 'gossa-linux64': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)
rm gossa-linux-arm
rm: cannot remove 'gossa-linux-arm': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)
rm gossa-linux-arm64
rm: cannot remove 'gossa-linux-arm64': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)
rm gossa-mac
rm: cannot remove 'gossa-mac': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)
rm gossa-windows.exe
rm: cannot remove 'gossa-windows.exe': No such file or directory
Makefile:68: recipe for target 'clean' failed
make: [clean] Error 1 (ignored)

After the change

$ make clean
rm -f gossa
rm -f gossa-linux64
rm -f gossa-linux-arm
rm -f gossa-linux-arm64
rm -f gossa-mac
rm -f gossa-windows.exe
pldubouilh commented 1 year ago

thank you for this PR ! :)