Failure to expand macro

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Failure to expand macro

David Highley
Using make version 4.0.4 current version in cygwin version 1.7.31. We
have on make process that works with make 4.0 on Linux.

The make log provides:
cd ../CommonCode/src && "make"
make[1]: Entering directory '/cygdrive/n/daveh/msi/CommonCode/src'
makefile:17: *** target pattern contains no '%'.  Stop.
make[1]: Leaving directory '/cygdrive/n/daveh/msi/CommonCode/src'
makefile:16: recipe for target 'common' failed
make: *** [common] Error 2

We are assuming that the object file list $(OBJS) is not expanding.
Relavent parts of make files:

- macros

LIBPATH                 = $(TOP)/lib/$(OBJDIR)
ifeq "$(LINK_TYPE)" "dll"
    LIBRARY             = $(LIBPATH)/$(LIB_PREFIX)$(PROJECT).$(LIB_SO)
else
    LIBRARY             = $(LIBPATH)/$(LIB_PREFIX)$(PROJECT).$(LIB_SUFFIX)
endif
COMMON_CODE_LIB         = -L$(LIBPATH) -lcommoncode
PROJECT                 = commoncode

# Build a list of each source file and its related object file.
# Guard the list building so we do not do it when we do not need it.
ObjDir                  = ../obj/$(OBJDIR)
.SRC                    = .cpp
ifneq "$(findstring clearmake,$(MAKE))" "clearmake"
ifneq "$(MAKECMDGOALS)" "docs"
ifneq "$(MAKECMDGOALS)" "web"
ifneq "$(MAKECMDGOALS)" "clean"
ifneq "$(MAKECMDGOALS)" "libclean"
ifneq "$(MAKECMDGOALS)" "distclean"
ifneq "$(MAKECMDGOALS)" "help"
ifeq "$(OS)" "Windows_NT"
WLOCDIR                 = $(shell $(ECHO) $(LOCDIR) | \
                          $(SED) -re 's|^(/cygdrive/)([a-zA-Z])(.*)|\2:\3|')
DIRS                    = .
DIRS                   += $(shell $(CMD) /c dir /B /S /A:D | \
                          $(SED) -e 's|\\|/|g' -e 's|^$(WLOCDIR)/||')
else
DIRS                    = $(shell $(FIND) . -type d -print 2>$(NULL) \
                          | $(SED) -e 's|^./||')
endif

EXTRA_INCS              = $(patsubst %,-I%,$(DIRS))- macros
SRCS                    = $(foreach DIR,$(DIRS),$(FIND_SRCS))
OBJS                    = $(patsubst %$(.SRC),$(ObjDir)/%.$(OBJ_EXT),$(SRCS))
DEPFILES                = $(patsubst %$(.SRC),$(ObjDir)/%.d,$(SRCS))
endif
endif
endif
endif
endif
endif
endif

- make rules where failure occurs

all: $(LIBRARY)

# Create archive library.
.NO_WINK_IN: $(LIBRARY)
$(LIBRARY): $(OBJS)       <- LINE FAILING, LINE 17 of makefile
         $(SET_E); $(MKDIR) $(LIBPATH); $(RM) $@; $(LINK)

_______________________________________________
Make-w32 mailing list
[hidden email]
https://lists.gnu.org/mailman/listinfo/make-w32