Skip to content

Commit

Permalink
Makefile.include: fix missing target for libraries
Browse files Browse the repository at this point in the history
Unittests add libraries in 'BASELIBS' which do not have any rules to be built as
they are built by 'application.inc.mk', packages and the DIRS variable.
So make complains about missing target for the unittests archives.

The fix tells these files are generated when building '$(APPLICATION_MODULE).a'.

The bug was introduced by RIOT-OS#8844

Fixes RIOT-OS#8910
  • Loading branch information
cladmi authored and maxvankessel committed Apr 20, 2018
1 parent 273898b commit a3494fa
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Makefile.include
Original file line number Diff line number Diff line change
Expand Up @@ -352,11 +352,14 @@ endif # RIOTNOLINK
$(ELFFILE): $(BASELIBS)
$(Q)$(_LINK) -o $@

# All modules are built by application.inc.mk makefile
$(BINDIR)/$(APPLICATION_MODULE).a: $(RIOTBUILD_CONFIG_HEADER_C) $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS)
$(Q)DIRS="$(DIRS)" "$(MAKE)" -C $(APPDIR) -f $(RIOTMAKE)/application.inc.mk
$(BINDIR)/$(APPLICATION_MODULE).a: FORCE

# Other modules are built by application.inc.mk and packages building
_SUBMAKE_LIBS = $(filter-out $(BINDIR)/$(APPLICATION_MODULE).a $(USEPKG:%=$(BINDIR)/%.a) $(APPDEPS), $(BASELIBS))
$(_SUBMAKE_LIBS): $(BINDIR)/$(APPLICATION_MODULE).a $(USEPKG:%=$(BINDIR)/%.a)

# 'print-size' triggers a rebuild. Use 'info-buildsize' if you do not need to rebuild.
print-size: $(ELFFILE)
$(Q)$(SIZE) $<
Expand Down

0 comments on commit a3494fa

Please sign in to comment.