aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/kconfig/Makefile
diff options
context:
space:
mode:
authorGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
committerGlenn Elliott <gelliott@cs.unc.edu>2012-03-04 19:47:13 -0500
commitc71c03bda1e86c9d5198c5d83f712e695c4f2a1e (patch)
treeecb166cb3e2b7e2adb3b5e292245fefd23381ac8 /scripts/kconfig/Makefile
parentea53c912f8a86a8567697115b6a0d8152beee5c8 (diff)
parent6a00f206debf8a5c8899055726ad127dbeeed098 (diff)
Merge branch 'mpi-master' into wip-k-fmlpwip-k-fmlp
Conflicts: litmus/sched_cedf.c
Diffstat (limited to 'scripts/kconfig/Makefile')
-rw-r--r--scripts/kconfig/Makefile125
1 files changed, 70 insertions, 55 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile
index de934def410f..faa9a4701b6f 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
@@ -77,14 +77,15 @@ localyesconfig: $(obj)/streamline_config.pl $(obj)/conf
77# The symlink is used to repair a deficiency in arch/um 77# The symlink is used to repair a deficiency in arch/um
78update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h 78update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
79 $(Q)echo " GEN config" 79 $(Q)echo " GEN config"
80 $(Q)xgettext --default-domain=linux \ 80 $(Q)xgettext --default-domain=linux \
81 --add-comments --keyword=_ --keyword=N_ \ 81 --add-comments --keyword=_ --keyword=N_ \
82 --from-code=UTF-8 \ 82 --from-code=UTF-8 \
83 --files-from=scripts/kconfig/POTFILES.in \ 83 --files-from=$(srctree)/scripts/kconfig/POTFILES.in \
84 --directory=$(srctree) --directory=$(objtree) \
84 --output $(obj)/config.pot 85 --output $(obj)/config.pot
85 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot 86 $(Q)sed -i s/CHARSET/UTF-8/ $(obj)/config.pot
86 $(Q)ln -fs Kconfig.i386 arch/um/Kconfig.arch 87 $(Q)ln -fs Kconfig.x86 arch/um/Kconfig
87 $(Q)(for i in `ls arch/*/Kconfig`; \ 88 $(Q)(for i in `ls $(srctree)/arch/*/Kconfig`; \
88 do \ 89 do \
89 echo " GEN $$i"; \ 90 echo " GEN $$i"; \
90 $(obj)/kxgettext $$i \ 91 $(obj)/kxgettext $$i \
@@ -92,7 +93,7 @@ update-po-config: $(obj)/kxgettext $(obj)/gconf.glade.h
92 done ) 93 done )
93 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \ 94 $(Q)msguniq --sort-by-file --to-code=UTF-8 $(obj)/config.pot \
94 --output $(obj)/linux.pot 95 --output $(obj)/linux.pot
95 $(Q)rm -f arch/um/Kconfig.arch 96 $(Q)rm -f $(srctree)/arch/um/Kconfig
96 $(Q)rm -f $(obj)/config.pot 97 $(Q)rm -f $(obj)/config.pot
97 98
98PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig 99PHONY += allnoconfig allyesconfig allmodconfig alldefconfig randconfig
@@ -145,11 +146,8 @@ check-lxdialog := $(srctree)/$(src)/lxdialog/check-lxdialog.sh
145 146
146# Use recursively expanded variables so we do not call gcc unless 147# 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) 148# we really need to do so. (Do not call gcc as part of make mrproper)
148HOST_EXTRACFLAGS = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) 149HOST_EXTRACFLAGS += $(shell $(CONFIG_SHELL) $(check-lxdialog) -ccflags) \
149HOST_LOADLIBES = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC)) 150 -DLOCALE
150
151HOST_EXTRACFLAGS += -DLOCALE
152
153 151
154# =========================================================================== 152# ===========================================================================
155# Shared Makefile for the various kconfig executables: 153# Shared Makefile for the various kconfig executables:
@@ -171,8 +169,11 @@ conf-objs := conf.o zconf.tab.o
171mconf-objs := mconf.o zconf.tab.o $(lxdialog) 169mconf-objs := mconf.o zconf.tab.o $(lxdialog)
172nconf-objs := nconf.o zconf.tab.o nconf.gui.o 170nconf-objs := nconf.o zconf.tab.o nconf.gui.o
173kxgettext-objs := kxgettext.o zconf.tab.o 171kxgettext-objs := kxgettext.o zconf.tab.o
172qconf-cxxobjs := qconf.o
173qconf-objs := kconfig_load.o zconf.tab.o
174gconf-objs := gconf.o kconfig_load.o zconf.tab.o
174 175
175hostprogs-y := conf qconf gconf kxgettext 176hostprogs-y := conf
176 177
177ifeq ($(MAKECMDGOALS),nconfig) 178ifeq ($(MAKECMDGOALS),nconfig)
178 hostprogs-y += nconf 179 hostprogs-y += nconf
@@ -182,6 +183,10 @@ ifeq ($(MAKECMDGOALS),menuconfig)
182 hostprogs-y += mconf 183 hostprogs-y += mconf
183endif 184endif
184 185
186ifeq ($(MAKECMDGOALS),update-po-config)
187 hostprogs-y += kxgettext
188endif
189
185ifeq ($(MAKECMDGOALS),xconfig) 190ifeq ($(MAKECMDGOALS),xconfig)
186 qconf-target := 1 191 qconf-target := 1
187endif 192endif
@@ -191,16 +196,15 @@ endif
191 196
192 197
193ifeq ($(qconf-target),1) 198ifeq ($(qconf-target),1)
194qconf-cxxobjs := qconf.o 199 hostprogs-y += qconf
195qconf-objs := kconfig_load.o zconf.tab.o
196endif 200endif
197 201
198ifeq ($(gconf-target),1) 202ifeq ($(gconf-target),1)
199gconf-objs := gconf.o kconfig_load.o zconf.tab.o 203 hostprogs-y += gconf
200endif 204endif
201 205
202clean-files := lkc_defs.h qconf.moc .tmp_qtcheck \ 206clean-files := lkc_defs.h qconf.moc .tmp_qtcheck .tmp_gtkcheck
203 .tmp_gtkcheck zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h 207clean-files += zconf.tab.c lex.zconf.c zconf.hash.c gconf.glade.h
204clean-files += mconf qconf gconf nconf 208clean-files += mconf qconf gconf nconf
205clean-files += config.pot linux.pot 209clean-files += config.pot linux.pot
206 210
@@ -208,7 +212,7 @@ clean-files += config.pot linux.pot
208PHONY += $(obj)/dochecklxdialog 212PHONY += $(obj)/dochecklxdialog
209$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog 213$(addprefix $(obj)/,$(lxdialog)): $(obj)/dochecklxdialog
210$(obj)/dochecklxdialog: 214$(obj)/dochecklxdialog:
211 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOST_LOADLIBES) 215 $(Q)$(CONFIG_SHELL) $(check-lxdialog) -check $(HOSTCC) $(HOST_EXTRACFLAGS) $(HOSTLOADLIBES_mconf)
212 216
213always := dochecklxdialog 217always := dochecklxdialog
214 218
@@ -226,6 +230,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` \ 230HOSTCFLAGS_gconf.o = `pkg-config --cflags gtk+-2.0 gmodule-2.0 libglade-2.0` \
227 -D LKC_DIRECT_LINK 231 -D LKC_DIRECT_LINK
228 232
233HOSTLOADLIBES_mconf = $(shell $(CONFIG_SHELL) $(check-lxdialog) -ldflags $(HOSTCC))
234
229HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses 235HOSTLOADLIBES_nconf = -lmenu -lpanel -lncurses
230$(obj)/qconf.o: $(obj)/.tmp_qtcheck 236$(obj)/qconf.o: $(obj)/.tmp_qtcheck
231 237
@@ -236,40 +242,48 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
236# QT needs some extra effort... 242# QT needs some extra effort...
237$(obj)/.tmp_qtcheck: 243$(obj)/.tmp_qtcheck:
238 @set -e; echo " CHECK qt"; dir=""; pkg=""; \ 244 @set -e; echo " CHECK qt"; dir=""; pkg=""; \
239 pkg-config --exists qt 2> /dev/null && pkg=qt; \ 245 if ! pkg-config --exists QtCore 2> /dev/null; then \
240 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ 246 echo "* Unable to find the QT4 tool qmake. Trying to use QT3"; \
241 if [ -n "$$pkg" ]; then \ 247 pkg-config --exists qt 2> /dev/null && pkg=qt; \
242 cflags="\$$(shell pkg-config $$pkg --cflags)"; \ 248 pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
243 libs="\$$(shell pkg-config $$pkg --libs)"; \ 249 if [ -n "$$pkg" ]; then \
244 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ 250 cflags="\$$(shell pkg-config $$pkg --cflags)"; \
245 dir="$$(pkg-config $$pkg --variable=prefix)"; \ 251 libs="\$$(shell pkg-config $$pkg --libs)"; \
252 moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
253 dir="$$(pkg-config $$pkg --variable=prefix)"; \
254 else \
255 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
256 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
257 done; \
258 if [ -z "$$dir" ]; then \
259 echo "*"; \
260 echo "* Unable to find any QT installation. Please make sure that"; \
261 echo "* the QT4 or QT3 development package is correctly installed and"; \
262 echo "* either qmake can be found or install pkg-config or set"; \
263 echo "* the QTDIR environment variable to the correct location."; \
264 echo "*"; \
265 false; \
266 fi; \
267 libpath=$$dir/lib; lib=qt; osdir=""; \
268 $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
269 osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
270 test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
271 test -f $$libpath/libqt-mt.so && lib=qt-mt; \
272 cflags="-I$$dir/include"; \
273 libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
274 moc="$$dir/bin/moc"; \
275 fi; \
276 if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
277 echo "*"; \
278 echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
279 echo "*"; \
280 moc="/usr/bin/moc"; \
281 fi; \
246 else \ 282 else \
247 for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ 283 cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
248 if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ 284 libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
249 done; \ 285 binpath="\$$(shell pkg-config QtCore --variable=prefix)"; \
250 if [ -z "$$dir" ]; then \ 286 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; \ 287 fi; \
274 echo "KC_QT_CFLAGS=$$cflags" > $@; \ 288 echo "KC_QT_CFLAGS=$$cflags" > $@; \
275 echo "KC_QT_LIBS=$$libs" >> $@; \ 289 echo "KC_QT_LIBS=$$libs" >> $@; \
@@ -314,11 +328,12 @@ $(obj)/%.moc: $(src)/%.h
314 $(KC_QT_MOC) -i $< -o $@ 328 $(KC_QT_MOC) -i $< -o $@
315 329
316$(obj)/lkc_defs.h: $(src)/lkc_proto.h 330$(obj)/lkc_defs.h: $(src)/lkc_proto.h
317 sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' 331 $(Q)sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/'
318 332
319# Extract gconf menu items for I18N support 333# Extract gconf menu items for I18N support
320$(obj)/gconf.glade.h: $(obj)/gconf.glade 334$(obj)/gconf.glade.h: $(obj)/gconf.glade
321 intltool-extract --type=gettext/glade $(obj)/gconf.glade 335 $(Q)intltool-extract --type=gettext/glade --srcdir=$(srctree) \
336 $(obj)/gconf.glade
322 337
323### 338###
324# The following requires flex/bison/gperf 339# The following requires flex/bison/gperf