Skip to content

Commit

Permalink
build: remove chkjson (#3247)
Browse files Browse the repository at this point in the history
- BN discord had 3 mentions of chkjson in recorded history and all of them was by me
- cataclysm executable already provides same functionality via `--check-mods`
  • Loading branch information
scarf005 authored Sep 24, 2023
1 parent ce86805 commit b09decc
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 217 deletions.
2 changes: 0 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
!src/chkjson
*.7z
*.a
*.d
Expand Down Expand Up @@ -41,7 +40,6 @@ cataclysm-tiles
cataclysm-tiles.exe.manifest
cataclysm-vcpkg
cataclysmdda-*
chkjson*
debug.log
logg.txt

Expand Down
4 changes: 1 addition & 3 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -390,9 +390,7 @@ endif ()
add_subdirectory(src)
add_subdirectory(data)
add_subdirectory(lang)
if (NOT MSVC)
add_subdirectory(src/chkjson)
endif ()

add_subdirectory(tests)
if (JSON_FORMAT)
add_subdirectory(tools/format)
Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ else
endif
W32TILESTARGET = $(BUILD_PREFIX)$(TILES_TARGET_NAME).exe
W32TARGET = $(BUILD_PREFIX)$(TARGET_NAME).exe
CHKJSON_BIN = $(BUILD_PREFIX)chkjson
BINDIST_DIR = $(BUILD_PREFIX)bindist
BUILD_DIR = $(CURDIR)
SRC_DIR = src
Expand Down Expand Up @@ -578,7 +577,6 @@ endif

# Global settings for Windows targets
ifeq ($(TARGETSYSTEM),WINDOWS)
CHKJSON_BIN = chkjson.exe
TARGET = $(W32TARGET)
BINDIST = $(W32BINDIST)
BINDIST_CMD = $(W32BINDIST_CMD)
Expand Down Expand Up @@ -802,7 +800,6 @@ HEADERS := $(wildcard $(SRC_DIR)/*.h)
TESTSRC := $(wildcard tests/*.cpp)
TESTHDR := $(wildcard tests/*.h)
JSON_FORMATTER_SOURCES := tools/format/format.cpp src/json.cpp
CHKJSON_SOURCES := src/chkjson/chkjson.cpp src/json.cpp
LUA_SOURCES := $(wildcard $(LUA_SRC_DIR)/*.c)
CLANG_TIDY_PLUGIN_SOURCES := \
$(wildcard tools/clang-tidy-plugin/*.cpp tools/clang-tidy-plugin/*/*.cpp)
Expand All @@ -814,7 +811,6 @@ ASTYLE_SOURCES := $(sort \
$(TESTSRC) \
$(TESTHDR) \
$(JSON_FORMATTER_SOURCES) \
$(CHKJSON_SOURCES) \
$(CLANG_TIDY_PLUGIN_SOURCES) \
$(TOOLHDR))

Expand Down Expand Up @@ -961,19 +957,12 @@ src/version.cpp: src/version.h
localization:
lang/compile_mo.sh $(LANGUAGES)

$(CHKJSON_BIN): $(CHKJSON_SOURCES)
$(CXX) $(CXXFLAGS) $(TOOL_CXXFLAGS) -Isrc/chkjson -Isrc $(CHKJSON_SOURCES) -o $(CHKJSON_BIN)

json-check: $(CHKJSON_BIN)
./$(CHKJSON_BIN)

clean: clean-tests
rm -rf *$(TARGET_NAME) *$(TILES_TARGET_NAME)
rm -rf *$(TILES_TARGET_NAME).exe *$(TARGET_NAME).exe *$(TARGET_NAME).a
rm -rf *obj *objwin
rm -rf *$(BINDIST_DIR) *cataclysmbn-*.tar.gz *cataclysmbn-*.zip
rm -f $(SRC_DIR)/version.h
rm -f $(CHKJSON_BIN)
rm -f pch/*pch.hpp.gch
rm -f pch/*pch.hpp.pch
rm -f pch/*pch.hpp.d
Expand Down Expand Up @@ -1222,7 +1211,6 @@ cmake-format:
./CMakeLists.txt \
./data/CMakeLists.txt \
./lang/CMakeLists.txt \
./src/chkjson/CMakeLists.txt \
./src/CMakeLists.txt \
./src/version.cmake \
./tests/CMakeLists.txt \
Expand Down
3 changes: 0 additions & 3 deletions build-scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,6 @@ then
make style-all-json-parallel RELEASE=1

tools/dialogue_validator.py data/json/npcs/* data/json/npcs/*/* data/json/npcs/*/*/*
# Also build chkjson (even though we're not using it), to catch any
# compile errors there
make -j "$num_jobs" chkjson
elif [ -n "$JUST_JSON" ]
then
echo "Early exit on just-json change"
Expand Down
24 changes: 0 additions & 24 deletions src/chkjson/CMakeLists.txt

This file was deleted.

173 changes: 0 additions & 173 deletions src/chkjson/chkjson.cpp

This file was deleted.

0 comments on commit b09decc

Please sign in to comment.