[cc65] [PATCH 3/3] Generate libsrc/apple2enh/extra if necessary

From: Spiro Trikaliotis <ml-cc651trikaliotis.net>
Date: 2012-08-17 21:11:41
From: Spiro Trikaliotis <spiro.trikaliotis@gmx.de>

The directory libsrc/apple2enh/extra is empty in the VCS. Thus,
depending upon the tools, it might not be checked out.

Unfortunately, building the lib for apple2enh needs this directory; if
the directory does not exist, building fails.

This patch adds a make rule that makes sure that the directory will
exist on build, recreating it if necessary.
---
 libsrc/apple2enh/Makefile |    7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diff --git a/libsrc/apple2enh/Makefile b/libsrc/apple2enh/Makefile
index 4d98490..469540f 100644
--- a/libsrc/apple2enh/Makefile
+++ b/libsrc/apple2enh/Makefile
@@ -26,7 +26,7 @@ CFLAGS	= -Osir -g -T -t $(SYS) --forget-inc-paths -I ../apple2 -I ../../include
 %.o:	../apple2/%.s
 	@$(AS) -g -o $@ $(AFLAGS) $<
 
-extra/%.o: ../apple2/extra/%.s
+extra/%.o: ../apple2/extra/%.s extradir
 	@$(AS) -g -o $@ $(AFLAGS) $<
 
 %.emd: 	%.o ../runtime/zeropage.o
@@ -148,3 +148,8 @@ clean:
 
 zap:   	clean
 	@$(RM) $(EMDS) $(JOYS) $(MOUS) $(SERS) $(TGIS)
+
+.PHONY: extradir
+
+extradir:
+	test -d extra/ || mkdir extra
-- 
1.7.9

----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo@musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
Received on Fri Aug 17 21:12:47 2012

This archive was generated by hypermail 2.1.8 : 2012-08-17 21:13:21 CEST