Skip to content

Commit

Permalink
Merge pull request #5329 from gilles-peskine-arm/ssl_debug_helpers_ge…
Browse files Browse the repository at this point in the history
…nerated.h-dependencies

List ssl_debug_helpers_generated.h in generated files
  • Loading branch information
mpg authored Dec 14, 2021
2 parents 32d2a58 + 12e27d4 commit 9fa5bf8
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
2 changes: 2 additions & 0 deletions library/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ if(GEN_FILES)

add_custom_command(
OUTPUT
${CMAKE_CURRENT_BINARY_DIR}/ssl_debug_helpers_generated.h
${CMAKE_CURRENT_BINARY_DIR}/ssl_debug_helpers_generated.c
COMMAND
${MBEDTLS_PYTHON_EXECUTABLE}
Expand All @@ -161,6 +162,7 @@ else()
link_to_source(error.c)
link_to_source(version_features.c)
link_to_source(ssl_debug_helpers_generated.c)
link_to_source(ssl_debug_helpers_generated.h)
endif()

if(CMAKE_COMPILER_IS_GNUCC)
Expand Down
11 changes: 7 additions & 4 deletions library/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,9 @@ libmbedcrypto.dll: $(OBJS_CRYPTO)
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) -o $@ -c $<

.PHONY: generated_files
GENERATED_FILES = error.c version_features.c ssl_debug_helpers_generated.c
GENERATED_FILES = \
error.c version_features.c \
ssl_debug_helpers_generated.c ssl_debug_helpers_generated.h
generated_files: $(GENERATED_FILES)

error.c: ../scripts/generate_errors.pl
Expand All @@ -298,9 +300,10 @@ error.c:
echo " Gen $@"
$(PERL) ../scripts/generate_errors.pl

ssl_debug_helpers_generated.c: ../scripts/generate_ssl_debug_helpers.py
ssl_debug_helpers_generated.c: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
ssl_debug_helpers_generated.c:
ssl_debug_helpers_generated.c: | ssl_debug_helpers_generated.h
ssl_debug_helpers_generated.h: ../scripts/generate_ssl_debug_helpers.py
ssl_debug_helpers_generated.h: $(filter-out %config%,$(wildcard ../include/mbedtls/*.h))
ssl_debug_helpers_generated.h:
echo " Gen $@"
$(PYTHON) ../scripts/generate_ssl_debug_helpers.py --mbedtls-root .. .

Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/check-generated-files.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ check()
check scripts/generate_errors.pl library/error.c
check scripts/generate_query_config.pl programs/test/query_config.c
check scripts/generate_features.pl library/version_features.c
check scripts/generate_ssl_debug_helpers.py library/ssl_debug_helpers_generated.c
check scripts/generate_ssl_debug_helpers.py library/ssl_debug_helpers_generated.h library/ssl_debug_helpers_generated.c
# generate_visualc_files enumerates source files (library/*.c). It doesn't
# care about their content, but the files must exist. So it must run after
# the step that creates or updates these files.
Expand Down

0 comments on commit 9fa5bf8

Please sign in to comment.