Merge pull request #329 from sej7278/master

Added search of PLATFORM_LIB_NAMES to ARDUINO_LIBS
This commit is contained in:
Sudar Muthu 2015-03-25 17:42:19 +05:30
commit 43e5f03746
2 changed files with 11 additions and 4 deletions

View file

@ -814,6 +814,8 @@ ifndef ARDUINO_LIBS
$(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS))) $(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
ARDUINO_LIBS += $(filter $(notdir $(wildcard $(USER_LIB_PATH)/*)), \ ARDUINO_LIBS += $(filter $(notdir $(wildcard $(USER_LIB_PATH)/*)), \
$(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS))) $(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
ARDUINO_LIBS += $(filter $(notdir $(wildcard $(ARDUINO_PLATFORM_LIB_PATH)/*)), \
$(shell sed -ne 's/^ *\# *include *[<\"]\(.*\)\.h[>\"]/\1/p' $(LOCAL_SRCS)))
endif endif
######################################################################## ########################################################################
@ -912,15 +914,15 @@ get_library_files = $(if $(and $(wildcard $(1)/src), $(wildcard $(1)/library.pr
$(wildcard $(1)/*.$(2) $(1)/utility/*.$(2))) $(wildcard $(1)/*.$(2) $(1)/utility/*.$(2)))
# General arguments # General arguments
USER_LIBS := $(wildcard $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS))) USER_LIBS := $(sort $(wildcard $(patsubst %,$(USER_LIB_PATH)/%,$(ARDUINO_LIBS))))
USER_LIB_NAMES := $(patsubst $(USER_LIB_PATH)/%,%,$(USER_LIBS)) USER_LIB_NAMES := $(patsubst $(USER_LIB_PATH)/%,%,$(USER_LIBS))
# Let user libraries override system ones. # Let user libraries override system ones.
SYS_LIBS := $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))) SYS_LIBS := $(sort $(wildcard $(patsubst %,$(ARDUINO_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))))
SYS_LIB_NAMES := $(patsubst $(ARDUINO_LIB_PATH)/%,%,$(SYS_LIBS)) SYS_LIB_NAMES := $(patsubst $(ARDUINO_LIB_PATH)/%,%,$(SYS_LIBS))
ifdef ARDUINO_PLATFORM_LIB_PATH ifdef ARDUINO_PLATFORM_LIB_PATH
PLATFORM_LIBS := $(wildcard $(patsubst %,$(ARDUINO_PLATFORM_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))) PLATFORM_LIBS := $(sort $(wildcard $(patsubst %,$(ARDUINO_PLATFORM_LIB_PATH)/%,$(filter-out $(USER_LIB_NAMES),$(ARDUINO_LIBS)))))
PLATFORM_LIB_NAMES := $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%,%,$(PLATFORM_LIBS)) PLATFORM_LIB_NAMES := $(patsubst $(ARDUINO_PLATFORM_LIB_PATH)/%,%,$(PLATFORM_LIBS))
endif endif
@ -1096,10 +1098,14 @@ ifneq (,$(strip $(USER_LIB_NAMES)))
$(foreach lib,$(USER_LIB_NAMES),$(call show_config_info, $(lib),[USER])) $(foreach lib,$(USER_LIB_NAMES),$(call show_config_info, $(lib),[USER]))
endif endif
ifneq (,$(strip $(SYS_LIB_NAMES) $(PLATFORM_LIB_NAMES))) ifneq (,$(strip $(SYS_LIB_NAMES)))
$(foreach lib,$(SYS_LIB_NAMES),$(call show_config_info, $(lib),[SYSTEM])) $(foreach lib,$(SYS_LIB_NAMES),$(call show_config_info, $(lib),[SYSTEM]))
endif endif
ifneq (,$(strip $(PLATFORM_LIB_NAMES)))
$(foreach lib,$(PLATFORM_LIB_NAMES),$(call show_config_info, $(lib),[PLATFORM]))
endif
# either calculate parent dir from arduino dir, or user-defined path # either calculate parent dir from arduino dir, or user-defined path
ifndef BOOTLOADER_PARENT ifndef BOOTLOADER_PARENT
BOOTLOADER_PARENT = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/bootloaders BOOTLOADER_PARENT = $(ARDUINO_DIR)/hardware/$(VENDOR)/$(ARCHITECTURE)/bootloaders

View file

@ -44,6 +44,7 @@ I tried to give credit whenever possible. If I have missed anyone, kindly add it
- Fix: Allow avrdude to erase the chip before programming during ispload (https://github.com/tchebb) - Fix: Allow avrdude to erase the chip before programming during ispload (https://github.com/tchebb)
- Fix: Fix speed regression. Thanks ladislas (Issue #280) (https://github.com/sej7278) - Fix: Fix speed regression. Thanks ladislas (Issue #280) (https://github.com/sej7278)
- Fix: Removed some double quotes that were breaking variable expansion. (https://github.com/sej7278) - Fix: Removed some double quotes that were breaking variable expansion. (https://github.com/sej7278)
- Fix: Fixed PLATFORM_LIB support for 1.5+ and removed duplicate libs (https://github.com/sej7278)
### 1.3.4 (2014-07-12) ### 1.3.4 (2014-07-12)
- Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav) - Tweak: Allow spaces in "Serial.begin (....)". (Issue #190) (https://github.com/pdav)