Changeset 147a066 in mainline
- Timestamp:
- 2016-05-10T06:32:18Z (9 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 2889634
- Parents:
- 7ba16eb
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
kernel/Makefile
r7ba16eb r147a066 48 48 # 49 49 50 AGDEPEND = Makefile.ag.depend 50 51 DEPEND = Makefile.depend 51 52 DEPEND_PREV = $(DEPEND).prev … … 138 139 -include genarch/Makefile.inc 139 140 -include $(DEPEND) 141 -include $(AGDEPEND) 140 142 141 143 ## The at-sign … … 385 387 ARCH_AUTOGENS_PROBE_S := $(addsuffix .ag.probe.s,$(basename $(ARCH_AUTOGENS_AG))) 386 388 389 AUTOGENS_H := $(ARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_H) 390 AUTOGENS_AG := $(ARCH_AUTOGENS_AG) $(GENARCH_AUTOGENS_AG) 391 387 392 LFLAGS_LTO := $(addprefix -Xlinker ,$(LFLAGS)) 388 393 … … 464 469 $(GENMAP) $(MAP_PREV) $(DUMP) $@ 465 470 466 $(DEPEND): $(COMMON_HEADER_ARCH) $(ARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_H) 471 $(AUTOGENS_H): $(AGDEPEND) 472 473 $(AGDEPEND): $(AUTOGENS_AG) 474 touch $@ 475 for g in $?; do \ 476 h=`dirname $$g`/`basename $$g .ag`.h; \ 477 for l in `$(AUTOGEN) depend $$g`; do \ 478 echo "$$h: $$l" >>$@; \ 479 done \ 480 done 481 482 $(DEPEND): $(COMMON_HEADER_ARCH) $(AUTOGENS_H) 467 483 makedepend -f - -- $(DEPEND_DEFS) $(CFLAGS) -- $(ARCH_SOURCES) $(GENARCH_SOURCES) $(GENERIC_SOURCES) > $@ 2> /dev/null 468 484 -[ -f $(DEPEND_PREV) ] && diff -q $(DEPEND_PREV) $@ && mv -f $(DEPEND_PREV) $@ … … 474 490 -rm $(ARCH_AUTOGENS_H) $(ARCH_AUTOGENS_PROBE_C) $(ARCH_AUTOGENS_PROBE_S) 475 491 -rm $(GENARCH_AUTOGENS_H) $(GENARCH_AUTOGENS_PROBE_C) $(GENARCH_AUTOGENS_PROBE_S) 492 -rm $(AGDEPEND) -
kernel/genarch/Makefile.inc
r7ba16eb r147a066 178 178 genarch/include/genarch/multiboot/multiboot_memmap_struct.ag \ 179 179 genarch/include/genarch/multiboot/multiboot_info_struct.ag 180 181 #182 # Currently there is no automated way to describe dependencies between two autogenerated headers,183 # so we need to do it manually184 genarch/include/genarch/multiboot/multiboot_memmap_struct.h: arch/$(KARCH)/include/arch/boot/memmap_struct.h185 186 180 endif 187 181 -
kernel/genarch/include/genarch/multiboot/multiboot_memmap_struct.ag
r7ba16eb r147a066 35 35 }, 36 36 { 37 include : <arch/boot/memmap_struct.h> 37 include : <arch/boot/memmap_struct.h>, 38 depends: arch/$(KARCH)/include/arch/boot/memmap_struct.h, 38 39 } 39 40 ], -
tools/autogen.py
r7ba16eb r147a066 34 34 def usage(): 35 35 print("%s - Automated structure and offsets generator" % sys.argv[0]) 36 print("%s file.ag probe|generate struct.ag" % sys.argv[0])36 print("%s file.ag depend|probe|generate struct.ag" % sys.argv[0]) 37 37 sys.exit() 38 39 def depend(struct): 40 deps = "" 41 for include in struct['includes']: 42 if 'depends' in include.keys(): 43 deps = deps + include['depends'] + "\n" 44 return deps.strip() 38 45 39 46 def generate_includes(struct): … … 160 167 struct = yaml.load(fp) 161 168 162 if sys.argv[1] == "probe": 169 if sys.argv[1] == "depend": 170 deps = depend(struct) 171 print(deps) 172 elif sys.argv[1] == "probe": 163 173 code = probe(struct) 164 174 print(code)
Note:
See TracChangeset
for help on using the changeset viewer.