Skip to content

Commit

Permalink
build: Only check dependencies on 'make deps'
Browse files Browse the repository at this point in the history
Having the phony deps targets as dependencies of objects causes them to
be rebuilt regardless of whether the source changed.
  • Loading branch information
paulburton committed Jul 31, 2012
1 parent 2713b18 commit 4670001
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion fitbitd/Makefile
Expand Up @@ -29,7 +29,7 @@ fitbitd_ldflags := \

fitbitd_objects := $(addprefix $(DIR_LOCAL_OBJ)/,$(patsubst %.c,%.o,$(fitbitd_src)))
fitbitd_target := $(DIR_LOCAL_OBJ)/fitbitd
fitbitd_deps := fitbitd-pkgconfig-deps
fitbitd_deps :=

ifeq ($(STATIC_LIBFITBIT),1)
fitbitd_deps += \
Expand Down
2 changes: 1 addition & 1 deletion indicator/Makefile
Expand Up @@ -34,7 +34,7 @@ $(indicator_target): $(indicator_objects) $(libfitbitdcontrol_a_target)
@mkdir -p $(dir $@)
$(CC) $(indicator_cflags) $(CFLAGS) -o "$@" $(indicator_objects) $(indicator_ldflags)

$(indicator_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@)) indicator-pkgconfig-deps
$(indicator_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@))
@mkdir -p $(dir $@)
$(CC) $(indicator_cflags) $(CFLAGS) -o "$@" -c "$<"

Expand Down
4 changes: 2 additions & 2 deletions libant/Makefile
Expand Up @@ -33,15 +33,15 @@ $(libant_a_target): $(libant_a_objects)
@mkdir -p $(dir $@)
$(AR) rcs "$@" $(libant_a_objects)

$(libant_a_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@)) libant-pkgconfig-deps
$(libant_a_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@))
@mkdir -p $(dir $@)
$(CC) $(libant_cflags_static) $(CFLAGS) -o "$@" -c "$<"

$(libant_so_target): $(libant_so_objects)
@mkdir -p $(dir $@)
$(CC) -shared $(libant_cflags_shared) $(CFLAGS) $(libant_ldflags) -o "$@" $(libant_so_objects)

$(libant_so_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@)) libant-pkgconfig-deps
$(libant_so_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@))
@mkdir -p $(dir $@)
$(CC) $(libant_cflags_shared) $(CFLAGS) -o "$@" -c "$<"

Expand Down
2 changes: 1 addition & 1 deletion libfitbitdcontrol/Makefile
Expand Up @@ -19,7 +19,7 @@ $(libfitbitdcontrol_a_target): $(libfitbitdcontrol_a_objects)
@mkdir -p $(dir $@)
$(AR) rcs "$@" $(libfitbitdcontrol_a_objects)

$(libfitbitdcontrol_a_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@)) libfitbitdcontrol-pkgconfig-deps
$(libfitbitdcontrol_a_objects): $(DIR_LOCAL)/$$(notdir $$(patsubst %.o,%.c,$$@))
@mkdir -p $(dir $@)
$(CC) $(libfitbitdcontrol_cflags) $(CFLAGS) -o "$@" -c "$<"

Expand Down

0 comments on commit 4670001

Please sign in to comment.