make-3.80 does not have $(lastword ...). Fix this when ct-ng calls itself: don't try to be smart, we just _know_ where ct-ng is at configure time!
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Tue Sep 11 17:14:28 2007 +0000 (2007-09-11)
changeset 372f635b165bf18
parent 371 29c6c5e10cea
child 373 34612b693dde
make-3.80 does not have $(lastword ...). Fix this when ct-ng calls itself: don't try to be smart, we just _know_ where ct-ng is at configure time!
Fis a latent bug in handling the number parallel jobs.
ct-ng.in
     1.1 --- a/ct-ng.in	Sat Sep 08 19:00:45 2007 +0000
     1.2 +++ b/ct-ng.in	Tue Sep 11 17:14:28 2007 +0000
     1.3 @@ -5,9 +5,9 @@
     1.4  # Don't print directory as we descend into them
     1.5  MAKEFLAGS += --no-print-directory --no-builtin-rules
     1.6  
     1.7 -# Remember the name of the Makefile
     1.8 -CT_MAKEFILE := $(lastword $(MAKEFILE_LIST))
     1.9 -CT_NG := $(CT_MAKEFILE)
    1.10 +# This is where ct-ng is.
    1.11 +# Don't bother to change it other than with a new ./configure!
    1.12 +CT_NG:=@@CT_BINDIR@@/ct-ng
    1.13  
    1.14  export CT_TOP_DIR:=$(shell pwd)
    1.15  export CT_LIB_DIR:=@@CT_LIBDIR@@
    1.16 @@ -88,14 +88,10 @@
    1.17  	@false
    1.18  
    1.19  # Actual build
    1.20 -ifeq ($(CT_JOBS),)
    1.21 -CT_JOBS:=1
    1.22 -endif
    1.23 -export CT_JOBS
    1.24 -build:: .config
    1.25 +build: .config
    1.26  	@$(CT_LIB_DIR)/scripts/crosstool.sh
    1.27  
    1.28 -build.%::
    1.29 +build.%:
    1.30  	@$(CT_NG) $(shell echo "$(@)" |sed -r -e 's|^([^.]+)\.([[:digit:]]+)$$|\1 CT_JOBS=\2|;')
    1.31  
    1.32  PHONY += tarball