Changeset 04a608b


Ignore:
Timestamp:
11/17/2023 02:57:55 PM (6 months ago)
Author:
Pierre Labastie <pierre.labastie@…>
Branches:
ablfs-more, trunk
Children:
924076f
Parents:
a9360e1
Message:

Pass NINJAJOBS if N_PARALLEL is defined

Now that MAKEFLAGS is defined at the beginning of the scriptlet,
there is no need to pass MAKEFLAGS as an envar to the scriptlet.
But still NINJAJOBS is not defined. In most cases, when we want
to use all cores, this is not a problem. But if N_PARALLEL is
defined, it needs to be passed. Note that we also pass
MAKEFLAGS in this case, because we use the old "wrt_xxx" function,
but it is not used.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • LFS/master.sh

    ra9360e1 r04a608b  
    132132          *)  wrt_optimize "$name" ;;
    133133      esac
    134       # MAKEFLAGS is set even if no optimization now.
    135       # For new books, the scripts contain the MAKEFLAGS, so no
    136       # need to set them in the envars except if binutils-pass1
    137       # and REALSBU=y. For Old books, N_PARALLEL and JH_MAKEFLAGS
    138       # are set and we must set the envars.
    139       case "${mkf_included}${this_script}${REALSBU}" in
    140           *binutils-pass1y)
    141               wrt_makeflags "$name" "-j1" "1" ;;
    142           n*)
    143               wrt_makeflags "$name" "$JH_MAKEFLAGS" "$N_PARALLEL" ;;
    144       esac
    145     fi
     134      # There is no need to tweak MAKEFLAGS anymore, this is done
     135      # by lfs.xsl. But still, NINJAJOBS needs to be set if
     136      # N_PARALLEL is defined.
     137      if [ -n "N_PARALLEL" ]; then
     138         wrt_makeflags "$name" "$JH_MAKEFLAGS" "$N_PARALLEL"
     139      fi
     140    fi # end of package specific instructions
    146141
    147142# Some scriptlet have a special treatment; otherwise standard
     
    260255#  echo nb_chaps: $nb_chaps
    261256# end DEBUG
    262 
    263   # We need to know if we have an old or a new book (with included MAKEFLAGS)
    264   # we grep for MAKEFLAGS in chapter04 to find out.
    265   if grep -q MAKEFLAGS chapter04/*; then
    266           mkf_included=y
    267   else
    268           mkf_included=n
    269   fi
    270257
    271258  # Make a temporary file with all script targets
Note: See TracChangeset for help on using the changeset viewer.