Skip to content

Many dependencies on $(PLVM02) in the makefile #41

@ZornsLemma

Description

@ZornsLemma

Hi Dave,

I'm updating my Acorn port to the latest master as a stepping stone to working on the new 2.0 stuff and I've noticed a small problem with the way the makefile is set up.

I found this "naturally" by trying to build my port, but you can see the problem most simply by taking current master HEAD (28571b4) and applying this small patch:

diff --git a/src/makefile b/src/makefile
index ed475b1..e5c8573 100755
--- a/src/makefile
+++ b/src/makefile
@@ -78,7 +78,7 @@ TXTTYPE       = .TXT
 apple: $(PLVMZP_APL) $(PLASM) $(PLVM) $(PLVM01) $(PLVM02) $(PLVM802) $(PLVM03) $(CMD) $(PLASMAPLASM) $(CODEOPT) $(ARGS) $(MEMMGR) $(MEMTEST) $(FIBER) $(FIBERTEST) $(LONGJMP) $(ED) $(MON) $(SOS) $(ROD) $(SIEVE) $(UTHERNET2) $(UTHERNET) $(ETHERIP) $(INET) $(DHCP) $(HTTPD) $(ROGUE) $(ROGUEMAP) $(ROGUECOMBAT) $(GRAFIX) $(GFXDEMO) $(DGR) $(DGRTEST) $(FILEIO_APL) $(CONIO_APL) $(JOYBUZZ) $(PORTIO) $(SPIPORT) $(SDFAT) $(FATCAT) $(FATGET) $(FATPUT) $(FATWDSK) $(FATRDSK) $(SANE) $(FPSTR) $(FPU) $(SANITY) $(RPNCALC) $(SNDSEQ) $(PLAYSEQ)
        -rm vmsrc/plvmzp.inc
 
-c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) 
+c64: $(PLVMZP_C64) $(PLASM) $(PLVM) $(PLVMC64) $(SIEVE)
        -rm vmsrc/plvmzp.inc
 
 all: apple c64
diff --git a/src/vmsrc/apple/plvm02.s b/src/vmsrc/apple/plvm02.s
index 9e58eac..2833a2f 100755
--- a/src/vmsrc/apple/plvm02.s
+++ b/src/vmsrc/apple/plvm02.s
@@ -9,6 +9,7 @@
 ;*
 ;* MONITOR SPECIAL LOCATIONS
 ;*
+!ERROR "FOO"
 CSWL    =       $36
 CSWH    =       $37
 PROMPT  =       $33

What this does is:

  • break the Apple II build (somewhat artificially, of course)
  • builds SIEVE as part of the C64 port (because we want to include it on a disk image, say)

The problem is that if you do a C64 build, it fails because it's trying to build the Apple II code (because SIEVE depends on PLVM02):

$ make c64
...
acme -o rel/apple/PLASMA.SYSTEM#FF2000 -l vmsrc/apple/plvm02.sym vmsrc/apple/plvm02.s
Error - File vmsrc/apple/plvm02.s, line 12 (Zone <untitled>): !error: FOO
makefile:154: recipe for target 'rel/apple/PLASMA.SYSTEM#FF2000' failed
make: *** [rel/apple/PLASMA.SYSTEM#FF2000] Error 1

Obviously this example isn't very realistic and normally the Apple II code would build fine. What specifically triggered this in the case of my port is that I had removed JMPTMP from the Acorn plvmzp.inc and moved it into the Acorn plvm.s file. However, when building the Acorn port, the Apple PLVM02 gets built using the Acorn plvmzp.inc, and a mismatch occurs.

Now I could work around this by just ensuring that I define all the same symbols in the Acorn plvmzp.inc as are in the Apple plvmzp.inc, and that might be a good idea anyway, but I thought I should raise this as an issue anyway. It seems potentially confusing, maybe even dangerous, for building port X to build a broken (since it will use the wrong non-Apple zero page locations) version of the Apple II VM.

I don't have a great solution for this. I can hack around at the makefile and see if I can do anything with it, but I wanted to see how you felt about this before I do - if you don't see this as a problem then I won't worry about it. The obvious fix would be to remove the $(PLVM02) dependency from most of the demo files, but I don't know if that would have any unpleasant side efects.

Cheers.

Steve

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions