Skip to content

Commit

Permalink
Merge branch 'jb52244' into 'master'
Browse files Browse the repository at this point in the history
[sb2] Fix make depency graph resolving. Fixes JB#52244

See merge request mer-core/scratchbox2!44
  • Loading branch information
Thaodan committed Dec 18, 2020
2 parents d93761c + b9cd834 commit 70f32cc
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 10 deletions.
10 changes: 1 addition & 9 deletions scratchbox2/llbuild/Makefile.include
Expand Up @@ -44,6 +44,7 @@ define import_dir
objects :=
objects-y :=
D := $(1)
$(shell -p mkdir $(1))
include $(1)/Makefile
dep_files := $$(wildcard $(1)/.*.d)
include $(dep_files)
Expand All @@ -59,7 +60,6 @@ $(foreach dir,$(subdirs),$(eval $(call import_dir,$(dir))))

all_objects += $(foreach t,$(extra_targets),$($(t)))

MKOUTPUTDIR = @mkdir -p $(dir $@)

ifdef V
Q =
Expand All @@ -70,42 +70,34 @@ Q = @
endif

%.dylib:
$(MKOUTPUTDIR)
$(P)DYLIB
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -dynamiclib -o $@ $^ $(LIBS)

%.so::
$(MKOUTPUTDIR)
$(P)SHLIB
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -shared -o $@ $^ $(LIBS)

%.a::
$(MKOUTPUTDIR)
$(P)ARCHIVE
$(Q)$(CC) $(LDFLAGS) -r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^

built-in.o:: %.o
$(MKOUTPUTDIR)
$(P)BUILTIN
$(Q)$(CC) -r -nostdlib -nodefaultlibs -nostartfiles -o $@ $^

%.o:: %.S
$(MKOUTPUTDIR)
$(P)AS
$(Q)$(CC) $(CFLAGS) -D__ASSEMBLY__ -Wp,-MT,$@ -Wp,-MMD,$(dir $@).$(notdir $@).d -o $@ -c $<

%.o:: %.c
$(MKOUTPUTDIR)
$(P)CC
$(Q)$(CC) $(CFLAGS) -Wp,-MT,$@ -Wp,-MMD,$(dir $@).$(notdir $@).d -o $@ -c $<

%.o:: %.cc
$(MKOUTPUTDIR)
$(P)CXX
$(Q)$(CXX) $(CFLAGS) $(CXXFLAGS) -Wp,-MT,$@ -Wp,-MMD,$(dir $@)/.$(notdir $@).d -o $@ -c $<

%.o:: %.cpp
$(MKOUTPUTDIR)
$(P)CXX
$(Q)$(CXX) $(CFLAGS) $(CXXFLAGS) -Wp,-MT,$@ -Wp,-MMD,$(dir $@)/.$(notdir $@).d -o $@ -c $<

Expand Down
2 changes: 1 addition & 1 deletion scratchbox2/utils/Makefile
Expand Up @@ -18,7 +18,7 @@ $(D)/sb2-ruletree: CFLAGS := $(CFLAGS) -Wall -W $(WERROR) \
-I$(SRCDIR)/include

$(D)/sb2-ruletree.o: preload/exported.h
$(D)/sb2-ruletree: $(D)/sb2-ruletree.o $(D)/../rule_tree/rule_tree.o
$(D)/sb2-ruletree: $(D)/sb2-ruletree.o rule_tree/rule_tree.o
$(MKOUTPUTDIR)
$(P)LD
$(Q)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -ldl
Expand Down

0 comments on commit 70f32cc

Please sign in to comment.