changeset 1132:2690efca4eaf

More sensible changes to Mkaefiles
author boisy
date Mon, 14 Apr 2003 15:49:33 +0000
parents c0ec19adf137
children 4bddc63a59fc
files level1/makefile level2/makefile level2/sys/makefile
diffstat 3 files changed, 24 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/level1/makefile	Mon Apr 14 13:52:12 2003 +0000
+++ b/level1/makefile	Mon Apr 14 15:49:33 2003 +0000
@@ -1,8 +1,9 @@
 include ../Makefile.rules
 
 RELEASE		= os9l1v030101
-BOOTFILE	= bootfile_stock
-KERNEL		= kernel_stock
+BOOTFILE	= BOOTFILES/bootfile_stock
+KERNEL		= BOOTFILES/kernel_stock
+DIRS		= CMDS MODULES DEFS SYS BOOTFILES
 
 CMDS		= $(shell $(CD) CMDS; make showcocoobjs)
 MODULES		= $(shell $(CD) MODULES; make showcopyobjs)
@@ -21,19 +22,11 @@
 	@$(ECHO) "*        OS-9 Level One Distribution        *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) CMDS; make
-	$(CD) MODULES; make
-	$(CD) DEFS; make
-	$(CD) SYS; make
-	$(CD) BOOTFILES; make
+	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
 
 # Clean all components
 clean:	dskclean
-	-$(CD) CMDS; make clean
-	-$(CD) MODULES; make clean
-	-$(CD) DEFS; make clean
-	-$(CD) SYS; make clean
-	-$(CD) BOOTFILES; make clean
+	$(foreach dir, $(DIRS), ($(CD) $(dir); make clean);)
 
 dskclean:
 	-$(RM) $(PACKAGENAME) $(DSK1) $(DSK2)
@@ -43,13 +36,13 @@
 dskcopy: dsk
 	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
 
-$(PACKAGENAME): $(DSK1) $(DSK2)
-	$(ARCHIVE) $(PACKAGENAME) $(DSK1) $(DSK2) ReadMe ChangeLog
+$(PACKAGENAME): $(DSK1) $(DSK2) ReadMe ChangeLog
+	$(ARCHIVE) $@ $^
 
 $(DSK1):
 	$(RM) $@
 	$(OS9FORMAT_DS40) $@ -n"OS-9 Level One System Disk"
-	$(OS9GEN) $@ -b=BOOTFILES/$(BOOTFILE) -t=BOOTFILES/$(KERNEL)
+	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNEL)
 	$(MAKDIR) $@,CMDS
 	$(MAKDIR) $@,SYS
 	$(CD) CMDS; $(CP) $(CMDS) ../$@,CMDS
--- a/level2/makefile	Mon Apr 14 13:52:12 2003 +0000
+++ b/level2/makefile	Mon Apr 14 15:49:33 2003 +0000
@@ -1,8 +1,9 @@
 include ../Makefile.rules
 
 RELEASE		= os9l2v030101
-BOOTFILE	= bootfile_vdg
-KERNEL		= kernel_stock
+BOOTFILE	= BOOTFILES/bootfile_vdg
+KERNEL		= BOOTFILES/kernel_stock
+DIRS		= CMDS MODULES SYS BOOTFILES
 
 CMDS		= $(shell $(CD) CMDS; make showobjs)
 MODULES		= $(shell $(CD) MODULES; make showcopyobjs)
@@ -22,23 +23,14 @@
 all:
 	@$(ECHO) "*********************************************"
 	@$(ECHO) "*                                           *"
-	@$(ECHO) "*      OS-9 Level Two Vr3 Distribution      *"
-	@$(ECHO) "*        The Rumored Upgrade Version        *"
+	@$(ECHO) "*        OS-9 Level Two Distribution        *"
 	@$(ECHO) "*                                           *"
 	@$(ECHO) "*********************************************"
-	$(CD) CMDS; make
-	$(CD) MODULES; make
-	$(CD) DEFS; make
-	$(CD) SYS; make
-	$(CD) BOOTFILES; make
+	$(foreach dir, $(DIRS), ($(CD) $(dir); make);)
 
 # Clean all components
 clean: dskclean
-	-$(CD) CMDS; make clean
-	-$(CD) MODULES; make clean
-	-$(CD) DEFS; make clean
-	-$(CD) SYS; make clean
-	-$(CD) BOOTFILES; make clean
+	$(foreach dir, $(DIRS), ($(CD) $(dir); make clean);)
 
 dskclean:
 	-$(RM) $(PACKAGENAME) $(DSK1) $(DSK2)
@@ -48,13 +40,13 @@
 dskcopy: dsk
 	$(CP) $(DSK1) $(DSK2) $(PACKAGENAME) $(DSKDIR)
 
-$(PACKAGENAME): $(DSK1) $(DSK2)
-	$(ARCHIVE) $(PACKAGENAME) $(DSK1) $(DSK2) ReadMe ChangeLog
+$(PACKAGENAME): $(DSK1) $(DSK2) ReadMe ChangeLog
+	$(ARCHIVE) $@ $^
 
 $(DSK1):
 	-$(RM) $@
 	$(OS9FORMAT_DS40) $@ -n"OS-9 Level Two System Disk"
-	$(OS9GEN) $@ -b=BOOTFILES/$(BOOTFILE) -t=BOOTFILES/$(KERNEL)
+	$(OS9GEN) $@ -b=$(BOOTFILE) -t=$(KERNEL)
 	$(MAKDIR) $@,CMDS
 	$(MAKDIR) $@,SYS
 	$(MAKDIR) $@,DEFS
--- a/level2/sys/makefile	Mon Apr 14 13:52:12 2003 +0000
+++ b/level2/sys/makefile	Mon Apr 14 15:49:33 2003 +0000
@@ -1,5 +1,7 @@
 include ../../Makefile.rules
 
+vpath %.hp $(LEVEL1)/SYS
+
 DEPENDS		= ./Makefile
 
 SYSTXTFILES	= motd
@@ -27,17 +29,17 @@
 
 all:	$(ALLOBJS) $(DEPENDS)
 
-$(HELPMSG): $(L1HELPFILES)
-	$(MERGE) $(L1HELPFILES) $(L2HELPFILES) > $@
+$(HELPMSG): $(L1HELPFILES) $(L2HELPFILES)
+	$(MERGE) $^ > $@
 
-$(L1HELPFILES): $(LEVEL1)/SYS/$@
-	-$(SOFTLINK) $(LEVEL1)/SYS/$@
+#$(L1HELPFILES): $(LEVEL1)/SYS/$@
+#	-$(SOFTLINK) $(LEVEL1)/SYS/$@
 
 $(L1TXTFILES): $(LEVEL1)/SYS/$@
 	-$(SOFTLINK) $(LEVEL1)/SYS/$@
 
 clean:
-	$(RM) $(HELPMSG) $(L1HELPFILES) $(L1TXTFILES)
+	$(RM) $(HELPMSG) $(L1TXTFILES)
 
 showbinobjs:
 	@$(ECHO) $(BINFILES)