From: Morten Welinder Date: Sat, 8 Apr 1995 23:26:41 +0200 To: djgpp AT sun DOT soe DOT clarkson DOT edu Subject: Makefiles and porting unix programs There recently was a gripe over a makefile from a program ported from unix to djgpp. A frustrated user complained the makefile contained calls to `mv' and other assorted unix utilities. I have a few points to make here: (1) The reason that we who ports unix programs use the utilites is not that we want to make life hard for you, but that we want life to be easy for ourselves. A porter want to change as little in the makefile as possible because (a) it's less work. (b) when new updates arrive we like to be able to use "patch" and not to have to do the makefile all over again. (And I really mean all over again.) Some makefiles have a tendency to change a lot. (c) it's much more stable across different dos versions. I could use `move' instead of `mv', but for which dos versions would it work? (d) it's much less error-prone because things like `rm *~' which occur every once in a while are hard to get right using command.com's `del'. Try it. (2) The frustrated user starts converting `mv' to `move', `rm' to `del' and so on. This is wrong, wrong, wrong! You end up with a makefile that is very difficult to maintain and often needs a specific dos version to do its job. The right way to do it is to get those unix-style commands -- they're free and take up only a few hundre KB on your harddisk. (3) When you write new software for dos, I see no real reason not to use dos commands in that case. Morten Welinder terra AT diku DOT dk