* [Buildroot] possibly silly question about top-level Makefile
@ 2015-04-16 21:57 Robert P. J. Day
2015-04-16 22:09 ` Arnout Vandecappelle
0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2015-04-16 21:57 UTC (permalink / raw)
To: buildroot
never worried about embarrassing myself, i was perusing the
top-level Makefile to see how some of the targets are processed and
noticed the following.
if i start with a fresh checkout, and do:
$ make beaglebone_defconfig
i see the rule that kicks in (well, at least the first one for that
pattern):
%_defconfig: $(BUILD_DIR)/buildroot-config/conf $(TOPDIR)/configs/%_defconfig outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) BR2_DEFCONFIG=$(TOPDIR)/configs/$@ \
$< --defconfig=$(TOPDIR)/configs/$@ $(CONFIG_CONFIG_IN)
what i don't understand is the purpose of that "mkdir" command in the
rule.
see, the first dependency of that rule is
$(BUILD_DIR)/buildroot-config/conf, and the rule to process that would
*seem* to be:
$(BUILD_DIR)/buildroot-config/%onf:
mkdir -p $(@D)/lxdialog
PKG_CONFIG_PATH="$(HOST_PKG_CONFIG_PATH)" $(MAKE) CC="$(HOSTCC_NOCCACHE)" HOSTCC="$(HOSTCC_NOCCACHE)" \
obj=$(@D) -C $(CONFIG) -f Makefile.br $(@F)
where you can see that the first command in *that* rule is to create
the required directory $(BUILD_DIR)/buildroot-config/, no? so once
that dependency has been satisfied, the directory
$(BUILD_DIR)/buildroot-config should now exist, right? so i don't see
the point of *explicitly* doing a mkdir command in that first rule.
in fact, if you look@the collection of rules:
xconfig: $(BUILD_DIR)/buildroot-config/qconf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
gconfig: $(BUILD_DIR)/buildroot-config/gconf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) srctree=$(TOPDIR) $< $(CONFIG_CONFIG_IN)
menuconfig: $(BUILD_DIR)/buildroot-config/mconf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
nconfig: $(BUILD_DIR)/buildroot-config/nconf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
config: $(BUILD_DIR)/buildroot-config/conf outputmakefile
@mkdir -p $(BUILD_DIR)/buildroot-config
@$(COMMON_CONFIG_ENV) $< $(CONFIG_CONFIG_IN)
isn't the "mkdir" command in *all* of those redundant?
rday
--
========================================================================
Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca
Twitter: http://twitter.com/rpjday
LinkedIn: http://ca.linkedin.com/in/rpjday
========================================================================
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-04-16 22:09 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-04-16 21:57 [Buildroot] possibly silly question about top-level Makefile Robert P. J. Day
2015-04-16 22:09 ` Arnout Vandecappelle
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox