* [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
* [Buildroot] possibly silly question about top-level Makefile
2015-04-16 21:57 [Buildroot] possibly silly question about top-level Makefile Robert P. J. Day
@ 2015-04-16 22:09 ` Arnout Vandecappelle
0 siblings, 0 replies; 2+ messages in thread
From: Arnout Vandecappelle @ 2015-04-16 22:09 UTC (permalink / raw)
To: buildroot
On 16/04/15 23:57, Robert P. J. Day wrote:
>
[snip]
> 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?
Good catch!
Patch follows.
Regards,
Arnout
--
Arnout Vandecappelle arnout at mind be
Senior Embedded Software Architect +32-16-286500
Essensium/Mind http://www.mind.be
G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven
LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle
GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
^ 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