This patch modifies the scripts/config/Makefile file to build the qconf
utility. qconf is not added to the target list unless the development
files of qt3 has been detected (we simply check for the presence of
the /usr/include/qt3 directory).

Changes since version 2: missing rule to create the missing .moc file
Changes since Version 1: none

Signed-off-by: Emmanuel Deloget <[email protected]>
--
Index: scripts/config/Makefile
===================================================================
--- scripts/config/Makefile    (révision 28361)
+++ scripts/config/Makefile    (copie de travail)
@@ -7,6 +7,8 @@
 # conf:      Used for defconfig, oldconfig and related targets
 # mconf:  Used for the mconfig target.
 #         Utilizes the lxdialog package
+# qconf:  Used for the xconfig target.
+#         Utilizes the Qt3-dev package
 # object files used by all kconfig flavours


@@ -17,10 +19,13 @@

 conf-objs    := conf.o zconf.tab.o
 mconf-objs    := mconf.o zconf.tab.o
+qconf-objs    := qconf.o zconf.tab.o kconfig_load.o

 clean-files    := lkc_defs.h qconf.moc .tmp_qtcheck \
            .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c

+have-qt3-dev:=$(shell [ -d /usr/include/qt3 ] && echo y)
+
 all: conf mconf lxdialog/lxdialog

 lxdialog/lxdialog:
@@ -30,14 +35,23 @@
 mconf: $(mconf-objs)

 clean:
-    rm -f *.o $(clean-files) conf mconf
+    rm -f *.o $(clean-files) conf mconf qconf
     $(MAKE) -C lxdialog clean

 zconf.tab.o: lex.zconf.c zconf.hash.c confdata.c

 kconfig_load.o: lkc_defs.h

-lkc_defs.h: $(src)/lkc_proto.h
+ifneq ($(have-qt3-dev),)
+all: qconf
+qconf: $(qconf-objs)
+qconf: LDFLAGS+=-lqt-mt
+qconf.o: qconf.moc
+qconf.o: CXXFLAGS+=-I/usr/include/qt3 -DLKC_DIRECT_LINK
+qconf.moc: qconf.h
+endif
+
+lkc_defs.h: lkc_proto.h
     sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'

 zconf.tab.c: zconf.y
@@ -52,3 +66,6 @@

 %.hash.c: %.gperf
     cp $@_shipped $@ || gperf < $< > $@
+
+%.moc: %.h
+    cp $@_shipped $@ || moc -i $< -o $@
_______________________________________________
openwrt-devel mailing list
[email protected]
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to