Skip to content

Commit

Permalink
Remove submodule references and update initialization
Browse files Browse the repository at this point in the history
No effects were observed on Make-managed files.

Signed-off-by: Alex Nelson <[email protected]>
  • Loading branch information
ajnelson-nist committed Jun 27, 2024
1 parent 4c9400d commit c4e4a0b
Show file tree
Hide file tree
Showing 8 changed files with 15 additions and 184 deletions.
3 changes: 0 additions & 3 deletions .gitmodules
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
path = deps/CASE-Examples
url = https://github.com/casework/CASE-Examples.git
branch = master
[submodule "deps/case-implementation-plaso"]
path = deps/case-implementation-plaso
url = https://github.com/casework/case-implementation-plaso.git
[submodule "deps/dfxml"]
path = deps/dfxml
url = https://github.com/dfxml-working-group/dfxml_python.git
Expand Down
29 changes: 8 additions & 21 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -30,24 +30,15 @@ all: \
setup

# Removing this flag file checks for added or removed submodules, but does not cause a submodule update to occur on submodules that have already been checked out at least once.
.git_submodule_init: \
.gitmodules
git submodule sync
test -r deps/case/.git || \
(git submodule init deps/case && git submodule update deps/case)
test -r deps/case-api-python/.git || \
(git submodule init deps/case-api-python && git submodule update deps/case-api-python)
test -r deps/case-implementation-plaso/.git || \
(git submodule init deps/case-implementation-plaso && git submodule update deps/case-implementation-plaso)
test -r deps/dfxml/.git || \
(git submodule init deps/dfxml && git submodule update deps/dfxml)
test -r deps/dfxml_schema/.git || \
(git submodule init deps/dfxml_schema && git submodule update deps/dfxml_schema)
touch $@

.git_submodule_init.done.log: \
.gitmodules
git submodule update --init
test -r deps/CASE-Examples/Makefile || \
git submodule update --init deps/CASE-Examples
test -r deps/dfxml/Makefile || \
git submodule update --init deps/dfxml
$(MAKE) \
--directory deps/dfxml \
.git_submodule_init.done.log
touch $@

# This virtual environment is meant to be built once and then persist, even through 'make clean'.
Expand Down Expand Up @@ -146,10 +137,6 @@ clean-tests:
clean

deps/dfxml/setup.cfg: \
.git_submodule_init
.git_submodule_init.done.log
touch -c $@
test -r $@

setup: \
.setup_complete
@echo "Setup complete."
1 change: 0 additions & 1 deletion deps/case-implementation-plaso
Submodule case-implementation-plaso deleted from 87e86e
27 changes: 5 additions & 22 deletions tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ PYTHON3 ?= python3

top_srcdir := $(shell cd .. ; pwd)

dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd

dfxml_top_srcdir := $(top_srcdir)/deps/dfxml

dfxml_xsd := $(dfxml_top_srcdir)/dependencies/dfxml_schema/dfxml.xsd

objects_py_dependencies := \
$(dfxml_top_srcdir)/dfxml/__init__.py \
$(dfxml_top_srcdir)/dfxml/objects.py
Expand All @@ -48,10 +48,7 @@ all:
check-basic \
check-basic-TODO \
check-case_examples \
check-case_implementation_plaso_examples \
check-case_implementation_plaso_examples-TODO \
clean-case_examples \
clean-case_implementation_plaso_examples \
check-cli \
check-mypy \
clean-recursive
Expand Down Expand Up @@ -86,13 +83,11 @@ check: \
check-doctest \
check-cli \
check-package \
check-case_examples \
check-case_implementation_plaso_examples
check-case_examples
@echo "Unit tests pass!"

check-TODO: \
check-basic-TODO \
check-case_implementation_plaso_examples-TODO
check-basic-TODO

check-basic: \
empty.json \
Expand All @@ -107,14 +102,6 @@ check-case_examples: \
check-basic
$(MAKE) -C case_examples check

check-case_implementation_plaso_examples: \
check-basic
$(MAKE) -C case_implementation_plaso_examples check

check-case_implementation_plaso_examples-TODO: \
check-case_implementation_plaso_examples
$(MAKE) -C case_implementation_plaso_examples check-TODO

check-cli: \
.venv.done.log
$(MAKE) \
Expand Down Expand Up @@ -162,12 +149,8 @@ clean: \
clean-case_examples:
$(MAKE) -C case_examples clean

clean-case_implementation_plaso_examples:
$(MAKE) -C case_implementation_plaso_examples clean

clean-recursive: \
clean-case_examples \
clean-case_implementation_plaso_examples
clean-case_examples

empty.json: \
.venv.done.log \
Expand Down
15 changes: 0 additions & 15 deletions tests/case_examples/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,6 @@ SHELL = /bin/bash

top_srcdir := ../..

#BOOKMARK^
dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd

dfxml_top_srcdir := $(top_srcdir)/deps/dfxml

objects_py_dependencies := \
$(dfxml_top_srcdir)/dfxml/__init__.py \
$(dfxml_top_srcdir)/dfxml/objects.py

case_to_dfxml_dependencies := \
$(objects_py_dependencies) \
$(top_srcdir)/case_to_dfxml.py

#BOOKMARKv

all:

Oresteia.dfxml: \
Expand Down
4 changes: 2 additions & 2 deletions tests/case_examples/example.mk
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ endif

top_srcdir := ../..

dfxml_xsd := $(top_srcdir)/deps/dfxml_schema/dfxml.xsd

dfxml_top_srcdir := $(top_srcdir)/deps/dfxml

dfxml_xsd := $(dfxml_top_srcdir)/dependencies/dfxml_schema/dfxml.xsd

objects_py_dependencies := \
$(dfxml_top_srcdir)/dfxml/__init__.py \
$(dfxml_top_srcdir)/dfxml/objects.py
Expand Down
1 change: 0 additions & 1 deletion tests/case_implementation_plaso_examples/.gitignore

This file was deleted.

119 changes: 0 additions & 119 deletions tests/case_implementation_plaso_examples/Makefile

This file was deleted.

0 comments on commit c4e4a0b

Please sign in to comment.