changeset 189:8a84141ea6dd

Removed rules.make stuff in sub directories - it was not particularly helpful
author lost@l-w.ca
date Wed, 11 Jan 2012 20:25:29 -0700
parents b6685a7ec2bd
children 20ba68be2cd7
files Makefile docs/rules.make lwar/rules.make lwasm/rules.make lwlib/rules.make lwlink/rules.make
diffstat 6 files changed, 42 insertions(+), 61 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Wed Jan 11 20:18:10 2012 -0700
+++ b/Makefile	Wed Jan 11 20:25:29 2012 -0700
@@ -29,14 +29,27 @@
 .PHONY: all
 all: $(MAIN_TARGETS)
 
-subdirs := lwasm lwlink lwar lwlib lwbasic docs
+lwar_srcs := add.c extract.c list.c lwar.c main.c remove.c replace.c
+lwar_srcs := $(addprefix lwar/,$(lwar_srcs))
 
--include $(subdirs:=/rules.make)
+lwlib_srcs := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \
+	lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c
+lwlib_srcs := $(addprefix lwlib/,$(lwlib_srcs_local))
+
+lwlink_srcs := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c
+lwobjdump_srcs := objdump.c
+lwlink_srcs := $(addprefix lwlink/,$(lwlink_srcs))
+lwobjdump_srcs := $(addprefix lwlink/,$(lwobjdump_srcs))
 
 lwcc_srcs :=  lwcc.c
-
 lwcc_srcs := $(addprefix lwcc/,$(lwcc_srcs))
 
+lwasm_srcs :=  debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \
+	insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \
+	instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \
+	pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \
+	struct.c symbol.c
+lwasm_srcs := $(addprefix lwasm/,$(lwasm_srcs))
 
 lwasm_objs := $(lwasm_srcs:.c=.o)
 lwlink_objs := $(lwlink_srcs:.c=.o)
@@ -62,19 +75,19 @@
 .PHONY: lwbasic
 lwbasic: lwbasic/lwbasic$(PROGSUFFIX)
 
-lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib lwasm/rules.make
+lwasm/lwasm$(PROGSUFFIX): $(lwasm_objs) lwlib
 	@echo Linking $@
 	@$(CC) -o $@ $(lwasm_objs) $(LDFLAGS)
 
-lwlink/lwlink$(PROGSUFFIX): $(lwlink_objs) lwlib lwlink/rules.make
+lwlink/lwlink$(PROGSUFFIX): $(lwlink_objs) lwlib
 	@echo Linking $@
 	@$(CC) -o $@ $(lwlink_objs) $(LDFLAGS)
 
-lwlink/lwobjdump$(PROGSUFFIX): $(lwobjdump_objs) lwlib lwlink/rules.make
+lwlink/lwobjdump$(PROGSUFFIX): $(lwobjdump_objs) lwlib
 	@echo Linking $@
 	@$(CC) -o $@ $(lwobjdump_objs) $(LDFLAGS)
 
-lwar/lwar$(PROGSUFFIX): $(lwar_objs) lwlib lwar/rules.make
+lwar/lwar$(PROGSUFFIX): $(lwar_objs) lwlib
 	@echo Linking $@
 	@$(CC) -o $@ $(lwar_objs) $(LDFLAGS)
 
@@ -132,4 +145,25 @@
 .PHONY: test
 test: all test/runtests
 	@test/runtests
-	
\ No newline at end of file
+
+.PHONY: manual
+manual: manual-html manual-htmlm manual-pdf
+
+.PHONY: manual-html
+manual-html: docs/manual/manual.html
+
+.PHONY: manual-htmlm
+manual-htmlm: docs/manual/index.html
+
+.PHONY: manual-pdf
+manual-pdf: docs/manual/manual.pdf
+
+docs/manual/manual.html: docs/manual.docbook.sgml
+	docbook2html -o docs -u docs/manual.docbook.sgml && mv docs/manual.docbook.html docs/manual/manual.html
+
+docs/manual/index.html: docs/manual.docbook.sgml
+	docbook2html -o docs/manual docsmanual.docbook.sgml
+
+docs/manual/manual.pdf: docs/manual.docbook.sgml
+	docbook2pdf -o docs -u docsmanual.docbook.sgml && mv docs/manual.docbook.pdf docs/manual/manual.pdf && rm -f docs/manual.docbook.html
+
--- a/docs/rules.make	Wed Jan 11 20:18:10 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-dirname := $(dir $(lastword $(MAKEFILE_LIST)))
-
-.PHONY: manual
-manual: manual-html manual-htmlm manual-pdf
-
-.PHONY: manual-html
-manual-html: $(dirname)/manual/manual.html
-
-.PHONY: manual-htmlm
-manual-htmlm: $(dirname)/manual/index.html
-
-.PHONY: manual-pdf
-manual-pdf: $(dirname)/manual/manual.pdf
-
-$(dirname)/manual/manual.html: $(dirname)/manual.docbook.sgml
-	docbook2html -o $(dirname) -u $(dirname)/manual.docbook.sgml && mv $(dirname)/manual.docbook.html $(dirname)/manual/manual.html
-
-$(dirname)/manual/index.html: $(dirname)/manual.docbook.sgml
-	docbook2html -o $(dirname)/manual $(dirname)manual.docbook.sgml
-
-$(dirname)/manual/manual.pdf: $(dirname)/manual.docbook.sgml
-	docbook2pdf -o $(dirname) -u $(dirname)manual.docbook.sgml && mv $(dirname)/manual.docbook.pdf $(dirname)/manual/manual.pdf && rm -f $(dirname)/manual.docbook.html
--- a/lwar/rules.make	Wed Jan 11 20:18:10 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,5 +0,0 @@
-dirname := $(dir $(lastword $(MAKEFILE_LIST)))
-
-lwar_srcs_local := add.c extract.c list.c lwar.c main.c remove.c replace.c
-
-lwar_srcs := $(lwar_srcs) $(addprefix $(dirname),$(lwar_srcs_local))
--- a/lwasm/rules.make	Wed Jan 11 20:18:10 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-dirname := $(dir $(lastword $(MAKEFILE_LIST)))
-
-lwasm_srcs_local :=  debug.c input.c insn_bitbit.c insn_gen.c insn_indexed.c \
-	insn_inh.c insn_logicmem.c insn_rel.c insn_rlist.c insn_rtor.c insn_tfm.c \
-	instab.c list.c lwasm.c macro.c main.c os9.c output.c pass1.c pass2.c \
-	pass3.c pass4.c pass5.c pass6.c pass7.c pragma.c pseudo.c section.c \
-	struct.c symbol.c
-
-lwasm_srcs := $(lwasm_srcs) $(addprefix $(dirname),$(lwasm_srcs_local))
-
--- a/lwlib/rules.make	Wed Jan 11 20:18:10 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-dirname := $(dir $(lastword $(MAKEFILE_LIST)))
-
-lwlib_srcs_local := lw_alloc.c lw_realloc.c lw_free.c lw_error.c lw_expr.c \
-	lw_stack.c lw_string.c lw_stringlist.c lw_cmdline.c
-
-lwlib_srcs := $(lwlib_srcs) $(addprefix $(dirname),$(lwlib_srcs_local))
--- a/lwlink/rules.make	Wed Jan 11 20:18:10 2012 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,10 +0,0 @@
-dirname := $(dir $(lastword $(MAKEFILE_LIST)))
-
-lwlink_srcs_local := main.c lwlink.c readfiles.c expr.c script.c link.c output.c map.c
-
-lwobjdump_srcs_l := objdump.c
-
-
-lwlink_srcs := $(lwlink_srcs) $(addprefix $(dirname),$(lwlink_srcs_local))
-
-lwobjdump_srcs := $(lwobjdump_srcs) $(addprefix $(dirname),$(lwobjdump_srcs_l))