Internals: Add format-make rule and standardize Makefile indents. No functional change intended.
This commit is contained in:
parent
6af694b04b
commit
51545b36ca
|
@ -0,0 +1,30 @@
|
|||
# mbake configuration file
|
||||
|
||||
[formatter]
|
||||
# Indentation settings
|
||||
use_tabs = true
|
||||
tab_width = 2
|
||||
|
||||
# Spacing settings
|
||||
space_around_assignment = true
|
||||
space_before_colon = false
|
||||
space_after_colon = true
|
||||
|
||||
# Line continuation settings
|
||||
normalize_line_continuations = true
|
||||
max_line_length = 100
|
||||
|
||||
# PHONY settings
|
||||
group_phony_declarations = false
|
||||
phony_at_top = false
|
||||
auto_insert_phony_declarations = false
|
||||
|
||||
# General settings
|
||||
remove_trailing_whitespace = true
|
||||
ensure_final_newline = true
|
||||
normalize_empty_lines = true
|
||||
max_consecutive_empty_lines = 2
|
||||
|
||||
# Global settings
|
||||
debug = false
|
||||
verbose = false
|
31
Makefile.in
31
Makefile.in
|
@ -228,24 +228,26 @@ doxygen:
|
|||
spelling:
|
||||
$(MAKE) -C docs spelling
|
||||
|
||||
|
||||
######################################################################
|
||||
# Install
|
||||
|
||||
# Public executables intended to be invoked directly by the user
|
||||
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
|
||||
VL_INST_PUBLIC_SCRIPT_FILES = verilator \
|
||||
VL_INST_PUBLIC_SCRIPT_FILES = \
|
||||
verilator \
|
||||
verilator_coverage \
|
||||
verilator_gantt \
|
||||
verilator_profcfunc \
|
||||
|
||||
VL_INST_PUBLIC_BIN_FILES = verilator_bin$(EXEEXT) \
|
||||
VL_INST_PUBLIC_BIN_FILES = \
|
||||
verilator_bin$(EXEEXT) \
|
||||
verilator_bin_dbg$(EXEEXT) \
|
||||
verilator_coverage_bin_dbg$(EXEEXT) \
|
||||
|
||||
# Private executabels intended to be invoked by internals
|
||||
# Don't put wildcards in these variables, it might cause an uninstall of other stuff
|
||||
VL_INST_PRIVATE_SCRIPT_FILES = verilator_ccache_report \
|
||||
VL_INST_PRIVATE_SCRIPT_FILES = \
|
||||
verilator_ccache_report \
|
||||
verilator_includer \
|
||||
|
||||
VL_INST_INC_BLDDIR_FILES = \
|
||||
|
@ -412,7 +414,8 @@ CPPCHECK_FLAGS = --enable=all --inline-suppr \
|
|||
--suppress=cstyleCast --suppress=useInitializationList \
|
||||
--suppress=nullPointer --suppress=nullPointerRedundantCheck --suppress=ctunullpointer \
|
||||
--suppress=unusedFunction --suppress=unusedScopedObject \
|
||||
--suppress=useStlAlgorithm
|
||||
--suppress=useStlAlgorithm \
|
||||
|
||||
CPPCHECK_FLAGS += --xml
|
||||
CPPCHECK_DEP = $(subst .cpp,.cppcheck,$(CHECK_CPP))
|
||||
CPPCHECK_INC = -I$(srcdir)/include -I$(srcdir)/include/gtkwave -I$(srcdir)/include/vltstd -I$(srcdir)/src/obj_dbg -I$(srcdir)/src
|
||||
|
@ -482,6 +485,15 @@ CMAKE_FILES = \
|
|||
test_regress/CMakeLists.txt \
|
||||
*.cmake.in \
|
||||
|
||||
# Makefiles
|
||||
MAKE_FILES = \
|
||||
Makefile*.in \
|
||||
docs/Makefile* \
|
||||
include/verilated.mk.in \
|
||||
examples/*/Makefile* \
|
||||
src/Makefile*.in \
|
||||
test_regress/Makefile* \
|
||||
|
||||
# Python programs, subject to format and lint
|
||||
PY_PROGRAMS = \
|
||||
bin/verilator_ccache_report \
|
||||
|
@ -518,8 +530,7 @@ PY_FILES = \
|
|||
test_regress/t/*.py \
|
||||
|
||||
# Python files, test_regress tests
|
||||
PY_TEST_FILES = \
|
||||
test_regress/t/*.py \
|
||||
PY_TEST_FILES = test_regress/t/*.py
|
||||
|
||||
YAPF = yapf3
|
||||
YAPF_FLAGS = -i --parallel
|
||||
|
@ -533,6 +544,12 @@ GERSEMI_FLAGS = -i
|
|||
format-cmake:
|
||||
$(GERSEMI) $(GERSEMI_FLAGS) $(CMAKE_FILES)
|
||||
|
||||
MBAKE = mbake
|
||||
MBAKE_FLAGS = format --config ./.bake.toml
|
||||
|
||||
format-make:
|
||||
$(MBAKE) $(MBAKE_FLAGS) $(MAKE_FILES)
|
||||
|
||||
format-yaml: yamlfix
|
||||
|
||||
PYLINT = pylint
|
||||
|
|
|
@ -40,7 +40,6 @@ CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(C
|
|||
ifneq ($(CMAKE_GT_3_8),true)
|
||||
TARGET := oldcmake
|
||||
else
|
||||
|
||||
# Check if SC exists via a verilator call (empty if not)
|
||||
SYSTEMC_EXISTS := $(shell $(VERILATOR) --get-supported SYSTEMC)
|
||||
|
||||
|
@ -58,7 +57,6 @@ TARGET := run
|
|||
else
|
||||
TARGET := nosc
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -40,7 +40,6 @@ CMAKE_GT_3_8 := $(shell [ $(CMAKE_MAJOR) -gt 3 -o \( $(CMAKE_MAJOR) -eq 3 -a $(C
|
|||
ifneq ($(CMAKE_GT_3_8),true)
|
||||
TARGET := oldcmake
|
||||
else
|
||||
|
||||
# Check if SC exists via a verilator call (empty if not)
|
||||
SYSTEMC_EXISTS := $(shell $(VERILATOR) --get-supported SYSTEMC)
|
||||
|
||||
|
@ -58,7 +57,6 @@ TARGET := run
|
|||
else
|
||||
TARGET := nosc
|
||||
endif
|
||||
|
||||
endif
|
||||
endif
|
||||
|
||||
|
|
|
@ -90,7 +90,6 @@ run:
|
|||
@echo "To see waveforms, open logs/vlt_dump.vcd in a waveform viewer"
|
||||
@echo
|
||||
|
||||
|
||||
######################################################################
|
||||
# Other targets
|
||||
|
||||
|
|
|
@ -176,7 +176,6 @@ ifneq ($(VM_TIMING),0)
|
|||
endif
|
||||
endif
|
||||
|
||||
|
||||
#######################################################################
|
||||
### Aggregates
|
||||
|
||||
|
@ -258,7 +257,6 @@ endif
|
|||
|
||||
$(VM_PREFIX)__ALL.a: $(VK_OBJS) $(VM_HIER_LIBS)
|
||||
|
||||
|
||||
######################################################################
|
||||
### Compile rules
|
||||
|
||||
|
|
|
@ -102,7 +102,8 @@ TEST_SNAP_DIR ?= snapshot
|
|||
# Command to diff directories
|
||||
TEST_DIFF_TOOL ?= $(if $(shell which icdiff), icdiff -N -r, diff -r)
|
||||
|
||||
TEST_SNAP_IGNORE := *.status *.log *.dat *.d *.o *.a *.so *stats*.txt *.html \
|
||||
TEST_SNAP_IGNORE := \
|
||||
*.status *.log *.dat *.d *.o *.a *.so *stats*.txt *.html \
|
||||
*.includecache *.out *.fst *.fst.vcd *.tree *.tree*.json \
|
||||
*.dot *.csv *.xml *.hash *.cmake gmon.out.* CMakeFiles \
|
||||
profile_exec.vcd t_pgo_threads
|
||||
|
|
Loading…
Reference in New Issue