diff --git a/Makefile b/Makefile index e26331a..0bf5380 100644 --- a/Makefile +++ b/Makefile @@ -81,6 +81,13 @@ LDFLAGS+= # Uncomment the following line if you want to build against the GNO libraries # export ORCA=$(ORCA_BINDIR)/gno +# Add any markdown files to the MD_SRCS variable to specify which files to +# convert to a Teach text file format during the build. Using this, you can +# write your documentation in markdown in your project and at build time, +# that documentation is converted to a format that is good to package with +# your software and can be opened on a GS. +MD_SRCS= + # If you want to copy one or more files or directories to the distribution disk # image, add the root directory to this variable. Any directories under # the source directory which don't exist in the target disk image will be diff --git a/Makefile.merlin b/Makefile.merlin index 22ef21f..0e67052 100644 --- a/Makefile.merlin +++ b/Makefile.merlin @@ -66,6 +66,13 @@ REZFLAGS+= # put the rlint somewhere weird, you can set this to the correct path # RLINT_PATH=rlint +# Add any markdown files to the MD_SRCS variable to specify which files to +# convert to a Teach text file format during the build. Using this, you can +# write your documentation in markdown in your project and at build time, +# that documentation is converted to a format that is good to package with +# your software and can be opened on a GS. +MD_SRCS= + # If you want to copy one or more files or directories to the distribution disk # image, add the root directory to this variable. Any directories under # the source directory which don't exist in the target disk image will be diff --git a/make/createDiskImage b/make/createDiskImage index 0f69083..f69693e 100755 --- a/make/createDiskImage +++ b/make/createDiskImage @@ -130,6 +130,10 @@ copyDirs() find . -print | while read FILEORDIR do + if [ "$FILEORDIR" = "." ] + then + continue + fi if [ -d "$FILEORDIR" ] then mkdirProDOS "${MOUNTDIR}/$FILEORDIR" diff --git a/make/md2teach b/make/md2teach new file mode 100644 index 0000000..d456eb5 Binary files /dev/null and b/make/md2teach differ diff --git a/make/tail.mk b/make/tail.mk index 9f8b3f6..b4bd32b 100644 --- a/make/tail.mk +++ b/make/tail.mk @@ -73,17 +73,22 @@ REZ_SRCS=$(patsubst $(GENDIR)/%, %, $(patsubst ./%, %, $(wildcard $(addsuffix /* REZ_DEPS=$(patsubst %.rez, $(OBJDIR)/%.rez.d, $(REZ_SRCS)) REZ_OBJS=$(patsubst %.rez, $(OBJDIR)/%.r, $(REZ_SRCS)) +TEACH_FILES=$(patsubst %.md, $(GENDIR)/Teach/%, $(MD_SRCS)) +ifneq ($(TEACH_FILES),) + COPYDIRS+=$(GENDIR)/Teach +endif + ifneq ($(firstword $(REZ_SRCS)), $(lastword $(REZ_SRCS))) $(error Only a single resource file supported, found $(REZ_SRCS)) endif -BUILD_OBJS=$(C_ROOTS) $(C_OBJS) $(ASM_ROOTS) +BUILD_OBJS=$(C_ROOTS) $(C_OBJS) $(ASM_ROOTS) $(TEACH_FILES) ifeq ($(BINTARGET),) BUILD_OBJS+=$(REZ_OBJS) endif BUILD_OBJS_NOSUFFIX=$(C_ROOTS:.root=) $(C_OBJS:.a=) $(ASM_ROOTS:.ROOT=) -ALL_OBJS=$(C_ROOTS:.root=.a) $(C_OBJS) $(ASM_OBJS) $(REZ_OBJS) +ALL_OBJS=$(C_ROOTS:.root=.a) $(C_OBJS) $(ASM_OBJS) $(REZ_OBJS) $(TEACH_FILES) ALL_ROOTS=$(C_ROOTS) $(C_OBJS:.a=.root) $(ASM_ROOTS) ALL_DEPS=$(C_DEPS) $(ASM_DEPS) $(REZ_DEPS) @@ -223,6 +228,10 @@ ifneq ($(RLINT_PATH),) $(ORCA) $(RLINT_PATH) $@ endif +$(GENDIR)/Teach/%: %.md + $(MKDIR) "$(GENDIR)/Teach" + $(ORCA) make/md2teach "$<" "$@" + $(OBJS): Makefile # Include the C and rez dependencies which were generated from the last build diff --git a/pkg/Templates/Apple IIgs/Merlin Classic Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/Merlin Classic Desk Accessory.xctemplate/TemplateInfo.plist index 8fd5de3..8ac8517 100644 --- a/pkg/Templates/Apple IIgs/Merlin Classic Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/Merlin Classic Desk Accessory.xctemplate/TemplateInfo.plist @@ -11,6 +11,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/merlin-asm make/orca-rez make/system601.2mg @@ -59,6 +60,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/merlin-asm Group diff --git a/pkg/Templates/Apple IIgs/Merlin Control Panel.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/Merlin Control Panel.xctemplate/TemplateInfo.plist index 0dca0e7..2bd8ddb 100644 --- a/pkg/Templates/Apple IIgs/Merlin Control Panel.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/Merlin Control Panel.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/merlin-asm make/orca-rez make/system601.2mg @@ -65,6 +66,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/merlin-asm Group diff --git a/pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist index 8cc46e7..ca87577 100644 --- a/pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/Merlin Desktop Application.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/merlin-asm make/orca-rez make/system601.2mg @@ -65,6 +66,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/merlin-asm Group diff --git a/pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist index fae1be2..4542c39 100644 --- a/pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/Merlin New Desk Accessory.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/merlin-asm make/orca-rez make/system601.2mg @@ -65,6 +66,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/merlin-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC Classic Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC Classic Desk Accessory.xctemplate/TemplateInfo.plist index 8e3e941..d6e0d0b 100644 --- a/pkg/Templates/Apple IIgs/ORCAC Classic Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC Classic Desk Accessory.xctemplate/TemplateInfo.plist @@ -10,6 +10,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -54,6 +55,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC Control Panel.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC Control Panel.xctemplate/TemplateInfo.plist index dd8efc8..5ce41d8 100644 --- a/pkg/Templates/Apple IIgs/ORCAC Control Panel.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC Control Panel.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -66,6 +67,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC Desktop Application.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC Desktop Application.xctemplate/TemplateInfo.plist index 6d0320f..86c90fc 100644 --- a/pkg/Templates/Apple IIgs/ORCAC Desktop Application.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC Desktop Application.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -66,6 +67,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC GNO Shell Command.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC GNO Shell Command.xctemplate/TemplateInfo.plist index 0faf976..6d56c4a 100644 --- a/pkg/Templates/Apple IIgs/ORCAC GNO Shell Command.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC GNO Shell Command.xctemplate/TemplateInfo.plist @@ -7,6 +7,7 @@ main.c Makefile make/head.mk + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -27,6 +28,13 @@ Path make/head.mk + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/TemplateInfo.plist index e6ccbc6..eba2fd3 100644 --- a/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC New Desk Accessory.xctemplate/TemplateInfo.plist @@ -12,6 +12,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -66,6 +67,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAC Shell Command.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAC Shell Command.xctemplate/TemplateInfo.plist index ede6de3..d79726e 100644 --- a/pkg/Templates/Apple IIgs/ORCAC Shell Command.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAC Shell Command.xctemplate/TemplateInfo.plist @@ -7,6 +7,7 @@ main.c Makefile make/head.mk + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -27,6 +28,13 @@ Path make/head.mk + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAM Classic Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAM Classic Desk Accessory.xctemplate/TemplateInfo.plist index 281e68e..218d271 100644 --- a/pkg/Templates/Apple IIgs/ORCAM Classic Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAM Classic Desk Accessory.xctemplate/TemplateInfo.plist @@ -10,6 +10,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -54,6 +55,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAM Control Panel.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAM Control Panel.xctemplate/TemplateInfo.plist index 675bd96..5b71da3 100644 --- a/pkg/Templates/Apple IIgs/ORCAM Control Panel.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAM Control Panel.xctemplate/TemplateInfo.plist @@ -11,6 +11,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -60,6 +61,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAM Desktop Application.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAM Desktop Application.xctemplate/TemplateInfo.plist index 3159744..ea9ab8e 100644 --- a/pkg/Templates/Apple IIgs/ORCAM Desktop Application.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAM Desktop Application.xctemplate/TemplateInfo.plist @@ -11,6 +11,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -60,6 +61,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAM New Desk Accessory.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAM New Desk Accessory.xctemplate/TemplateInfo.plist index d57dc54..57cc773 100644 --- a/pkg/Templates/Apple IIgs/ORCAM New Desk Accessory.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAM New Desk Accessory.xctemplate/TemplateInfo.plist @@ -11,6 +11,7 @@ make/createDiskImage make/head.mk make/launchEmulator + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -60,6 +61,13 @@ Path make/launchEmulator + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group diff --git a/pkg/Templates/Apple IIgs/ORCAM Shell Command.xctemplate/TemplateInfo.plist b/pkg/Templates/Apple IIgs/ORCAM Shell Command.xctemplate/TemplateInfo.plist index 821dd6c..efa74c1 100644 --- a/pkg/Templates/Apple IIgs/ORCAM Shell Command.xctemplate/TemplateInfo.plist +++ b/pkg/Templates/Apple IIgs/ORCAM Shell Command.xctemplate/TemplateInfo.plist @@ -7,6 +7,7 @@ main.s Makefile make/head.mk + make/md2teach make/orca-asm make/orca-cc make/orca-rez @@ -27,6 +28,13 @@ Path make/head.mk + make/md2teach + + Group + make + Path + make/md2teach + make/orca-asm Group