lmi
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lmi] Best way to integrate PCRE


From: Greg Chicares
Subject: Re: [lmi] Best way to integrate PCRE
Date: Wed, 28 Jul 2021 19:45:30 +0000
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.11.0

On 2021-07-28 18:45, Vadim Zeitlin wrote:
> On Wed, 28 Jul 2021 16:10:34 +0000 Greg Chicares <gchicares@sbcglobal.net> 
> wrote:

[...simply withdraw support for msw builds of 'test_coding_rules{EXE_EXT}'...]

>  Note that this will also require making parts of makefiles conditional on
> the target host, which wasn't the case so far. We can do this, of course,
> but I just wanted to mention that this is going to make the makefiles
> slightly more complex and less linear. I don't think you mind, as you
> probably wouldn't have proposed doing this otherwise, but please let me
> know if this consideration changes anything.

That doesn't change the decision, strategically. Tactically, I'd favor
a minimalist approach along the lines of this untested patch:

--------8<--------8<--------8<--------8<--------8<--------
diff --git a/workhorse.make b/workhorse.make
index 783bde355..f0b4bf6d3 100644
--- a/workhorse.make
+++ b/workhorse.make
@@ -120,7 +120,12 @@ ifeq (,$(USE_SO_ATTRIBUTES))
     ihs_crc_comp$(EXEEXT) \
     lmi_md5sum$(EXEEXT) \
     rate_table_tool$(EXEEXT) \
-    test_coding_rules$(EXEEXT) \
+
+  ifeq (x86_64-pc-linux-gnu,$(LMI_TRIPLET))
+    default_targets += \
+      test_coding_rules$(EXEEXT) \
+
+  endif
 
   ifneq (so_test,$(findstring so_test,$(build_type)))
     default_targets += \
-------->8-------->8-------->8-------->8-------->8--------

Then, I think, the msw 'test_coding_rules.exe' binary couldn't be built
by accident, and couldn't even be built conveniently. Such a change adds
another 'if' clause to an existing 'if...else-if...else', but that's a
smaller increase in complexity than adding a set of new conditional
alternatives in multiple places.

And if anyone tries to build it by some feat of cleverness, it can just
fail; it's probably not necessary to add anything explicit like:

+test_coding_rules.exe:
+    error "Klaatu barada nikto"

We'd also need to change 'hooks/pre-commit', e.g. (untested):

 check_concinnity()
 {
     make custom_tools --directory=/opt/lmi/src/lmi >/dev/null 2>&1
     output=$( \
         make \
+          LMI_COMPILER=gcc ; LMI_TRIPLET=x86_64-pc-linux-gnu ; . 
/opt/lmi/src/lmi/set_toolchain.sh

and, if that fails because no compiler for that platform is installed,
then the pre-commit script can just return nonzero.

Oh, and we'll need something like this, too (untested):

--------8<--------8<--------8<--------8<--------8<--------
diff --git a/nychthemeral_test.sh b/nychthemeral_test.sh
index 9dda1180c..fbb23155f 100755
--- a/nychthemeral_test.sh
+++ b/nychthemeral_test.sh
@@ -188,9 +188,13 @@ printf '\n# test concinnity\n\n'
 make "$coefficiency" check_concinnity 2>&1 \
   | tee "$log_dir"/concinnity | sed -e "$build_clutter" -e 
"$concinnity_clutter"
 
-printf '# install; check physical closure\n\n'
-make "$coefficiency" install check_physical_closure 2>&1 \
-  | tee "$log_dir"/install | sed -e "$build_clutter" -e "$install_clutter"
+# PCRE is not built for secondary platforms (other than pc-linux-gnu)
+if [ "x86_64-pc-linux-gnu" = "$LMI_TRIPLET" ]
+then
+  printf '# install; check physical closure\n\n'
+  make "$coefficiency" install check_physical_closure 2>&1 \
+    | tee "$log_dir"/install | sed -e "$build_clutter" -e "$install_clutter"
+fi
 
 printf '  Production system built--ready to start GUI test in another 
session.\n' > /dev/tty
-------->8-------->8-------->8-------->8-------->8--------

So, yes, there do need to be changes in a couple of places, but it
needn't amount to a grand restructuring.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]