Previously, ld had to be called, because the static libfirm might have
been updated.
Note the little hack, which apparently makes GNU Make re-evaluated the
Makefile, whenever the phony libfirm_subdir goal has been executed:
> Makefile: libfirm_subdir
all: $(GOAL)
-.PHONY: all bootstrap bootstrap2 bootstrape clean selfcheck splint $(FIRM_HOME)/$(LIBFIRM_FILE)
+.PHONY: all bootstrap bootstrap2 bootstrape clean selfcheck splint libfirm_subdir
-include $(DEPENDS)
DIRS := $(sort $(dir $(OBJECTS)))
UNUSED := $(shell mkdir -p $(DIRS) $(DIRS:$(BUILDDIR)/%=$(BUILDDIR)/cpb/%) $(DIRS:$(BUILDDIR)/%=$(BUILDDIR)/cpb2/%) $(DIRS:$(BUILDDIR)/%=$(BUILDDIR)/cpbe/%))
-$(FIRM_HOME)/$(LIBFIRM_FILE):
+# Build libFirm in subdirectory
+$(FIRM_HOME)/$(LIBFIRM_FILE): libfirm_subdir
+## Re-evaluate Makefile after libfirm_subdir has been executed
+Makefile: libfirm_subdir
+libfirm_subdir:
ifeq "$(wildcard $(FIRM_HOME) )" ""
@echo 'Download and extract libfirm tarball ...'
$(Q)curl -s -L "${FIRM_URL}" -o "libfirm-$(FIRM_VERSION).tar.bz2"