Skip to content

Commit 90e5708

Browse files
authored
Merge pull request sleuthkit#3238 from sleuthkit/patch-includes-from-project-base
Provide for building in a different builddir
2 parents 92ffb0a + c8ba95b commit 90e5708

33 files changed

+80
-65
lines changed

.github/workflows/build_ossfuzz.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ jobs:
1919
- architecture: 'x64'
2020
compiler: 'gcc'
2121
configure_options: ''
22-
if: false
2322
steps:
2423
- name: Install build dependencies
2524
run: |
@@ -36,6 +35,6 @@ jobs:
3635
sed 's?./tsk/util/??' -i projects/sleuthkit/build.sh
3736
sed 's?./tsk/pool/??' -i projects/sleuthkit/build.sh
3837
sed 's?--without-libvmdk?--without-libvmdk --without-libcrypto?' -i projects/sleuthkit/build.sh
39-
python3 infra/helper.py build_image --pull sleuthkit
38+
python3 infra/helper.py build_image --pull sleuthkit
4039
python3 infra/helper.py build_fuzzers --sanitizer address sleuthkit
4140
python3 infra/helper.py check_build sleuthkit

Makefile.am

Lines changed: 26 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -602,13 +602,15 @@ EXTRA_DIST += \
602602
tools/timeline/mactime.base \
603603
tools/timeline/.perltidyrc
604604

605-
tools/timeline/mactime: tools/timeline/mactime.base Makefile
605+
tools/timeline/mactime: $(srcdir)/tools/timeline/mactime.base Makefile
606+
@mkdir -p $(dir $@)
606607
@echo "#!$(PERL) -w" >$@
607608
@echo "my \$$VER=\"$(VERSION)\";" >>$@
608609
@cat $(srcdir)/tools/timeline/mactime.base >>$@
609610
@chmod +x $@
610611

611-
tools/sorter/sorter: tools/sorter/sorter.base Makefile
612+
tools/sorter/sorter: $(srcdir)/tools/sorter/sorter.base Makefile
613+
@mkdir -p $(dir $@)
612614
@echo "#!$(PERL) -w" >$@
613615
@echo "my \$$BIN_DIR=\"$(bindir)\";" >>$@
614616
@echo "my \$$DATA_DIR=\"$(datadir)\";" >>$@
@@ -622,7 +624,8 @@ tools/sorter/sorter: tools/sorter/sorter.base Makefile
622624

623625
EXTRA_DIST += test/legacy/runtests.sh
624626

625-
check_SCRIPTS = \
627+
## Check system
628+
check_script_files = \
626629
test/check_static.sh \
627630
test/test_libraries.sh \
628631
test/test_static_tools.sh \
@@ -635,6 +638,9 @@ check_SCRIPTS = \
635638
test/tools/vstools/test_mmls.sh \
636639
test/tools/vstools/test_mmls_E01.sh
637640

641+
check_SCRIPTS = $(check_script_files)
642+
EXTRA_DIST += $(check_script_files)
643+
638644
TESTS = \
639645
test/runner \
640646
test/test_libraries.sh \
@@ -688,20 +694,33 @@ test_runner_SOURCES = \
688694
test/tsk/img/test_vmdk.cpp \
689695
test/tsk/util/test_crypto.cpp \
690696
test/tsk/hashdb/test_binsrch_index.cpp \
691-
test/runner.cpp
697+
test/runner.cpp \
698+
vendors/catch.hpp
692699

693700
EXTRA_test_runner_DEPENDENCIES = test/get_images/test_images.txt
694701

695-
test_fiwalk_fiwalk_test_CPPFLAGS = $(AM_CPPFLAGS) -Ivendors $(CATCH2_CPPFLAGS)
702+
test_fiwalk_fiwalk_test_CPPFLAGS = $(AM_CPPFLAGS) -I$(srcdir)/vendors $(CATCH2_CPPFLAGS)
696703
test_fiwalk_fiwalk_test_LDADD = $(TSK_LIBS)
697704
test_fiwalk_fiwalk_test_SOURCES = \
698705
test/fiwalk/fiwalk_test.cpp \
699706
$(tools_fiwalk_src_libfiwalk_la_SOURCES)
700707

701708
EXTRA_test_fiwalk_fiwalk_test_DEPENDENCIES = test/get_images/test_images.txt
702709

703-
test/get_images/test_images.txt: test/get_images/test_images.yaml test/get_images/get_test_images.bash test/get_images/get_test_images.py
704-
test/get_images/get_test_images.bash
710+
# System for getting test images
711+
# This will be replaced with a sub repo
712+
713+
get_images_inputs = \
714+
test/get_images/get_test_images.bash \
715+
test/get_images/get_test_images.py \
716+
test/get_images/test_images.yaml
717+
718+
test/get_images/test_images.txt: $(get_images_inputs)
719+
bash $(srcdir)/test/get_images/get_test_images.bash
720+
721+
EXTRA_DIST += $(get_images_inputs)
722+
723+
##
705724

706725
CLEANFILES += test/get_images/test_images.txt
707726

rejistry++/include/librejistry++.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,4 @@
3535
#include "../src/RegistryValue.h"
3636
#include "../src/RejistryException.h"
3737

38-
#endif
38+
#endif

test/get_images/get_test_images.bash

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@ MYDIR=$(dirname "$0")
77
pushd $MYDIR
88
if [ ! -d venv ]; then
99
python3 -m venv venv
10-
source venv/bin/activate
11-
pip install -r requirements.txt
12-
else
13-
source venv/bin/activate
1410
fi
11+
source venv/bin/activate
12+
pip install -r requirements.txt
1513
popd
1614
python3 test/get_images/get_test_images.py

tsk/auto/db_sqlite.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include "tsk_db_sqlite.h"
1717
#include "guid.h"
18-
#include "../img/pool.hpp"
18+
#include "tsk/img/pool.hpp"
1919
#include <string.h>
2020
#include <sstream>
2121
#include <algorithm>

tsk/auto/tsk_db_sqlite.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
#ifdef HAVE_LIBSQLITE3
2626
#include <sqlite3.h>
2727
#else
28-
#include "../../vendors/sqlite3.h"
28+
#include "vendors/sqlite3.h"
2929
#endif
3030

3131
using std::map;

tsk/fs/apfs.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
* This software is distributed under the Common Public License 1.0
99
*/
10-
#include "../util/crypto.hpp"
10+
#include "tsk/util/crypto.hpp"
1111
#include "apfs_fs.hpp"
1212
#include "tsk_apfs.hpp"
1313

tsk/fs/apfs_compat.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
*
88
* This software is distributed under the Common Public License 1.0
99
*/
10-
#include "../libtsk.h"
10+
#include "tsk/libtsk.h"
1111

1212
#include "decmpfs.h"
1313
#include "tsk_fs_i.h"
1414

15-
#include "../pool/apfs_pool_compat.hpp"
16-
#include "../img/pool.hpp"
15+
#include "tsk/pool/apfs_pool_compat.hpp"
16+
#include "tsk/img/pool.hpp"
1717
#include "apfs_compat.hpp"
1818

1919
#include <cstring>

tsk/fs/apfs_fs.hpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@
1010
#pragma once
1111

1212
#if HAVE_CONFIG_H
13-
#include "../tsk_config.h"
13+
#include "tsk/tsk_config.h"
1414
#endif
1515

16-
#include "../util/crypto.hpp"
16+
#include "tsk/util/crypto.hpp"
1717
#include "apfs_fs.h"
1818
#include "tsk_apfs.hpp"
1919

tsk/fs/apfs_open.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@
77
*
88
* This software is distributed under the Common Public License 1.0
99
*/
10-
#include "../libtsk.h"
10+
#include "tsk/libtsk.h"
1111

1212
#include "apfs_compat.hpp"
13-
#include "../img/pool.hpp"
13+
#include "tsk/img/pool.hpp"
1414
#include "tsk_fs_i.h"
1515

1616
TSK_FS_INFO* apfs_open_auto_detect(

0 commit comments

Comments
 (0)