I must be having a bad brain day as I'm having what would normally be a pretty
simple issue to resolve.
I'm setting a target specific variable and then in that target I do a check to
see if it is non-empty but the check always fails.
The variable is set like this: in a sub-module makefile.
$(local_lib) : RENPREFIX := device
The $(local_lib) target is defined like this:
$(local_lib): $(local_objs)
@echo linking library $@ $(ARFLAGS)
ifneq (,$(RENPREFIX))
@echo RENPREFIX for $@ = "$(RENPREFIX)"
$(foreach lobj,$^,$(renobj))
endif
@$(AR) $(ARFLAGS) $(OUT)$@ $^
@$(MD) output/$(OS)/sharedlibs
$(CP) $@ output/$(OS)/sharedlibs
Here is where the problem is the ifneq test never works like I expect, however
if I use this test: $(if $(RENPREFIX),$(foreach lobj,$^,$(renobj))) then
everything works like I expect. So what am I doing wrong? I suppose it
doesn't matter since $(if...) is working but I'd really like to figure out why
the first method didn't.
If it matters renobj is: renobj = $(shell $(RENOBJ) $(OBJCOPY) $(lobj)
$(RENPREFIX))
Thanks,
raleigh
_______________________________________________
Help-make mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/help-make