David A. Wheeler wrote: > supports DESTDIR, but a vast number of programs don't support DESTDIR. > It's not hard to add, but it's annoying to have to keep doing it again & > again... especially when it's the only thing that has to be done "by hand". > > Instead of fixing each program, one by one forever, I'd rather automate > it once. At the least, the "install" program should be able to redirect > to another directory, sort-of-like a built-in DESTDIR instead of having > to rewrite everyone's makefile. >... > http://www.dwheeler.com/essays/automating-destdir.html .
In my mind making hacks like this to install, mv, cp, ln, etc. is very similar to your argument number five in your essage about variants of basic commands and a special PATH. That actually seems like the best approach if the Makefile isn't going to support DESTDIR. It is the first workaround that crossed my mind. Because then it works on a standard system. Note also that hacking install, mv, cp, ln doesn't help when shell redirection (e.g. > tofile) is used. It also doesn't help when other commands (e.g. rsync) is used. Adding the proposed hack would be creating a one-off scheme that isn't going to be supported in all of the myriad of other random programs that exist. I think that by itself is enough to make me not like the hack. It just doesn't feel like the right direction to go to me. Of course the best approach is just to support DESTDIR fully in the Makefile. Then it is easily supported in the package build environments for debs and rpms and others because then it looks like all of the other normal modern projects. BTW... In my experience many projects that don't support DESTDIR do support PREFIX. This isn't as nice but has often been used effectively in package building. Mostly those have been cleaned up as projects have added full support for DESTDIR. But you might try looking at setting PREFIX instead if you are battling a DESTDIR problem. Bob _______________________________________________ Bug-coreutils mailing list [email protected] http://lists.gnu.org/mailman/listinfo/bug-coreutils
