aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/Makefile
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 19:16:39 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-10-28 19:16:39 -0400
commit51399a391940e676877c7a791138081f13a0bab7 (patch)
tree6caefb858ee4b31172b85ec7bcedb826a29a551b /scripts/kconfig/Makefile
parentb779b332d0e1ef68f40867948ae5526a3e925163 (diff)
parentdf4d303647ebe5e2f7e473e32ccef9f8549e9d45 (diff)
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6
* 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild-2.6: (38 commits) kbuild: convert `arch/tile' to the kconfig mainmenu upgrade README: cite nconfig Revert "kconfig: Temporarily disable dependency warnings" kconfig: Use PATH_MAX instead of 128 for path buffer sizes. kconfig: Fix realloc usage() kconfig: Propagate const kconfig: Don't go out from read config loop when you read new symbol kconfig: fix menuconfig on debian lenny kbuild: migrate all arch to the kconfig mainmenu upgrade kconfig: expand file names kconfig: use the file's name of sourced file kconfig: constify file name kconfig: don't emit warning upon rootmenu's prompt redefinition kconfig: replace KERNELVERSION usage by the mainmenu's prompt kconfig: delay gconf window initialization kconfig: expand by default the rootmenu's prompt kconfig: add a symbol string expansion helper kconfig: regen parser kconfig: implement the `mainmenu' directive kconfig: allow PACKAGE to be defined on the compiler's command-line ... Fix up trivial conflict in arch/mn10300/Kconfig
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r--scripts/kconfig/Makefile87
1 files changed, 47 insertions, 40 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index de934def410f..368ae306aee4 100644
--- a/scripts/kconfig/Makefile
+++ b/scripts/kconfig/Makefile
@@ -8,7 +8,7 @@ PHONY += oldconfig xconfig gconfig menuconfig config silentoldconfig update-po-c
8ifdef KBUILD_KCONFIG 8ifdef KBUILD_KCONFIG
9Kconfig := $(KBUILD_KCONFIG) 9Kconfig := $(KBUILD_KCONFIG)
10else 10else
11Kconfig := arch/$(SRCARCH)/Kconfig 11Kconfig := Kconfig
12endif 12endif
13 13
14xconfig: $(obj)/qconf 14xconfig: $(obj)/qconf
@@ -145,11 +145,8 @@ check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
145 145
146# Use recursively expanded variables so we do not call gcc unless 146# Use recursively expanded variables so we do not call gcc unless
147# we really need to do so. (Do not call gcc as part of make mrproper) 147# we really need to do so. (Do not call gcc as part of make mrproper)
148HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) 148HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
149HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) 149 -DLOCALE
150
151HOST_EXTRACFLAGS += -DLOCALE
152
153 150
154# =========================================================================== 151# ===========================================================================
155# Shared Makefile for the various kconfig executables: 152# Shared Makefile for the various kconfig executables:
@@ -208,7 +205,7 @@ clean-files += config.pot linux.pot
208PHONY += $(obj)/dochecklxdialog 205PHONY += $(obj)/dochecklxdialog
209$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog 206$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
210$(obj)/dochecklxdialog: 207$(obj)/dochecklxdialog:
211 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) 208 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
212 209
213always := dochecklxdialog 210always := dochecklxdialog
214 211
@@ -226,6 +223,8 @@ HOSTLOADLIBES_gconf = `pkg-config --libs gtk+-2.0 gmodule-2.0 libglade-2.0` -ldl
226HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \ 223HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
227 -D LKC_DIRECT_LINK 224 -D LKC_DIRECT_LINK
228 225
226HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
227
229HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses 228HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
230$(obj)/qconf.o: $(obj)/.tmp_qtcheck 229$(obj)/qconf.o: $(obj)/.tmp_qtcheck
231 230
@@ -236,40 +235,48 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
236# QT needs some extra effort... 235# QT needs some extra effort...
237$(obj)/.tmp_qtcheck: 236$(obj)/.tmp_qtcheck:
238 @set -e; echo " CHECK qt"; dir=""; pkg=""; \ 237 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
239 pkg-config --exists qt 2> /dev/null && pkg=qt; \ 238 if ! pkg-config --exists QtCore 2> /dev/null; then \
240 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ 239 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
241 if [ -n "$$pkg" ]; then \ 240 pkg-config --exists qt 2> /dev/null && pkg=qt; \
242 cflags="\$$(shell pkg-config $$pkg --cflags)"; \ 241 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
243 libs="\$$(shell pkg-config $$pkg --libs)"; \ 242 if [ -n "$$pkg" ]; then \
244 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ 243 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
245 dir="$$(pkg-config $$pkg --variable=prefix)"; \ 244 libs="\$$(shell pkg-config $$pkg --libs)"; \
245 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
246 dir="$$(pkg-config $$pkg --variable=prefix)"; \
247 else \
248 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
249 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
250 done; \
251 if [ -z "$$dir" ]; then \
252 echo "*"; \
253 echo "* Unable to find any QT installation. Please make sure that"; \
254 echo "* the QT4 or QT3 development package is correctly installed and"; \
255 echo "* either qmake can be found or install pkg-config or set"; \
256 echo "* the QTDIR environment variable to the correct location."; \
257 echo "*"; \
258 false; \
259 fi; \
260 libpath=$$dir/lib; lib=qt; osdir=""; \
261 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
262 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
263 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
264 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
265 cflags="-I$$dir/include"; \
266 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
267 moc="$$dir/bin/moc"; \
268 fi; \
269 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
270 echo "*"; \
271 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
272 echo "*"; \
273 moc="/usr/bin/moc"; \
274 fi; \
246 else \ 275 else \
247 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ 276 cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
248 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ 277 libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
249 done; \ 278 binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
250 if [ -z "$$dir" ]; then \ 279 moc="$$binpath/bin/moc"; \
251 echo "*"; \
252 echo "* Unable to find the QT3 installation. Please make sure that"; \
253 echo "* the QT3 development package is correctly installed and"; \
254 echo "* either install pkg-config or set the QTDIR environment"; \
255 echo "* variable to the correct location."; \
256 echo "*"; \
257 false; \
258 fi; \
259 libpath=$$dir/lib; lib=qt; osdir=""; \
260 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
261 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
262 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
263 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
264 cflags="-I$$dir/include"; \
265 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
266 moc="$$dir/bin/moc"; \
267 fi; \
268 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
269 echo "*"; \
270 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
271 echo "*"; \
272 moc="/usr/bin/moc"; \
273 fi; \ 280 fi; \
274 echo "KC_QT_CFLAGS=$$cflags" > $@; \ 281 echo "KC_QT_CFLAGS=$$cflags" > $@; \
275 echo "KC_QT_LIBS=$$libs" >> $@; \ 282 echo "KC_QT_LIBS=$$libs" >> $@; \