Zap query
Andrew McCarthy (3688) 606 posts |
Is it possible to use the Programming → Save and Compile menu option in Zap to compile GCC C code, with or without a make file? The ZapMJE help file seems to suggest you can, but when I try to use it, it throws up a window with File ‘amu’ not found. I did wonder whether this feature was intended only for use with Acorn C, make and amu. If that’s true. Is there any way to make this command more generic? So that you can use it to compile either Acorn C or GCC. Or have a misunderstood how it works and how to get it to work? |
Theo Markettos (89) 919 posts |
*Set Alias$amu make %*0 Sometimes the simplest hacks are the best ones? |
Andrew McCarthy (3688) 606 posts |
Thank you! So true… ;-) Well, almost… I set the Alias, here’s the relevant output from Zap:
It now creates a file called all versus building the target, as detailed in the following make file excerpt:
So adding the Alias works, but it changes the way GCC's version of make interprets the Makefile.
Do anyone know why that’s the case and how to fix it? |
Theo Markettos (89) 919 posts |
Zap appears to be doing ‘amu all’, which is a bit surprising given there’s no guarantee makefiles will have that as a target (maybe the ones generated by DDE’s !Make do?) Anyway, you could change the alias to *Set Alias$amu make and then it would just ‘make’ ignoring the parameters. Another thing is to add: .PHONY: all to the Makefile, and then the rule ‘all’ doesn’t look for a file on disc called ‘all’. |
Andrew McCarthy (3688) 606 posts |
Thank you :-) Removing the trailing %*0 didn’t work along with adding the .PHONY: all to the Makefile. A strange one… I did try switching to StrongED, but that didn’t work either… ;-( The effect of removing the trailing characters from the alias was to throwback an error message – “File ‘make-f’ not found”. |