From 5be20f3927288832218667051671c4d87418c6bc Mon Sep 17 00:00:00 2001 From: stephan Date: Sun, 27 Oct 2024 20:14:49 +0000 Subject: [PATCH] Doc additions and minor cleanups in the --flag alias handling. FossilOrigin-Name: 37a1da038195365cd7eb866b3aa749ad8060a656ac38063520fdb70cf0a0e5f1 --- auto.def | 6 ++++-- autosetup/hwaci-common.tcl | 20 +++++++++++++------- manifest | 14 +++++++------- manifest.uuid | 2 +- 4 files changed, 25 insertions(+), 17 deletions(-) diff --git a/auto.def b/auto.def index 3ced03f751..0f6cc74a06 100644 --- a/auto.def +++ b/auto.def @@ -207,9 +207,11 @@ if {"" ne $DUMP_DEFINES_JSON} { options [subst $flags] unset flags -# Apply values from hidden --flag aliases over to their canonical +# +# Carry values from hidden --flag aliases over to their canonical flag # forms. -foreach {hidden flag canonical} { +# +foreach {hidden => canonical} { with-readline-inc => with-readline-cflags with-readline-lib => with-readline-ldflags } { diff --git a/autosetup/hwaci-common.tcl b/autosetup/hwaci-common.tcl index 4c3c0585c8..bb9836f7dc 100644 --- a/autosetup/hwaci-common.tcl +++ b/autosetup/hwaci-common.tcl @@ -979,17 +979,23 @@ proc hwaci-dump-defs-json {file args} { ######################################################################## # Expects configure flags with the given names to have been registered # with autosetup. If [opt-val $hidden] has a value but [opt-val -# $canonical] does not, it copies the former over the latter. If both -# have explicit values a fatal usage error is triggered. +# $canonical] does not, it copies the former over the latter. If +# $hidden has no value set, this is a no-op. If both have explicit +# values a fatal usage error is triggered. # -# Autosetup accounts for hidden aliases in [options] lists but does no -# further handling of them, e.g. fetching [opt-val foo] will not, even -# if foo is an alias for bar, see a value passed in as --bar=baz. +# Motivation: autosetup accounts for hidden aliases in [options] lists +# but does no further handling of them. For example, when --foo is a +# hidden alias of the canonical flag --bar, and a user passes --foo=X, +# [opt-val bar] returns no value. i.e. the script must check both +# [opt-val foo] and [opt-val bar], despite them being aliases. The +# intent is that this function be passed each such mapping immediately +# after [options] is processed, to carry over any values from hidden +# aliases into their canonical names, so that in the above example +# [opt-value bar] will return X if --foo=X is passed in. proc hwaci-xfer-opt-alias {hidden canonical} { set x [opt-val $hidden "-9-9-9-"] if {"-9-9-9-" ne $x} { - set y [opt-val $canonical "-0-0-0-"] - if {"-0-0-0-" eq $y} { + if {"-0-0-0-" eq [opt-val $canonical "-0-0-0-"]} { hwaci-opt-set $canonical $x } else { hwaci-fatal "both --$canonical and its hidden alias --$hidden were used. Use only one or the other." diff --git a/manifest b/manifest index 5796e3c9c0..bab329676f 100644 --- a/manifest +++ b/manifest @@ -1,5 +1,5 @@ -C Rename\s--with-readline-lib/inc\sto\s--with-readline-ldflags/cflags,\sfor\sclarity,\sbut\sretain\sthe\solder\snames\sas\saliases\susing\sautosetup's\s"hidden\salias"\sfeature.\sRename\sthe\snewly-added\s--with-icu-lib\sto\s--with-icu-ldflags\s(with\sno\sbackwards\scompatibility). -D 2024-10-27T20:04:23.738 +C Doc\sadditions\sand\sminor\scleanups\sin\sthe\s--flag\salias\shandling. +D 2024-10-27T20:14:49.852 F .fossil-settings/empty-dirs dbb81e8fc0401ac46a1491ab34a7f2c7c0452f2f06b54ebb845d024ca8283ef1 F .fossil-settings/ignore-glob 35175cdfcf539b2318cb04a9901442804be81cd677d8b889fcc9149c21f239ea F LICENSE.md b6e6c1baf38e4339bd3f1e0e5e5bfd0a9a93d133360691b2785c2d4b2f2dcec2 @@ -13,7 +13,7 @@ F art/icon-80x90.gif 65509ce3e5f86a9cd64fe7fca2d23954199f31fe44c1e09e208c80fb83d F art/sqlite370.eps aa97a671332b432a54e1d74ff5e8775be34200c2 F art/sqlite370.ico af56c1d00fee7cd4753e8631ed60703ed0fc6e90 F art/sqlite370.jpg d512473dae7e378a67e28ff96a34da7cb331def2 -F auto.def 7f4a0a1421306ed8bca11d54b754f01dbf76054d17894c7c88fad0c05e2fadba +F auto.def a5cc3792cfe6e82561c810f5f6383186ee5ce73cdde4ca06b70f18252ec38f84 F autoconf/INSTALL 83e4a25da9fd053c7b3665eaaaf7919707915903 F autoconf/Makefile.am adedc1324b6a87fdd1265ddd336d2fb7d4f36a0e77b86ea553ae7cc4ea239347 F autoconf/Makefile.fallback 22fe523eb36dfce31e0f6349f782eb084e86a5620b2b0b4f84a2d6133f53f5ac @@ -47,7 +47,7 @@ F autosetup/cc-lib.tcl 493c5935b5dd3bf9bd4eca89b07c8b1b1a9356d61783035144e21795f F autosetup/cc-shared.tcl 4f024e94a47f427ba61de1739f6381ef0080210f9fae89112d5c1de1e5460d78 F autosetup/cc.tcl 7e2fe943ae9d45cf39e9f5b05b6230df8e719415edea5af06c30eb68680bde14 F autosetup/default.auto 5cdf016de2140e50f1db190a02039dc42fb390af1dda4cc4853e3042a9ef0e82 -F autosetup/hwaci-common.tcl 7839c061ae85648d1440ef95f75f4c1f18008458b7a3a81beaebeb7d2470a0dc +F autosetup/hwaci-common.tcl f8b683adc42ac4a9d1a950118f024b8b7d2b90460ee39c5a9a0feb8e7ad9d179 F autosetup/jimsh0.c 27ea5f221359ef6c58780fc6c185aadbf8d3bee9a021331a3e5de0eba0dc6de6 F autosetup/pkg-config.tcl 4e635bf39022ff65e0d5434339dd41503ea48fc53822c9c5bde88b02d3d952ba F autosetup/system.tcl 3a39d6e0b3bfba526fd39afe07c1d0d325e5a31925013a1ba7c671e1128e31bb @@ -2237,8 +2237,8 @@ F vsixtest/vsixtest.tcl 6195aba1f12a5e10efc2b8c0009532167be5e301abe5b31385638080 F vsixtest/vsixtest.vcxproj.data 2ed517e100c66dc455b492e1a33350c1b20fbcdc F vsixtest/vsixtest.vcxproj.filters 37e51ffedcdb064aad6ff33b6148725226cd608e F vsixtest/vsixtest_TemporaryKey.pfx e5b1b036facdb453873e7084e1cae9102ccc67a0 -P abec913c00564ee5453075f45b1a6680e92ee1b1e61e3b19e4cf74e46785d3bf -R 8c93632539b57f8beda5bb3056f97174 +P e50a03f9f2a40a5e65f874ffff234a7b397ce4ebdc7b360d4e6ade7575577c38 +R 689f8e7c0b273a0d5f61c39635b6551a U stephan -Z 46a44527cb166d23de983b40142b0922 +Z 9c99ac6705fb06550102fd68e4fd933c # Remove this line to create a well-formed Fossil manifest. diff --git a/manifest.uuid b/manifest.uuid index c1c05dc35c..d17d4d17dd 100644 --- a/manifest.uuid +++ b/manifest.uuid @@ -1 +1 @@ -e50a03f9f2a40a5e65f874ffff234a7b397ce4ebdc7b360d4e6ade7575577c38 +37a1da038195365cd7eb866b3aa749ad8060a656ac38063520fdb70cf0a0e5f1