[build] Remove PyYAML dependency
This converts all the YAML files to JSON files, as json parsing is built into python instead of being a separate library requiring installation. YAML is a superset of JSON, but putting comments in is not quite as obvious as it is in yaml. The following glue was used to convert yaml to json: python -c 'import sys, yaml, json; json.dump(yaml.load(sys.stdin), sys.stdout, indent=4)' < $1 > $2 Clearly I haven't tested this on every single platform, and this doesn't address the large blobs of yaml in the lpc4300 scripts directory, only the cortex NVIC generation process. I've tested a few IRQ driven example apps, and I've checked the generated output of some known cases like the LM3s that has explicit gaps, and they are all generated correctly.
This commit is contained in:
committed by
Piotr Esden-Tempski
parent
b4eb8a6971
commit
5c14780403
6
Makefile
6
Makefile
@@ -47,7 +47,7 @@ Q := @
|
||||
MAKEFLAGS += --no-print-directory
|
||||
endif
|
||||
|
||||
YAMLFILES := $(shell find . -name 'irq.yaml')
|
||||
IRQ_DEFN_FILES := $(shell find . -name 'irq.json')
|
||||
STYLECHECKFILES := $(shell find . -name '*.[ch]')
|
||||
|
||||
all: build
|
||||
@@ -63,7 +63,7 @@ build: lib
|
||||
@./scripts/irq2nvic_h --remove ./$*
|
||||
|
||||
LIB_DIRS:=$(wildcard $(addprefix lib/,$(TARGETS)))
|
||||
$(LIB_DIRS): $(YAMLFILES:=.genhdr)
|
||||
$(LIB_DIRS): $(IRQ_DEFN_FILES:=.genhdr)
|
||||
@printf " BUILD $@\n";
|
||||
$(Q)$(MAKE) --directory=$@ SRCLIBDIR=$(SRCLIBDIR)
|
||||
|
||||
@@ -89,7 +89,7 @@ install: lib
|
||||
doc:
|
||||
$(Q)$(MAKE) -C doc html
|
||||
|
||||
clean: $(YAMLFILES:=.cleanhdr) $(LIB_DIRS:=.clean) $(EXAMPLE_DIRS:=.clean) doc.clean styleclean
|
||||
clean: $(IRQ_DEFN_FILES:=.cleanhdr) $(LIB_DIRS:=.clean) $(EXAMPLE_DIRS:=.clean) doc.clean styleclean
|
||||
|
||||
%.clean:
|
||||
$(Q)if [ -d $* ]; then \
|
||||
|
||||
Reference in New Issue
Block a user