Changeset 1784 in kBuild for trunk/src/kash/Makefile.kmk
- Timestamp:
- Sep 13, 2008 3:27:59 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/Makefile.kmk
r1665 r1784 38 38 kash_DEFS.linux = BSD 39 39 kash_DEFS.solaris = BSD 40 ## @todo bring over PC_SLASHES? 40 41 kash_DEFS.win = \ 41 42 BSD PC_PATH_SEP PC_DRIVE_LETTERS PC_EXE_EXTS YY_NO_UNISTD_H … … 50 51 HAVE_SYS_SIGNAME HAVE_SYSCTL_H HAVE_SETPROGNAME 51 52 kash_INCS = $(PATH_kash) . # (the last is because of error.h) 53 if "$(USER)" == "bird" && "$(KBUILD_TARGET)" != "win" 54 kash_CFLAGS += -std=gnu99 55 endif 52 56 kash_SOURCES = \ 53 57 main.c \ … … 97 101 strlcpy.c 98 102 99 kash_ ORDERDEPS = \103 kash_INTERMEDIATES = \ 100 104 $(PATH_kash)/arith.h \ 101 105 $(PATH_kash)/builtins.h \ … … 103 107 $(PATH_kash)/token.h 104 108 kash_CLEAN = \ 105 $(kash_ ORDERDEPS)\109 $(kash_INTERMEDIATES) \ 106 110 $(PATH_kash)/arith.c \ 107 111 $(PATH_kash)/arith_lex.c \ … … 118 122 119 123 120 if eq ($(filter-out win,$(KBUILD_TARGET)),)124 if1of ($(KBUILD_TARGET), win) 121 125 122 126 # … … 127 131 kash_SOURCES := $(patsubst $(PATH_kash)/%,generated/%,$(kash_SOURCES)) 128 132 129 include $(FILE_KBUILD_SUB_FOOTER)130 131 133 else 132 133 include $(FILE_KBUILD_SUB_FOOTER)134 134 135 135 # … … 142 142 # 143 143 BOOTSTRAP_SHELL ?= $(SHELL) 144 YACC ?= yacc 144 ifndef YACC 145 YACC := $(firstword $(which byacc) $(which yacc) yacc) 146 endif 145 147 146 $ (PATH_kash)/arith.h $(PATH_kash)/arith.c: arith.y | $(call DIRDEP,$(PATH_kash))148 $$(PATH_kash)/arith.h + $$(PATH_kash)/arith.c: arith.y | $$(dir $$@) 147 149 $(YACC) -ld $^ 148 150 $(MV) -f y.tab.c $(PATH_kash)/arith.c 149 151 $(MV) -f y.tab.h $(PATH_kash)/arith.h 150 152 151 $ (PATH_kash)/arith_lex.c: arith_lex.l | $(call DIRDEP,$(PATH_kash))153 $$(PATH_kash)/arith_lex.c: $$(kash_DEFPATH)/arith_lex.l | $$(dir $$@) 152 154 flex -8 -o$@ $^ # 8-bit lex scanner for arithmetic 153 155 154 $(PATH_kash)/builtins.h $(PATH_kash)/builtins.c: $(kash_PATH)/mkbuiltins shell.h builtins.def | $(call DIRDEP,$(PATH_kash)) 156 $$(PATH_kash)/builtins.h + $$(PATH_kash)/builtins.c: \ 157 $$(kash_DEFPATH)/mkbuiltins \ 158 $$(kash_DEFPATH)/shell.h \ 159 $$(kash_DEFPATH)/builtins.def \ 160 | $$(dir $$@) 155 161 $(BOOTSTRAP_SHELL) $+ $(dir $@) 156 162 [ -f $(PATH_kash)/builtins.h ] 157 163 158 $(PATH_kash)/nodes.h $(PATH_kash)/nodes.c: $(kash_PATH)/mknodes.sh nodetypes nodes.c.pat | $(call DIRDEP,$(PATH_kash)) 164 $$(PATH_kash)/nodes.h + $$(PATH_kash)/nodes.c: \ 165 $$(kash_DEFPATH)/mknodes.sh \ 166 $$(kash_DEFPATH)/nodetypes \ 167 $$(kash_DEFPATH)/nodes.c.pat \ 168 | $$(dir $$@) 159 169 $(BOOTSTRAP_SHELL) $+ $(dir $@) 160 170 [ -f $(dir $@)/nodes.h ] 161 171 162 $ (PATH_kash)/token.h: $(kash_PATH)/mktokens | $(call DIRDEP,$(PATH_kash))172 $$(PATH_kash)/token.h: $$(kash_DEFPATH)/mktokens | $$(dir $$@) 163 173 $(BOOTSTRAP_SHELL) $+ 164 174 $(MV) token.h $@ 165 175 166 $(PATH_kash)/init.c: $(kash_PATH)/mkinit.sh $(filter-out $(PATH_kash)/%,$(kash_SOURCES)) | $(call DIRDEP,$(PATH_kash)) 176 $$(PATH_kash)/init.c: \ 177 $$(kash_DEFPATH)/mkinit.sh \ 178 $$(abspathex $$(filter-out $$(PATH_kash)/%,$$(kash_SOURCES)), $$(kash_DEFPATH)) \ 179 | $$(dir $$@) 167 180 $(BOOTSTRAP_SHELL) $+ 168 181 $(MV) init.c $@ 169 182 170 183 endif 184 185 include $(FILE_KBUILD_SUB_FOOTER) 186
Note:
See TracChangeset
for help on using the changeset viewer.