OpenAFS Master Repository branch, master, updated. openafs-devel-1_9_2-153-g3440c96

Gerrit Code Review gerrit@openafs.org
Mon, 24 Feb 2025 13:44:26 -0500


The following commit has been merged in the master branch:
commit 3440c963f1f259964522741b44a2953e4b9054ee
Author: Andrew Deason <adeason@sinenomine.net>
Date:   Mon Feb 3 16:57:33 2025 -0600

    DARWIN: Refactor CRULE_* and OBJ_* vars
    
    The current vars for CRULE_NOOPT_$arch, CRULE_OPT_$arch, and OBJ_$arch
    have become unwieldy, consisting of a lot of embedded shell commands and
    repeated logic. Make the following changes:
    
    - Instead of these vars involving a $(shell) command to check if they
      are relevant, set each var inside of an ifeq(). That way, it's easier
      to see what the two possible values can be for each var.
    
    - For OBJ_$arch, set each var to be empty if that arch is not active,
      and to the object file if is active. That way, we can just expand all
      OBJ_$arch vars to get all object files, instead of needing to check if
      each arch is active.
    
    - For CRULE_NOOPT_$arch and CRULE_OPT_$arch, make the value default to
      ':', so we can expand the var unconditionally in a chain of '&&'d
      commands. That way, if the arch is not active, the command will be
      replaced by ': foo.c', which will be ignored by the shell and return
      success.
    
    - Change CRULE_NOOPT_$arch and CRULE_OPT_$arch to split out all common
      args into CRULE_NOOPT_common et al, leaving just the per-arch args in
      the per-arch vars.
    
    - Define CRULE_OPT_common in terms of CRULE_NOOPT_common (instead of
      repeating args), since the only difference between them is the use of
      KERN_OPTMZ.
    
    - In CRULE_NOOPT_$arch et al, get rid of the patsubst for the output
      file; this must be the same thing as OBJ_$arch, so just use that.
    
    - Remove the ALL_COMMON_INCLUDES var; just include '$(KINCLUDES)
      $(COMMON_INCLUDE)' directly in the relevant CFLAGS.
    
    - Remove the CFLAGS_$arch vars; they were all the same except for
      KOPTS_$arch. So just split out the common CFLAGS into CFLAGS_common,
      and include CFLAGS_$arch in the relevant per-arch vars.
    
    - Change the command trailing our 'lipo' commands from 'true' to ':',
      just to be more idiomatic for "a command that ignores its arguments".
    
    - Add a comment explaining why our 'lipo' command are followed by a ':'
      (and why our default CRULE_*'s are ':').
    
    Change-Id: Ia1adf222705b8368851b3d19e4e0a4fe54488c72
    Reviewed-on: https://gerrit.openafs.org/16213
    Tested-by: BuildBot <buildbot@rampaginggeek.com>
    Reviewed-by: Cheyenne Wills <cwills@sinenomine.net>
    Reviewed-by: Marcio Brito Barbosa <mbarbosa@sinenomine.net>
    Reviewed-by: Michael Meffie <mmeffie@sinenomine.net>
    Reviewed-by: Andrew Deason <adeason@sinenomine.net>

 src/libafs/MakefileProto.DARWIN.in | 89 ++++++++++++++++++++++++++++----------
 1 file changed, 65 insertions(+), 24 deletions(-)

-- 
OpenAFS Master Repository