While running
./configure --prefix=/mingw
on a MinGW/MSYS system for a library I had previously run
\'./configure --pref
Make can tell you what it knows and what it will do.
Suppose you have an "install" target, which executes commands like:
cp /
In your generic rules, add:
uninstall :; MAKEFLAGS= ${MAKE} -j1 -spinf $(word 1,${MAKEFILE_LIST}) install \
| awk '/^cp /{dest=$NF; for (i=NF; --i>0;) {print dest"/"$i}}' \
| xargs rm -f
A similar trick can do a generic make clean.