Changeset 1665 in kBuild for trunk/src/ash/Makefile.kmk
- Timestamp:
- Jun 30, 2008 9:14:11 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/ash/Makefile.kmk
r1624 r1665 1 1 # $Id: Makefile.kmk 785 2007-01-24 22:21:56Z bird $ 2 2 ## @file 3 # ash3 # Sub-makefile for kmk_ash. 4 4 # 5 5 … … 25 25 # 26 26 27 DEPTH = ../..28 include $( PATH_KBUILD)/header.kmk27 SUB_DEPTH = ../.. 28 include $(KBUILD_PATH)/subheader.kmk 29 29 30 30 #INSTALLS = ash.man … … 46 46 kmk_ash_DEFS.freebsd = \ 47 47 HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME 48 kmk_ash_INCS = $(PATH_ TARGET) . # (the last is because of error.h)49 kmk_ash_CFLAGS.win = -I. ## @todo kBuild bug .48 kmk_ash_INCS = $(PATH_kmk_ash) . # (the last is because of error.h) 49 kmk_ash_CFLAGS.win = -I. ## @todo kBuild bug? 50 50 kmk_ash_INCS.win = win 51 51 kmk_ash_SOURCES = \ … … 75 75 bltin/kill.c \ 76 76 bltin/test.c \ 77 $(PATH_ TARGET)/arith.c \78 $(PATH_ TARGET)/builtins.c \79 $(PATH_ TARGET)/init.c \80 $(PATH_ TARGET)/nodes.c77 $(PATH_kmk_ash)/arith.c \ 78 $(PATH_kmk_ash)/builtins.c \ 79 $(PATH_kmk_ash)/init.c \ 80 $(PATH_kmk_ash)/nodes.c 81 81 kmk_ash_SOURCES.linux = \ 82 82 sys_signame.c \ … … 96 96 97 97 kmk_ash_INTERMEDIATES = \ 98 $(PATH_ TARGET)/arith.h \99 $(PATH_ TARGET)/builtins.h \100 $(PATH_ TARGET)/nodes.h \101 $(PATH_ TARGET)/token.h98 $(PATH_kmk_ash)/arith.h \ 99 $(PATH_kmk_ash)/builtins.h \ 100 $(PATH_kmk_ash)/nodes.h \ 101 $(PATH_kmk_ash)/token.h 102 102 kmk_ash_CLEAN = \ 103 103 $(kmk_ash_INTERMEDIATES) \ 104 $(PATH_ TARGET)/arith.c \105 $(PATH_ TARGET)/arith_lex.c \106 $(PATH_ TARGET)/builtins.c \107 $(PATH_ TARGET)/init.c \108 $(PATH_ TARGET)/nodes.c104 $(PATH_kmk_ash)/arith.c \ 105 $(PATH_kmk_ash)/arith_lex.c \ 106 $(PATH_kmk_ash)/builtins.c \ 107 $(PATH_kmk_ash)/init.c \ 108 $(PATH_kmk_ash)/nodes.c 109 109 110 110 kmk_ash.man_TEMPLATE = usr.bin.man … … 115 115 116 116 if1of ($(KBUILD_TARGET), win nt) 117 118 117 # 119 118 # Use the pregenerated code. 120 119 # 121 120 kmk_ash_DEPS := 122 kmk_ash_SOURCES += $(PATH_TARGET)/arith_lex.c 121 kmk_ash_SOURCES += $(PATH_kmk_ash)/arith_lex.c 122 123 include $(FILE_KBUILD_SUB_FOOTER) 123 124 124 125 define def_copy_generated 125 $(PATH_ TARGET)/$(src): generated/$(src)126 $(PATH_kmk_ash)/$(src): generated/$(src) 126 127 $$(RM) -f $$@ 127 128 $$(CP) -f $$^ $$@ 128 kmk_ash_DEPS += $(PATH_TARGET)/$(src)129 129 endef 130 130 … … 132 132 $(eval $(def_copy_generated))) 133 133 134 include $(FILE_KBUILD_FOOTER)135 134 136 135 else 136 # 137 # Generate the code on the fly. 138 # 137 139 138 140 ifeq (1,2) #disabled for now. … … 142 144 kmk_ash_LEXFLAGS = -8 143 145 else 144 kmk_ash_SOURCES += $(PATH_ TARGET)/arith_lex.c146 kmk_ash_SOURCES += $(PATH_kmk_ash)/arith_lex.c 145 147 endif 146 148 147 include $(FILE_KBUILD_ FOOTER)149 include $(FILE_KBUILD_SUB_FOOTER) 148 150 149 151 # … … 160 162 endif 161 163 162 $(PATH_ TARGET)/arith.h + $(PATH_TARGET)/arith.c: arith.y | $(call DIRDEP,$(PATH_TARGET))164 $(PATH_kmk_ash)/arith.h + $(PATH_kmk_ash)/arith.c: $(kmk_ash_PATH)/arith.y | $(call DIRDEP,$(PATH_kmk_ash)) 163 165 $(YACC) -ld $^ 164 $(MV) -f y.tab.c $(PATH_ TARGET)/arith.c165 $(MV) -f y.tab.h $(PATH_ TARGET)/arith.h166 $(MV) -f y.tab.c $(PATH_kmk_ash)/arith.c 167 $(MV) -f y.tab.h $(PATH_kmk_ash)/arith.h 166 168 167 169 ifndef kmk_ash_LEXTOOL 168 $(PATH_ TARGET)/arith_lex.c: arith_lex.l | $(call DIRDEP,$(PATH_TARGET))170 $(PATH_kmk_ash)/arith_lex.c: $(kmk_ash_PATH)/arith_lex.l | $(call DIRDEP,$(PATH_kmk_ash)) 169 171 flex -8 -o$@ $^ # 8-bit lex scanner for arithmetic 170 172 endif 171 173 172 $(PATH_TARGET)/builtins.h + $(PATH_TARGET)/builtins.c: $(PATH_CURRENT)/mkbuiltins shell.h builtins.def | $(call DIRDEP,$(PATH_TARGET)) 174 $(PATH_kmk_ash)/builtins.h + $(PATH_kmk_ash)/builtins.c: \ 175 $(kmk_ash_PATH)/mkbuiltins \ 176 $(kmk_ash_PATH)/shell.h \ 177 $(kmk_ash_PATH)/builtins.def \ 178 | $(call DIRDEP,$(PATH_kmk_ash)) 173 179 $(BOOTSTRAP_SHELL) $+ $(dir $@) 174 [ -f $(PATH_TARGET)/builtins.h ] 175 176 $(PATH_TARGET)/nodes.h + $(PATH_TARGET)/nodes.c: $(PATH_CURRENT)/mknodes.sh nodetypes nodes.c.pat | $(call DIRDEP,$(PATH_TARGET)) 180 [ -f $(PATH_kmk_ash)/builtins.h ] 181 182 $(PATH_kmk_ash)/nodes.h + $(PATH_kmk_ash)/nodes.c: \ 183 $(kmk_ash_PATH)/mknodes.sh \ 184 $(kmk_ash_PATH)/nodetypes \ 185 $(kmk_ash_PATH)/nodes.c.pat \ 186 | $(call DIRDEP,$(PATH_kmk_ash)) 177 187 $(BOOTSTRAP_SHELL) $+ $(dir $@) 178 188 [ -f $(dir $@)/nodes.h ] 179 189 180 $(PATH_ TARGET)/token.h: $(PATH_CURRENT)/mktokens | $(call DIRDEP,$(PATH_TARGET))190 $(PATH_kmk_ash)/token.h: $(kmk_ash_PATH)/mktokens | $(call DIRDEP,$(PATH_kmk_ash)) 181 191 $(BOOTSTRAP_SHELL) $+ 182 192 $(MV) token.h $@ 183 193 184 $(PATH_TARGET)/init.c: $(PATH_CURRENT)/mkinit.sh $(filter-out $(PATH_TARGET)/%,$(kmk_ash_SOURCES)) | $(call DIRDEP,$(PATH_TARGET)) 194 $(PATH_kmk_ash)/init.c: \ 195 $(kmk_ash_PATH)/mkinit.sh \ 196 $(abspathex $(filter-out $(PATH_kmk_ash)/%,$(kmk_ash_SOURCES)), $(kmk_ash_PATH)) \ 197 | $(call DIRDEP,$(PATH_kmk_ash)) 185 198 $(BOOTSTRAP_SHELL) $+ 186 199 $(MV) init.c $@ 187 200 188 endif 201 endif # generate on the fly
Note:
See TracChangeset
for help on using the changeset viewer.