This is an automated email from Gerrit.

"Antonio Borneo <borneo.anto...@gmail.com>" just uploaded a new patch set to 
Gerrit, which you can find at https://review.openocd.org/c/openocd/+/7527

-- gerrit

commit 1303982a865c8a24ebc8f1879d3c8b90a2000cec
Author: Antonio Borneo <borneo.anto...@gmail.com>
Date:   Mon Mar 6 00:27:58 2023 +0100

    build: fix distcheck for jimtcl
    
    The issues have been highlighted while integrated jimtcl 0.82,
    but were already present.
    
    While building jimtcl as submodule, OpenOCD generates the file
    jimtcl/configure.gnu to pass specific configure flags.
    Issue 1: this file is not included in the distribution.
    This causes the rebuild from the distribution to have a jimtcl
    built with different (the default) configure flags.
    With jimtcl 0.82 the new default is to enable all the features,
    but a bug causes the build to fail when openssl is not installed
    in the build system (the bug is already fixed but after 0.82 [1]).
    All these together cause OpenOCD Jenkins to fail the build for
    target 'distcheck' with jimtcl 0.82.
    
    Add jimtcl/configure.gnu to OpenOCD distribution's file list.
    
    The build system considers jimtcl/configure.gnu as a temporarily
    file that should be removed during 'distclean'.
    Issue 2: 'distcheck' set read-only permission to the source files,
    including jimtcl/configure.gnu, so 'distclean' fails removing it.
    
    Add a leading '-' to ignore errors while trying to remove the
    file.
    
    Issue 3: Now that 'distcheck' properly configures and builds
    jimtcl, 'distcheck' still fails because we have enabled jimtcl
    json support in [2] and jimtcl 'distclean' fails to properly
    remove one object file (fixed after 0.82 [3]).
    
    Make OpenOCD removing the file jimtcl/jsmn/jsmn.o to complete
    the execution of 'distcheck'. Add a comment specifying which of
    the jimtcl versions are affected.
    
    Change-Id: I2f9153c5a41ba66b989b27c7bc57b38d1744cc29
    Signed-off-by: Antonio Borneo <borneo.anto...@gmail.com>
    Link: [1] https://github.com/msteveb/jimtcl/commit/22277943a19c
    Link: [2] 0a36acbf6ac6 ("configure: build jimtcl with json extension")
    Link: [3] https://github.com/msteveb/jimtcl/commit/32a488587a3e

diff --git a/Makefile.am b/Makefile.am
index 41daf9522c..fa92da9127 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -26,10 +26,14 @@ noinst_LTLIBRARIES =
 info_TEXINFOS =
 dist_man_MANS =
 EXTRA_DIST =
+DISTCLEANFILES =
 
 if INTERNAL_JIMTCL
 SUBDIRS += jimtcl
 DIST_SUBDIRS += jimtcl
+EXTRA_DIST += jimtcl/configure.gnu
+# jimtcl from 0.79 to 0.82 miss cleaning jsmn.o
+DISTCLEANFILES += jimtcl/jsmn/jsmn.o
 endif
 
 # common flags used in openocd build
@@ -129,9 +133,9 @@ uninstall-hook:
 
 distclean-local:
        rm -rf Doxyfile doxygen
-       rm -f $(srcdir)/jimtcl/configure.gnu
+       -rm -f $(srcdir)/jimtcl/configure.gnu
 
-DISTCLEANFILES = doxygen.log
+DISTCLEANFILES += doxygen.log
 
 METASOURCES = AUTO
 

-- 

Reply via email to