Collapse the two makefiles into one
Programs/makefile is gone and everything it did is here. The split was not paying for itself: nothing at this level ever ran that file, so it rotted, and all three bugs found in it this week share that one cause. It named two source files that had been renamed months earlier and failed outright. The disk did not depend on the tree it mirrors, so a new file silently was not on it. And the disk was in no default target, so 'make clean' threw it away and 'make' did not bring it back - which is what prompted this. The platform and the system stay separate, as TARGETS rather than as files: 'make SplitBit Assembler' builds the machine and its tools, 'make cosmos' and 'make disk' build the system, and somebody who wants to write their own system can ignore the second group entirely. That boundary is now one make enforces, which the directory boundary never did - Tests/makedisks.sh has always reached across it to build its own fixtures. 'make' now builds a bootable disk as well as the tools, because a machine with nothing in the drive does not do anything and the first thing anybody wants after building this is to watch CosmOS come up. It costs half a second: the whole system, twenty six apps and the native assembler assemble in less time than the emulator links. Two things the merge needed that the split did not. Assembling now takes an order-only dependency on the assembler, which came free when you had already built the tools before changing directory. And the mirror is told which directory to walk: it was ".", meaning Programs/, and left alone it would have meant the whole repository - the C sources, the tests and the manuals mirrored onto a disk for an 8-bit machine. The disk comes out at 188 files where it was 189. The one that went is Programs/makefile, which was itself being mirrored onto it as /Source/makefile. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E2JrLzFvuFX9fgi1LDRjrW
This commit is contained in:
co-authored by
Claude Opus 5
parent
2f22807458
commit
e52d8d84f8
@@ -136,10 +136,12 @@ Assemble something and run it:
|
||||
Or boot the operating system, with a disk of programs and all of its own source on it:
|
||||
|
||||
```
|
||||
cd Programs
|
||||
make run-cosmos
|
||||
make run-voyager
|
||||
```
|
||||
|
||||
`make` builds a disk as well as the tools, so there is one to boot. `make run-cosmos` is the
|
||||
same system in the terminal, for a machine with no graphics library.
|
||||
|
||||
Then `dir` to see what is there, `load Snake.sbx` and `run` to play something, or `load Asm.sbx` and `run cosmos.asm` to watch the machine build itself.
|
||||
|
||||
Every source in `Programs/` is on that disk, under `/Source`, so anything not shipped as a
|
||||
@@ -578,11 +580,10 @@ A disk is at the lowest version that describes what is on it, so `format` makes
|
||||
|
||||
The assembler is built to work with make. `-o` puts the output where the build system wants it, and `-M` writes out which libraries went into it, so that editing a library reassembles everything that includes it.
|
||||
|
||||
`Programs/makefile` does this for the programs in this repository:
|
||||
The makefile does this for the programs in this repository:
|
||||
|
||||
```
|
||||
cd Programs
|
||||
make
|
||||
make programs
|
||||
```
|
||||
|
||||
The rule it uses is small enough to copy into your own projects:
|
||||
|
||||
Reference in New Issue
Block a user