- don't check for toolchain-setting for make targets that don't need them
- we already depend on sed, so do away with tr. Avoids pulling in yet another dependency.
This commit is contained in:
parent
62f9856f54
commit
e5de38497a
4
Makefile
4
Makefile
@ -17,6 +17,8 @@ noconfig_targets := menuconfig config oldconfig randconfig hosttools \
|
|||||||
clean distclean help \
|
clean distclean help \
|
||||||
release tags
|
release tags
|
||||||
|
|
||||||
|
nocheck_targets := clean distclean help release tags
|
||||||
|
|
||||||
# the toplevel sourcedir
|
# the toplevel sourcedir
|
||||||
ifndef top_srcdir
|
ifndef top_srcdir
|
||||||
top_srcdir=$(CURDIR)
|
top_srcdir=$(CURDIR)
|
||||||
@ -56,7 +58,7 @@ else
|
|||||||
endif
|
endif
|
||||||
|
|
||||||
ifneq ($(strip $(HAVE_DOT_CONFIG)),y)
|
ifneq ($(strip $(HAVE_DOT_CONFIG)),y)
|
||||||
# pull in OS specific commands like cp, mkdir, etc. early
|
# pull in settings early
|
||||||
-include $(top_srcdir)/Rules.mak
|
-include $(top_srcdir)/Rules.mak
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
14
Rules.mak
14
Rules.mak
@ -56,6 +56,7 @@ LC_ALL:= C
|
|||||||
# especially from the command line, use this instead of CFLAGS directly.
|
# especially from the command line, use this instead of CFLAGS directly.
|
||||||
# For optimization overrides, it's better still to set OPTIMIZATION.
|
# For optimization overrides, it's better still to set OPTIMIZATION.
|
||||||
CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS)))
|
CFLAGS_EXTRA=$(subst ",, $(strip $(EXTRA_CFLAGS_OPTIONS)))
|
||||||
|
# be gentle to vi coloring.. ")
|
||||||
|
|
||||||
# To compile vs some other alternative libc, you may need to use/adjust
|
# To compile vs some other alternative libc, you may need to use/adjust
|
||||||
# the following lines to meet your needs...
|
# the following lines to meet your needs...
|
||||||
@ -114,6 +115,10 @@ check_cc=$(shell \
|
|||||||
rm -f conftest.c conftest.o; \
|
rm -f conftest.c conftest.o; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
ifeq ($(filter-out $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||||
|
check_cc:=
|
||||||
|
endif
|
||||||
|
|
||||||
# A not very robust macro to check for available ld flags
|
# A not very robust macro to check for available ld flags
|
||||||
ifeq ($(strip $(V)),2)
|
ifeq ($(strip $(V)),2)
|
||||||
VERBOSE_CHECK_LD=echo LD=\"$(1)\" check_ld $(2) >&2;
|
VERBOSE_CHECK_LD=echo LD=\"$(1)\" check_ld $(2) >&2;
|
||||||
@ -125,6 +130,10 @@ check_ld=$(shell \
|
|||||||
echo "-Wl,$(2)" ; \
|
echo "-Wl,$(2)" ; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
ifeq ($(filter-out $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||||
|
check_ld:=
|
||||||
|
endif
|
||||||
|
|
||||||
# A not very robust macro to check for available strip flags
|
# A not very robust macro to check for available strip flags
|
||||||
ifeq ($(strip $(V)),2)
|
ifeq ($(strip $(V)),2)
|
||||||
VERBOSE_CHECK_STRIP=echo STRIPCMD=\"$(1)\" check_strip $(2) >&2;
|
VERBOSE_CHECK_STRIP=echo STRIPCMD=\"$(1)\" check_strip $(2) >&2;
|
||||||
@ -139,6 +148,9 @@ check_strip=$(shell \
|
|||||||
rm -f conftest.c conftest.o > /dev/null 2>&1 ; \
|
rm -f conftest.c conftest.o > /dev/null 2>&1 ; \
|
||||||
fi)
|
fi)
|
||||||
|
|
||||||
|
ifeq ($(filter-out $(nocheck_targets),$(MAKECMDGOALS)),)
|
||||||
|
check_strip:=
|
||||||
|
endif
|
||||||
|
|
||||||
|
|
||||||
# Select the compiler needed to build binaries for your development system
|
# Select the compiler needed to build binaries for your development system
|
||||||
@ -410,7 +422,7 @@ do_link.h = @$(disp_link.h) ; $(cmd_link.h)
|
|||||||
do_ar = @$(disp_ar) ; $(cmd_ar)
|
do_ar = @$(disp_ar) ; $(cmd_ar)
|
||||||
do_elf2flt = @$(disp_elf2flt) ; $(cmd_elf2flt)
|
do_elf2flt = @$(disp_elf2flt) ; $(cmd_elf2flt)
|
||||||
|
|
||||||
uppercase = $(shell echo $1 | tr '[:lower:]' '[:upper:]')
|
uppercase = $(shell echo $1 | $(SED) -e "y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/")
|
||||||
%.a:
|
%.a:
|
||||||
@if test -z "$($(call uppercase,$*)_DIR)" ; then \
|
@if test -z "$($(call uppercase,$*)_DIR)" ; then \
|
||||||
echo "Invalid target $@" ; \
|
echo "Invalid target $@" ; \
|
||||||
|
Loading…
x
Reference in New Issue
Block a user