From 9de1d33dd9926f88476530cfaedfb29f8e3e4c9e Mon Sep 17 00:00:00 2001 From: Dengke Tang Date: Wed, 22 Feb 2023 14:01:30 -0800 Subject: [PATCH] more fix --- .clang-format-ignore | 1 - Makefile.frag | 8 ++------ Makefile.frag.w32 | 8 ++------ dev-scripts/prepare_package_xml.sh | 8 +++++++- 4 files changed, 11 insertions(+), 14 deletions(-) diff --git a/.clang-format-ignore b/.clang-format-ignore index 65c5a2b..de02e70 100644 --- a/.clang-format-ignore +++ b/.clang-format-ignore @@ -1,4 +1,3 @@ # ignore generated files ext/api.h ext/*_arginfo.h -src/api.h diff --git a/Makefile.frag b/Makefile.frag index 4e5a5e5..bf479fb 100644 --- a/Makefile.frag +++ b/Makefile.frag @@ -55,12 +55,8 @@ ifeq ($(GENERATE_STUBS),1) endif # transform/install api.h from FFI lib -src/api.h: crt/aws-crt-ffi/src/api.h - php gen_api.php crt/aws-crt-ffi/src/api.h > src/api.h - -# install api.h to ext/ as well -ext/api.h : src/api.h - cp -v src/api.h ext/api.h +ext/api.h : crt/aws-crt-ffi/src/api.h + php gen_api.php crt/aws-crt-ffi/src/api.h > ext/api.h ext/php_aws_crt.h: ext/awscrt_arginfo.h ext/api.h diff --git a/Makefile.frag.w32 b/Makefile.frag.w32 index 548ea4d..9ba2450 100644 --- a/Makefile.frag.w32 +++ b/Makefile.frag.w32 @@ -22,12 +22,8 @@ $(BUILD_DIR)\php_awscrt.dll: $(AWSCRT_DIR)\ext\awscrt.c $(AWSCRT_DIR)\ext\awscrt.c: $(AWSCRT_DIR)\build\libaws-crt-ffi.lib $(AWSCRT_DIR)\ext\api.h $(AWSCRT_DIR)\ext\awscrt_arginfo.h # transform\install api.h from FFI lib -$(AWSCRT_DIR)\src\api.h: $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h - php $(AWSCRT_DIR)\gen_api.php $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h > $(AWSCRT_DIR)\src\api.h - -# install api.h to ext/ as well -$(AWSCRT_DIR)\ext\api.h : $(AWSCRT_DIR)\src\api.h - copy $(AWSCRT_DIR)\src\api.h $(AWSCRT_DIR)\ext\api.h +$(AWSCRT_DIR)\ext\api.h: $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h + php $(AWSCRT_DIR)\gen_api.php $(AWSCRT_DIR)\crt\aws-crt-ffi\src\api.h > $(AWSCRT_DIR)\ext\api.h # Use PHPUnit to run tests test-awscrt: install $(AWSCRT_DIR)\src\api.h $(BUILD_DIR)\php_awscrt.dll diff --git a/dev-scripts/prepare_package_xml.sh b/dev-scripts/prepare_package_xml.sh index c8c4bad..0395e35 100755 --- a/dev-scripts/prepare_package_xml.sh +++ b/dev-scripts/prepare_package_xml.sh @@ -30,7 +30,7 @@ doc_ext='(md|json|html|dot|graphml|png|gn|sha1|css|rst|)' special_docs='(LICENSE*|NOTICE|changelog.txt|CHANGELOG|THIRD-PARTY|README*|readme|METADATA|CONTRIBUTORS|UPDATING|doc.config|THIRD-PARTY-LICENSES.txt)' special_tests='(ci-test.sh|format-check.sh|run_tests*|sanitizer-blacklist.txt|run-clang-tidy.sh|benchmark-build-run.sh|break-tests.sh|generate-coverage.sh|test.xml)' special_src='(gen_api.php|gen_stub.php|CMakeLists.txt|post.sh|postun.sh|Makefile*|build-buildspec.sh|build-deps.sh|objects.txt|go.*|BUILD*|DEPS|install_and_run.sh|codemod.sh|requirements.txt)' -skip_files='(package.xml*|prepare_release.sh|codereview.settings|*.o|*.a|*.obj|*.lib|break-tests-android.sh|whitespace.txt|prepare_package_xml.sh|crypto_test_data.cc|*.pdf|*.svg|*.docx|cbmc-proof.txt|codecov*|litani*|*.toml|module.modulemap)' +skip_files='(package.xml*|prepare_release.sh|codereview.settings|*.o|*.a|*.obj|*.lib|break-tests-android.sh|whitespace.txt|prepare_package_xml.sh|crypto_test_data.cc|*.pdf|*.svg|*.docx|cbmc-proof.txt|codecov*|litani*|*.toml|module.modulemap|cleanup.sh)' special_scripts='(awscrt.stub.php)' @@ -136,6 +136,12 @@ do echo '' continue fi + # skip the src directory as it is not part of the native extension + if [[ ${a} == 'src' ]] + then + continue + fi + if [[ -f ${a} ]] then process_file "${a}" else process_dir "${a}"