fix(programs/psa): commit python3 generated file

Python should not be required for the build when the no_test target is
used. This commit adds the generated file to the source tree and the
check-generated-files script, and removes the generation from (c)make.

Fixes #3524

Signed-off-by: Cameron Nemo <cnemo@tutanota.com>
This commit is contained in:
Cameron Nemo 2020-09-22 10:37:26 -07:00
parent 9b33eb3284
commit e18d09de37
7 changed files with 405 additions and 23 deletions

View file

@ -118,8 +118,6 @@ ifdef TEST_CPP
APPS += test/cpp_dummy_build$(EXEXT)
endif
EXTRA_GENERATED =
.SILENT:
.PHONY: all clean list fuzz
@ -141,16 +139,6 @@ $(MBEDLIBS):
${MBEDTLS_TEST_OBJS}:
$(MAKE) -C ../tests mbedtls_test
ifdef WINDOWS
EXTRA_GENERATED += psa\psa_constant_names_generated.c
else
EXTRA_GENERATED += psa/psa_constant_names_generated.c
endif
psa/psa_constant_names$(EXEXT): psa/psa_constant_names_generated.c
psa/psa_constant_names_generated.c: ../scripts/generate_psa_constants.py ../include/psa/crypto_values.h ../include/psa/crypto_extra.h
../scripts/generate_psa_constants.py
aes/aescrypt2$(EXEXT): aes/aescrypt2.c $(DEP)
echo " CC aes/aescrypt2.c"
$(CC) $(LOCAL_CFLAGS) $(CFLAGS) aes/aescrypt2.c $(LOCAL_LDFLAGS) $(LDFLAGS) -o $@
@ -371,12 +359,10 @@ clean:
ifndef WINDOWS
rm -f $(APPS)
-rm -f ssl/ssl_pthread_server$(EXEXT)
rm -f $(EXTRA_GENERATED)
-rm -f test/cpp_dummy_build$(EXEXT)
else
if exist *.o del /Q /F *.o
if exist *.exe del /Q /F *.exe
del /S /Q /F $(EXTRA_GENERATED)
endif
$(MAKE) -C fuzz clean