Commit 0e912c03 authored by Masahiro Yamada's avatar Masahiro Yamada

kconfig: qconf: compile moc object separately

Currently, qconf.moc is included from qconf.cc but they can be compiled
independently.

When you modify qconf.cc, qconf.moc does not need recompiling.

Rename qconf.moc to qconf-moc.cc, and split it out as an independent
compilation unit.
Signed-off-by: default avatarMasahiro Yamada <masahiroy@kernel.org>
parent c3cd7cfa
# SPDX-License-Identifier: GPL-2.0-only # SPDX-License-Identifier: GPL-2.0-only
*.moc /qconf-moc.cc
*conf-cfg *conf-cfg
# #
......
...@@ -181,21 +181,22 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg ...@@ -181,21 +181,22 @@ $(addprefix $(obj)/, mconf.o $(lxdialog)): $(obj)/mconf-cfg
# qconf: Used for the xconfig target based on Qt # qconf: Used for the xconfig target based on Qt
hostprogs += qconf hostprogs += qconf
qconf-cxxobjs := qconf.o qconf-cxxobjs := qconf.o qconf-moc.o
qconf-objs := images.o $(common-objs) qconf-objs := images.o $(common-objs)
HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs) HOSTLDLIBS_qconf = $(shell . $(obj)/qconf-cfg && echo $$libs)
HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags) HOSTCXXFLAGS_qconf.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
HOSTCXXFLAGS_qconf-moc.o = $(shell . $(obj)/qconf-cfg && echo $$cflags)
$(obj)/qconf.o: $(obj)/qconf-cfg $(obj)/qconf.moc $(obj)/qconf.o: $(obj)/qconf-cfg
quiet_cmd_moc = MOC $@ quiet_cmd_moc = MOC $@
cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) -i $< -o $@ cmd_moc = $(shell . $(obj)/qconf-cfg && echo $$moc) $< -o $@
$(obj)/%.moc: $(src)/%.h $(obj)/qconf-cfg FORCE $(obj)/qconf-moc.cc: $(src)/qconf.h $(obj)/qconf-cfg FORCE
$(call if_changed,moc) $(call if_changed,moc)
targets += qconf.moc targets += qconf-moc.cc
# gconf: Used for the gconfig target based on GTK+ # gconf: Used for the gconfig target based on GTK+
hostprogs += gconf hostprogs += gconf
......
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#include "lkc.h" #include "lkc.h"
#include "qconf.h" #include "qconf.h"
#include "qconf.moc"
#include "images.h" #include "images.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment