AnsweredAssumed Answered

How to use CW 10.6 with external Makefile and have it work?

Question asked by Bob Paddock on Feb 17, 2015
Latest reply on Feb 20, 2015 by Bob Paddock

I have jumped through all the hoops to get CW 10.6 to use my external Makefile, for KL25.  This Make project builds fine when CW is not evolved.

 

When I do 'build all' this is the result in the console:

 

mingw32-make[1]: *** [build_begin] Error 1

mingw32-make: *** [all] Error 2

 

Is it to much to ask for CW to actually tell me what the error might be? :-(

It is not listed under the 'error' tab either.

 

I expect it is shell related.

 

The environment variable MAKESHELL is properly set so that BASH is being found, yet CW is not dealing with shell lines.

 

#----------------------------------------------------------------------------
# Blank line in make output spew:
$(info )
#----------------------------------------------------------------------------

#----------------------------------------------------------------------------

# If there are strange erorrs about 'f not found' this indicates that
# the MS-DOS command shell is being found rather than BASH.  On
# MS-DOS/Windows set the environment variable MAKESHELL to point to
# the directory that contains BASH.

$(info SHELL     = '$(SHELL)')
$(info MAKESHELL = '$(MAKESHELL)')
$(info )
#----------------------------------------------------------------------------

 

Results in:

 

SHELL = 'sh.exe'

 

MAKESHELL = 'J:\Apps\BASH\bin'

 

I'm not sure if shell lines are not executing or their results go to oblivion.  Either way what CW is doing is broken:

 

For example:

 

GCCVERSION := $(shell echo `$(CC) -dumpversion`)

# ifeq "$(GCCVERSION)" "4.7.1"

#    CTUNING += -mstrict-X

# else

#    CTUNING += -morder1 -fno-split-wide-types -fno-inline-small-functions

#    CTUNING += --combine -fwhole-program

#    CDEFS   += -DPROGMEM_USE

# endif

$(info )

$(info Building Target: $(TARGET_DIR)/$(TARGET) with)

$(info $(CC) version: $(GCCVERSION))

 

$(GCCVERSION) is not being properly filled in when run from CW.

 

Is there any hope here or is CW a waste of time?

Outcomes