build: Add DEP_LIBS dependency directly to the shared library build rule.
authorDiego Biurrun <diego@biurrun.de>
Sat, 25 Jun 2011 00:01:12 +0000 (02:01 +0200)
committerDiego Biurrun <diego@biurrun.de>
Sat, 25 Jun 2011 11:02:51 +0000 (13:02 +0200)
The dependency was added conditional to a variable that is always defined,
so it is safe to add it directly.

subdir.mak

index 6339860..e4d7377 100644 (file)
@@ -39,15 +39,11 @@ $(SUBDIR)%$(EXESUF): $(SUBDIR)%.o
 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
        $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
 
 $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR)
        $(Q)cd ./$(SUBDIR) && $(LN_S) $(SLIBNAME_WITH_MAJOR) $(SLIBNAME)
 
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver
+$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SUBDIR)lib$(NAME).ver $(DEP_LIBS)
        $(SLIB_CREATE_DEF_CMD)
        $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
 
        $(SLIB_CREATE_DEF_CMD)
        $$(LD) $(SHFLAGS) $(FFLDFLAGS) -o $$@ $$(filter %.o,$$^) $(FFEXTRALIBS) $(EXTRAOBJS)
        $(SLIB_EXTRA_CMD)
 
-ifdef SUBDIR
-$(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(DEP_LIBS)
-endif
-
 clean::
        $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
            $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \
 clean::
        $(RM) $(addprefix $(SUBDIR),*-example$(EXESUF) *-test$(EXESUF) $(CLEANFILES) $(CLEANSUFFIXES) $(LIBSUFFIXES)) \
            $(foreach dir,$(DIRS),$(CLEANSUFFIXES:%=$(SUBDIR)$(dir)/%)) \