Skip to contentSkip to conversation

mk: fix dependencies when modifying config

PATCH In review Thomas Monjalon 2 participants 3 messages Mar 19, 2014 – Mar 26, 2014 2 messages not in the archive

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 mk: fix dependencies when modifying config

If .config file is changed and .depdirs was built before, it must be updated.
It is now done silently (-s) in checkconfig rule. Now .depdirs is not redone if .config is older.

It has been tested by enabling PMD_PCAP after a default build. KVARGS dependency should appear in .depdirs.

---
 mk/rte.sdkconfig.mk  | 1 +
 mk/rte.sdkdepdirs.mk | 3 ++-
 2 files changed, 3 insertions(+), 1 deletion(-)
mk/rte.sdkconfig.mk +1 -0
index 3d05ba5..b4e45f2 100644
@@ -114,6 +114,7 @@ checkconfig:
 	fi
 	$(Q)$(MAKE) -f $(RTE_SDK)/mk/rte.sdkconfig.mk \
 		headerconfig NODOTCONF=1
+	$(Q)$(MAKE) -s depdirs
 
 .PHONY: FORCE
 FORCE:
mk/rte.sdkdepdirs.mk +2 -1
index 03dbdb1..bd3bac4 100644
@@ -39,7 +39,8 @@ endif
 # use a "for" in a shell to process dependencies: we don't want this
 # task to be run in parallel.
 ..PHONY: depdirs
-depdirs:
+depdirs: $(RTE_OUTPUT)/.depdirs
+$(RTE_OUTPUT)/.depdirs: $(RTE_OUTPUT)/.config
 	@rm -f $(RTE_OUTPUT)/.depdirs ; \
 	for d in $(ROOTDIRS-y); do \
 		if [ -f $(RTE_SRCDIR)/$$d/Makefile ]; then \
Signature · 1 line
1.9.0

A message that is not in the archive (sent off-list or not yet received): 1395228982-24858-1-git-send-email-thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw

Hi Thomas,

Quoted 10 lines · Thomas Monjalon

If .config file is changed and .depdirs was built before, it must be updated.
It is now done silently (-s) in checkconfig rule. Now .depdirs is not redone if .config is older.

It has been tested by enabling PMD_PCAP after a default build. KVARGS dependency should appear in .depdirs.

---

Looks good to me. Just see one comment below.

Quoted 3 lines
  # use a "for" in a shell to process dependencies: we don't want this
  # task to be run in parallel.
  ..PHONY: depdirs

It seems there is a typo (..PHONY instead of .PHONY), it could be a good occasion to fix it. In my opinion, it can be done in the same patch as this typo does not create a real issue.

Regards,
Olivier

A message that is not in the archive (sent off-list or not yet received): [email protected]

#4 lore raw

2014-03-26 17:08, Olivier MATZ:

Quoted 11 lines · Thomas Monjalon
Quoted 9 lines

If .config file is changed and .depdirs was built before, it must be updated.
It is now done silently (-s) in checkconfig rule. Now .depdirs is not redone if .config is older.

It has been tested by enabling PMD_PCAP after a default build. KVARGS dependency should appear in .depdirs.

Quoted 7 lines

Looks good to me. Just see one comment below.

Quoted 1 line

..PHONY: depdirs

It seems there is a typo (..PHONY instead of .PHONY), it could be a good occasion to fix it. In my opinion, it can be done in the same patch as this typo does not create a real issue.

Applied with the typo fix.

Thanks for the review

Signature · 1 line
Thomas