Skip to content

Commit

Permalink
kconfig: qconf: use if_changed for qconf.moc rule
Browse files Browse the repository at this point in the history
Regenerate qconf.moc when the moc command is changed.

This also allows 'make mrproper' to clean it up. Previously, it was
not cleaned up because 'clean-files += qconf.moc' was missing.
Now 'make mrproper' correctly cleans it up because files listed in
'targets' are cleaned.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
  • Loading branch information
Masahiro Yamada committed Aug 1, 2020
1 parent 6020db5 commit c3cd7cf
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions scripts/kconfig/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -192,8 +192,10 @@ $(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc
quiet_cmd_moc = MOC $@
cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@

$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg
$(call cmd,moc)
$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg FORCE
$(call if_changed,moc)

targets += qconf.moc

# gconf: Used for the gconfig target based on GTK+
hostprogs += gconf
Expand Down

0 comments on commit c3cd7cf

Please sign in to comment.