roelandjansen / pcmos386v501

PC-MOS/386 v5.01 and up, including cdrom driver sources.
GNU General Public License v3.0
418 stars 60 forks source link

MAKEMOS.BAT renames source files, causes subesquent builds to fail #7

Closed dcoshea closed 5 years ago

dcoshea commented 7 years ago

I tried running some builds under MS-DOS 5 (to avoid the failure of ren under DOSBox reported in issue #6), and I found that while MAKEMOS.BAT succeeds the first time I run it, the second time it fails with (manually transcribed, apologies for any errors):

Ndmake:  Don't know how to make `_286n.asm'.  Stop.

That is being reported by make -f makeutil.mak all. This part of MAKEMOS.BAT looks like this (as at 2d19bc1):

cd\mos5src
make -f makeutil.mak all
make -f maketerm.mak all
ren __*.* $$*.*
ren _*.* $*.*

I can see that \mos5src no longer contains _286N.ASM, and it instead contains $286N.ASM, as a result of the ren commands run the previous time I ran MAKEMOS.BAT. Many other $*.ASM files exist in that directory too.

Were those commands perhaps intended to only rename the generated .SYS files, not the source files?

Or is it intentional that the build destroys the source tree so you can't immediately perform another build after editing your source files? Is the intent that you have a copy of the sources in e.g. \mysrc, edit there, and then copy to \mos5src every time before you build? I would have assumed that if the latter was true then MAKEMOS.BAT would have done the copying for you though.

I realize that the build process must have worked in the past, so apologies if there are already answers to these questions somewhere in the tree!

On a related note, I wonder if there is a batch file or something somewhere that will gather up all the files which are distributed to customers (.SYS, .COM, .EXE, etc. files), since they are spread across multiple directories mingled with source code, or if this was a manual process. It might be safer to do the renaming to start with "$" or "$$" after copying/moving the file to another directory.

ghost commented 5 years ago

Stale, superseded by current work. Closing.