aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKimplul <kimi.h.kuparinen@gmail.com>2022-05-23 22:05:16 +0300
committerKimplul <kimi.h.kuparinen@gmail.com>2022-05-23 22:05:16 +0300
commitb28fd7d9121c63ae6a1737d890414ef8cce177e0 (patch)
treedd5bd27bfc95250948dd6c98f68e90ccd02e29c7
parent960330c5d843d1aa96aa191fc27f72da563293ea (diff)
downloadkmi-b28fd7d9121c63ae6a1737d890414ef8cce177e0.tar.gz
kmi-b28fd7d9121c63ae6a1737d890414ef8cce177e0.zip
modify file gen
-rw-r--r--.gitignore5
-rw-r--r--Makefile2
-rw-r--r--arch/riscv64/gen/source.mk10
-rw-r--r--arch/riscv64/kernel/entry.S2
-rw-r--r--arch/riscv64/kernel/gen/.gitkeep0
-rw-r--r--arch/riscv64/source.mk2
-rw-r--r--docs/doxygen.conf4
7 files changed, 15 insertions, 10 deletions
diff --git a/.gitignore b/.gitignore
index 3651197..841820c 100644
--- a/.gitignore
+++ b/.gitignore
@@ -4,7 +4,8 @@
*.elf
*.ld
docs/output
-include/apos/gen/*
-arch/*/include/gen/*
deps.mk
*.img
+
+# keep gitkeep files wherever they are
+!.gitkeep
diff --git a/Makefile b/Makefile
index dad5309..f676636 100644
--- a/Makefile
+++ b/Makefile
@@ -97,7 +97,7 @@ apos.bin: init.bin kernel.bin
format:
find arch lib common include -iname '*.[ch]' |\
- uncrustify -c uncrustify.conf --no-backup -F -
+ uncrustify -c uncrustify.conf -q --no-backup -F -
.PHONY: docs
docs:
diff --git a/arch/riscv64/gen/source.mk b/arch/riscv64/gen/source.mk
index c1b68f9..fda9651 100644
--- a/arch/riscv64/gen/source.mk
+++ b/arch/riscv64/gen/source.mk
@@ -1,11 +1,15 @@
-OFFSET_HEADER := $(ARCH_SOURCE)/gen/asm-offsets.h
+OFFSET_HEADER := $(ARCH_SOURCE)/kernel/gen/asm-offsets.h
OFFSET_SOURCE := $(ARCH_SOURCE)/gen/asm-offsets.c
$(OFFSET_HEADER): $(OFFSET_SOURCE)
echo "#ifndef APOS_ASM_OFFSETS_H" > $(OFFSET_HEADER)
echo "#define APOS_ASM_OFFSETS_H" >> $(OFFSET_HEADER)
- $(COMPILER) $(DEPFLAGS) $(INCLUDE_FLAGS) -S $(OFFSET_SOURCE) -o - |\
+ echo "/**" >> $(OFFSET_HEADER)
+ echo " * @file asm-offsets.h" >> $(OFFSET_HEADER)
+ echo " * This comment is to shut up warnings." >> $(OFFSET_HEADER)
+ echo " */" >> $(OFFSET_HEADER)
+ $(COMPILER) $(INCLUDE_FLAGS) -S $(OFFSET_SOURCE) -o - |\
awk '($$1 == "#->") { print "#define " $$2 " " $$3 }' >> $(OFFSET_HEADER)
echo "#endif /* APOS_ASM_OFFSETS_H */" >> $(OFFSET_HEADER)
-CLEANUP += $(ARCH_SOURCE)/gen/asm-offsets.h
+CLEANUP += $(ARCH_SOURCE)/kernel/gen/asm-offsets.h
diff --git a/arch/riscv64/kernel/entry.S b/arch/riscv64/kernel/entry.S
index ab4ed5c..a5427a7 100644
--- a/arch/riscv64/kernel/entry.S
+++ b/arch/riscv64/kernel/entry.S
@@ -1,4 +1,4 @@
-#include "../gen/asm-offsets.h"
+#include "../kernel/gen/asm-offsets.h"
#include "../kernel/csr.h"
#if __riscv_xlen == 64
diff --git a/arch/riscv64/kernel/gen/.gitkeep b/arch/riscv64/kernel/gen/.gitkeep
new file mode 100644
index 0000000..e69de29
--- /dev/null
+++ b/arch/riscv64/kernel/gen/.gitkeep
diff --git a/arch/riscv64/source.mk b/arch/riscv64/source.mk
index 2768e88..a1ef1d3 100644
--- a/arch/riscv64/source.mk
+++ b/arch/riscv64/source.mk
@@ -21,7 +21,7 @@ run:
include $(ARCH_SOURCE)/gen/source.mk
# dependecy generation
-$(ARCH_BUILD)/kernel/entry.o: $(ARCH_SOURCE)/gen/asm-offsets.h
+$(ARCH_BUILD)/kernel/entry.o: $(ARCH_SOURCE)/kernel/gen/asm-offsets.h
# full cleanup
CLEANUP_CMD := $(ARCH_SOURCE)/conf/rmimage.sh
diff --git a/docs/doxygen.conf b/docs/doxygen.conf
index cc410a1..cc0d07c 100644
--- a/docs/doxygen.conf
+++ b/docs/doxygen.conf
@@ -968,7 +968,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS = */kernel/gen/*
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -1164,7 +1164,7 @@ CLANG_ASSISTED_PARSING = NO
# YES then doxygen will add the directory of each input to the include path.
# The default value is: YES.
-CLANG_ADD_INC_PATHS = YES
+CLANG_ADD_INC_PATHS = NO
# If clang assisted parsing is enabled you can provide the compiler with command
# line options that you would normally use when invoking the compiler. Note that