Skip to content

Commit

Permalink
Fix Makefile Verbosity level (#6307)
Browse files Browse the repository at this point in the history
#changelog #makefiles
  • Loading branch information
bakercp authored and arturoc committed Jun 7, 2019
1 parent e71fc74 commit a7564f2
Show file tree
Hide file tree
Showing 5 changed files with 35 additions and 20 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,9 @@ PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/app/ofAppGLFWWindow.c
PLATFORM_CORE_EXCLUSIONS += $(OF_LIBS_PATH)/openFrameworks/sound/ofFmodSoundPlayer.cpp

ifeq ($(CROSS_COMPILING),1)
$(info detected cross compiling $(CROSS_COMPILING))
ifdef MAKEFILE_DEBUG
$(info detected cross compiling $(CROSS_COMPILING))
endif
ifdef TOOLCHAIN_ROOT
#You have specified TOOLCHAIN_ROOT with an environment variable
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,7 @@ all:

$(OF_CORE_OBJ_OUTPUT_PATH).compiler_flags: force
@mkdir -p $(OF_CORE_OBJ_OUTPUT_PATH)
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))" != "$(strip $$(cat $@))" ]; then echo "Compiler flags have changed, recompiling"; echo "Old: $(strip $$(cat $@))"; echo "New $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))"; echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))> $@; fi
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))" != "$(strip $$(cat $@ 2>/dev/null))" ]; then echo "Compiler flags have changed, recompiling"; echo "Old: $(strip $$(cat $@ 2>/dev/null))"; echo "New $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))"; echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))> $@; fi


#This rule does the compilation
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,12 +202,12 @@ endif

$(OF_PROJECT_OBJ_OUTPUT_PATH).compiler_flags: force
@mkdir -p $(OF_PROJECT_OBJ_OUTPUT_PATH)
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(PROJECT_INCLUDE_CFLAGS) $(OPTIMIZATION_LDFLAGS) $(LDFLAGS))" != "$(strip $$(cat $@))" ]; then echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(PROJECT_INCLUDE_CFLAGS) $(OPTIMIZATION_LDFLAGS) $(LDFLAGS)) > $@; fi
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(PROJECT_INCLUDE_CFLAGS) $(OPTIMIZATION_LDFLAGS) $(LDFLAGS))" != "$(strip $$(cat $@ 2>/dev/null))" ]; then echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS) $(PROJECT_INCLUDE_CFLAGS) $(OPTIMIZATION_LDFLAGS) $(LDFLAGS)) > $@; fi

$(OF_ADDONS_PATH)/$(OF_PROJECT_OBJ_OUTPUT_PATH).compiler_flags: force
@mkdir -p $(OF_PROJECT_OBJ_OUTPUT_PATH)
@mkdir -p $(OF_ADDONS_PATH)/$(OF_PROJECT_OBJ_OUTPUT_PATH)
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))" != "$(strip $$(cat $@))" ]; then echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS)) > $@; fi
@if [ "$(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS))" != "$(strip $$(cat $@ 2>/dev/null))" ]; then echo $(strip $(OPTIMIZATION_CFLAGS) $(CFLAGS) $(CXXFLAGS)) > $@; fi

# Rules to compile the project sources
#$(OBJS): $(SOURCES)
Expand Down Expand Up @@ -438,7 +438,7 @@ after: $(TARGET_NAME)
@echo

copyaddonsdata:
@echo
@echo
@echo "Copying addons data"
@mkdir -p bin/data
@cp -rf $(PROJECT_ADDONS_DATA) bin/data/
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ ifndef GST_VERSION
ifeq ($(CROSS_COMPILING),1)
ifeq ($(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?),0)
GST_VERSION = 1.0
$(info GSTVERSION=$(GST_VERSION))
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
endif
else
GST_VERSION = 0.10
$(info GSTVERSION=$(GST_VERSION))
$(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?))
ifdef MAKEFILE_DEBUG
$(info GSTVERSION=$(GST_VERSION))
$(info $(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR);pkg-config gstreamer-1.0 --exists; echo $$?))
endif
endif
else
ifeq ($(shell pkg-config gstreamer-1.0 --exists; echo $$?),0)
Expand Down
33 changes: 21 additions & 12 deletions libs/openFrameworksCompiled/project/makefileCommon/config.shared.mk
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,10 @@ endif
PLATFORM_OS ?= $(shell uname -s)

HOST_OS=$(shell uname -s)
$(info HOST_OS=${HOST_OS})

ifdef MAKEFILE_DEBUG
$(info HOST_OS=${HOST_OS})
endif

ifneq (,$(findstring MSYS_NT,$(HOST_OS)))
FIND=/usr/bin/find
Expand Down Expand Up @@ -65,13 +68,15 @@ else
endif
endif

#$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
#$(info PLATFORM_OS=$(PLATFORM_OS))
#$(info HOST_ARCH=$(HOST_ARCH))
#$(info HOST_OS=$(HOST_OS))
#$(info CROSS_COMPILING=$(CROSS_COMPILING))
#$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
#$(info IS_RASPBIAN=$(IS_RASPBIAN))
ifdef MAKEFILE_DEBUG
$(info PLATFORM_ARCH=$(PLATFORM_ARCH))
$(info PLATFORM_OS=$(PLATFORM_OS))
$(info HOST_ARCH=$(HOST_ARCH))
$(info HOST_OS=$(HOST_OS))
$(info CROSS_COMPILING=$(CROSS_COMPILING))
$(info PLATFORM_VARIANT=$(PLATFORM_VARIANT))
$(info IS_RASPBIAN=$(IS_RASPBIAN))
endif

# if not defined, construct the default PLATFORM_LIB_SUBPATH
ifndef PLATFORM_LIB_SUBPATH
Expand Down Expand Up @@ -284,12 +289,16 @@ CORE_PKG_CONFIG_LIBRARIES += $(PROJECT_PKG_CONFIG_LIBRARIES)

ifneq ($(strip $(CORE_PKG_CONFIG_LIBRARIES)),)
ifneq ($(strip $(PKG_CONFIG_LIBDIR)),)
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
ifdef MAKEFILE_DEBUG
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
endif
FAILED_PKG=$(shell export PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR); for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0)
else
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
ifdef MAKEFILE_DEBUG
$(info checking pkg-config libraries: $(CORE_PKG_CONFIG_LIBRARIES))
$(info with PKG_CONFIG_LIBDIR=$(PKG_CONFIG_LIBDIR))
endif
FAILED_PKG=$(shell for pkg in $(CORE_PKG_CONFIG_LIBRARIES); do $(PLATFORM_PKG_CONFIG) $$pkg --cflags > /dev/null; if [ $$? -ne 0 ]; then echo $$pkg; return; fi; done; echo 0)
endif
ifneq ($(FAILED_PKG),0)
Expand Down

0 comments on commit a7564f2

Please sign in to comment.