mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
Merge branch 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild
Pull kconfig updates from Michal Marek: - 'make xconfig' ported to Qt5, dropping support for Qt3 - merge_config.sh supports a single-input-file mode and also respects $KCONFIG_CONFIG - Fix for incorrect display of >= and > in dependency expressions * 'kconfig' of git://git.kernel.org/pub/scm/linux/kernel/git/mmarek/kbuild: (44 commits) Add current selection check. Use pkg-config to find Qt 4 and 5 instead of direct qmake kconfig: Fix copy&paste error kconfig/merge_config.sh: Accept a single file kconfig/merge_config.sh: Support KCONFIG_CONFIG Update the buildsystem for KConfig finding Qt Port xconfig to Qt5 - Update copyright. Port xconfig to Qt5 - Fix goParent issue. Port xconfig to Qt5 - on Back clicked, deselect old item. Port xconfig to Qt5 - Add(back) one click checkbox toggle. Port xconfig to Qt5 - Add(back) lineedit editing. Port xconfig to Qt5 - Remove some commented code. Port xconfig to Qt5 - Source format. Port xconfig to Qt5 - Add horizontal scrollbar, and scroll per pixel. Port xconfig to Qt5 - Change ConfigItem constructor parent type. Port xconfig to Qt5 - Disable ConfigList soring Port xconfig to Qt5 - Remove ConfigList::updateMenuList template. Port xconfig to Qt5 - Add ConfigList::mode to initializer list. Port xconfig to Qt5 - Add ConfigItem::nextItem to initializer list. Port xconfig to Qt5 - Tree widget set column titles. ...
This commit is contained in:
commit
152813e6e4
10 changed files with 791 additions and 433 deletions
|
@ -229,49 +229,21 @@ $(obj)/.tmp_qtcheck: $(src)/Makefile
|
|||
|
||||
# Qt needs some extra effort...
|
||||
$(obj)/.tmp_qtcheck:
|
||||
@set -e; $(kecho) " CHECK qt"; dir=""; pkg=""; \
|
||||
if ! pkg-config --exists QtCore 2> /dev/null; then \
|
||||
echo "* Unable to find the Qt4 tool qmake. Trying to use Qt3"; \
|
||||
pkg-config --exists qt 2> /dev/null && pkg=qt; \
|
||||
pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \
|
||||
if [ -n "$$pkg" ]; then \
|
||||
cflags="\$$(shell pkg-config $$pkg --cflags)"; \
|
||||
libs="\$$(shell pkg-config $$pkg --libs)"; \
|
||||
moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \
|
||||
dir="$$(pkg-config $$pkg --variable=prefix)"; \
|
||||
else \
|
||||
for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \
|
||||
if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \
|
||||
done; \
|
||||
if [ -z "$$dir" ]; then \
|
||||
echo >&2 "*"; \
|
||||
echo >&2 "* Unable to find any Qt installation. Please make sure that"; \
|
||||
echo >&2 "* the Qt4 or Qt3 development package is correctly installed and"; \
|
||||
echo >&2 "* either qmake can be found or install pkg-config or set"; \
|
||||
echo >&2 "* the QTDIR environment variable to the correct location."; \
|
||||
echo >&2 "*"; \
|
||||
false; \
|
||||
fi; \
|
||||
libpath=$$dir/lib; lib=qt; osdir=""; \
|
||||
$(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \
|
||||
osdir=x$$($(HOSTCXX) -print-multi-os-directory); \
|
||||
test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \
|
||||
test -f $$libpath/libqt-mt.so && lib=qt-mt; \
|
||||
cflags="-I$$dir/include"; \
|
||||
libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \
|
||||
moc="$$dir/bin/moc"; \
|
||||
fi; \
|
||||
if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \
|
||||
echo "*"; \
|
||||
echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \
|
||||
echo "*"; \
|
||||
moc="/usr/bin/moc"; \
|
||||
fi; \
|
||||
@set -e; $(kecho) " CHECK qt"; \
|
||||
if pkg-config --exists Qt5Core; then \
|
||||
cflags="-std=c++11 -fPIC `pkg-config --cflags Qt5Core Qt5Gui Qt5Widgets`"; \
|
||||
libs=`pkg-config --libs Qt5Core Qt5Gui Qt5Widgets`; \
|
||||
moc=`pkg-config --variable=host_bins Qt5Core`/moc; \
|
||||
elif pkg-config --exists QtCore; then \
|
||||
cflags=`pkg-config --cflags QtCore QtGui`; \
|
||||
libs=`pkg-config --libs QtCore QtGui`; \
|
||||
moc=`pkg-config --variable=moc_location QtCore`; \
|
||||
else \
|
||||
cflags="\$$(shell pkg-config QtCore QtGui Qt3Support --cflags)"; \
|
||||
libs="\$$(shell pkg-config QtCore QtGui Qt3Support --libs)"; \
|
||||
moc="\$$(shell pkg-config QtCore --variable=moc_location)"; \
|
||||
[ -n "$$moc" ] || moc="\$$(shell pkg-config QtCore --variable=prefix)/bin/moc"; \
|
||||
echo >&2 "*"; \
|
||||
echo >&2 "* Could not find Qt via pkg-config."; \
|
||||
echo >&2 "* Please install either Qt 4.8 or 5.x. and make sure it's in PKG_CONFIG_PATH"; \
|
||||
echo >&2 "*"; \
|
||||
exit 1; \
|
||||
fi; \
|
||||
echo "KC_QT_CFLAGS=$$cflags" > $@; \
|
||||
echo "KC_QT_LIBS=$$libs" >> $@; \
|
||||
|
|
|
@ -1113,7 +1113,7 @@ void expr_print(struct expr *e, void (*fn)(void *, struct symbol *, const char *
|
|||
fn(data, e->left.sym, e->left.sym->name);
|
||||
else
|
||||
fn(data, NULL, "<choice>");
|
||||
fn(data, NULL, e->type == E_LEQ ? ">=" : ">");
|
||||
fn(data, NULL, e->type == E_GEQ ? ">=" : ">");
|
||||
fn(data, e->right.sym, e->right.sym->name);
|
||||
break;
|
||||
case E_UNEQUAL:
|
||||
|
|
|
@ -32,7 +32,7 @@ usage() {
|
|||
echo " -m only merge the fragments, do not execute the make command"
|
||||
echo " -n use allnoconfig instead of alldefconfig"
|
||||
echo " -r list redundant entries when merging fragments"
|
||||
echo " -O dir to put generated output files"
|
||||
echo " -O dir to put generated output files. Consider setting \$KCONFIG_CONFIG instead."
|
||||
}
|
||||
|
||||
RUNMAKE=true
|
||||
|
@ -77,11 +77,19 @@ while true; do
|
|||
esac
|
||||
done
|
||||
|
||||
if [ "$#" -lt 2 ] ; then
|
||||
if [ "$#" -lt 1 ] ; then
|
||||
usage
|
||||
exit
|
||||
fi
|
||||
|
||||
if [ -z "$KCONFIG_CONFIG" ]; then
|
||||
if [ "$OUTPUT" != . ]; then
|
||||
KCONFIG_CONFIG=$(readlink -m -- "$OUTPUT/.config")
|
||||
else
|
||||
KCONFIG_CONFIG=.config
|
||||
fi
|
||||
fi
|
||||
|
||||
INITFILE=$1
|
||||
shift;
|
||||
|
||||
|
@ -124,9 +132,9 @@ for MERGE_FILE in $MERGE_LIST ; do
|
|||
done
|
||||
|
||||
if [ "$RUNMAKE" = "false" ]; then
|
||||
cp $TMP_FILE $OUTPUT/.config
|
||||
cp -T -- "$TMP_FILE" "$KCONFIG_CONFIG"
|
||||
echo "#"
|
||||
echo "# merged configuration written to $OUTPUT/.config (needs make)"
|
||||
echo "# merged configuration written to $KCONFIG_CONFIG (needs make)"
|
||||
echo "#"
|
||||
clean_up
|
||||
exit
|
||||
|
@ -150,7 +158,7 @@ make KCONFIG_ALLCONFIG=$TMP_FILE $OUTPUT_ARG $ALLTARGET
|
|||
for CFG in $(sed -n "$SED_CONFIG_EXP" $TMP_FILE); do
|
||||
|
||||
REQUESTED_VAL=$(grep -w -e "$CFG" $TMP_FILE)
|
||||
ACTUAL_VAL=$(grep -w -e "$CFG" $OUTPUT/.config)
|
||||
ACTUAL_VAL=$(grep -w -e "$CFG" "$KCONFIG_CONFIG")
|
||||
if [ "x$REQUESTED_VAL" != "x$ACTUAL_VAL" ] ; then
|
||||
echo "Value requested for $CFG not in final .config"
|
||||
echo "Requested value: $REQUESTED_VAL"
|
||||
|
|
File diff suppressed because it is too large
Load diff
|
@ -3,26 +3,18 @@
|
|||
* Released under the terms of the GNU GPL v2.0.
|
||||
*/
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
#include <qlistview.h>
|
||||
#else
|
||||
#include <q3listview.h>
|
||||
#endif
|
||||
#include <QTextBrowser>
|
||||
#include <QTreeWidget>
|
||||
#include <QMainWindow>
|
||||
#include <QHeaderView>
|
||||
#include <qsettings.h>
|
||||
|
||||
#if QT_VERSION < 0x040000
|
||||
#define Q3ValueList QValueList
|
||||
#define Q3PopupMenu QPopupMenu
|
||||
#define Q3ListView QListView
|
||||
#define Q3ListViewItem QListViewItem
|
||||
#define Q3VBox QVBox
|
||||
#define Q3TextBrowser QTextBrowser
|
||||
#define Q3MainWindow QMainWindow
|
||||
#define Q3Action QAction
|
||||
#define Q3ToolBar QToolBar
|
||||
#define Q3ListViewItemIterator QListViewItemIterator
|
||||
#define Q3FileDialog QFileDialog
|
||||
#endif
|
||||
#include <QPushButton>
|
||||
#include <QSettings>
|
||||
#include <QLineEdit>
|
||||
#include <QSplitter>
|
||||
#include <QCheckBox>
|
||||
#include <QDialog>
|
||||
#include "expr.h"
|
||||
|
||||
class ConfigView;
|
||||
class ConfigList;
|
||||
|
@ -33,8 +25,8 @@ class ConfigMainWindow;
|
|||
class ConfigSettings : public QSettings {
|
||||
public:
|
||||
ConfigSettings();
|
||||
Q3ValueList<int> readSizes(const QString& key, bool *ok);
|
||||
bool writeSizes(const QString& key, const Q3ValueList<int>& value);
|
||||
QList<int> readSizes(const QString& key, bool *ok);
|
||||
bool writeSizes(const QString& key, const QList<int>& value);
|
||||
};
|
||||
|
||||
enum colIdx {
|
||||
|
@ -47,9 +39,9 @@ enum optionMode {
|
|||
normalOpt = 0, allOpt, promptOpt
|
||||
};
|
||||
|
||||
class ConfigList : public Q3ListView {
|
||||
class ConfigList : public QTreeWidget {
|
||||
Q_OBJECT
|
||||
typedef class Q3ListView Parent;
|
||||
typedef class QTreeWidget Parent;
|
||||
public:
|
||||
ConfigList(ConfigView* p, const char *name = 0);
|
||||
void reinit(void);
|
||||
|
@ -61,10 +53,10 @@ public:
|
|||
|
||||
protected:
|
||||
void keyPressEvent(QKeyEvent *e);
|
||||
void contentsMousePressEvent(QMouseEvent *e);
|
||||
void contentsMouseReleaseEvent(QMouseEvent *e);
|
||||
void contentsMouseMoveEvent(QMouseEvent *e);
|
||||
void contentsMouseDoubleClickEvent(QMouseEvent *e);
|
||||
void mousePressEvent(QMouseEvent *e);
|
||||
void mouseReleaseEvent(QMouseEvent *e);
|
||||
void mouseMoveEvent(QMouseEvent *e);
|
||||
void mouseDoubleClickEvent(QMouseEvent *e);
|
||||
void focusInEvent(QFocusEvent *e);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
|
||||
|
@ -95,32 +87,23 @@ public:
|
|||
}
|
||||
ConfigItem* firstChild() const
|
||||
{
|
||||
return (ConfigItem *)Parent::firstChild();
|
||||
return (ConfigItem *)children().first();
|
||||
}
|
||||
int mapIdx(colIdx idx)
|
||||
void addColumn(colIdx idx)
|
||||
{
|
||||
return colMap[idx];
|
||||
}
|
||||
void addColumn(colIdx idx, const QString& label)
|
||||
{
|
||||
colMap[idx] = Parent::addColumn(label);
|
||||
colRevMap[colMap[idx]] = idx;
|
||||
showColumn(idx);
|
||||
}
|
||||
void removeColumn(colIdx idx)
|
||||
{
|
||||
int col = colMap[idx];
|
||||
if (col >= 0) {
|
||||
Parent::removeColumn(col);
|
||||
colRevMap[col] = colMap[idx] = -1;
|
||||
}
|
||||
hideColumn(idx);
|
||||
}
|
||||
void setAllOpen(bool open);
|
||||
void setParentMenu(void);
|
||||
|
||||
bool menuSkip(struct menu *);
|
||||
|
||||
template <class P>
|
||||
void updateMenuList(P*, struct menu*);
|
||||
void updateMenuList(ConfigItem *parent, struct menu*);
|
||||
void updateMenuList(ConfigList *parent, struct menu*);
|
||||
|
||||
bool updateAll;
|
||||
|
||||
|
@ -132,30 +115,26 @@ public:
|
|||
enum listMode mode;
|
||||
enum optionMode optMode;
|
||||
struct menu *rootEntry;
|
||||
QColorGroup disabledColorGroup;
|
||||
QColorGroup inactivedColorGroup;
|
||||
Q3PopupMenu* headerPopup;
|
||||
|
||||
private:
|
||||
int colMap[colNr];
|
||||
int colRevMap[colNr];
|
||||
QPalette disabledColorGroup;
|
||||
QPalette inactivedColorGroup;
|
||||
QMenu* headerPopup;
|
||||
};
|
||||
|
||||
class ConfigItem : public Q3ListViewItem {
|
||||
typedef class Q3ListViewItem Parent;
|
||||
class ConfigItem : public QTreeWidgetItem {
|
||||
typedef class QTreeWidgetItem Parent;
|
||||
public:
|
||||
ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v)
|
||||
: Parent(parent, after), menu(m), visible(v), goParent(false)
|
||||
ConfigItem(ConfigList *parent, ConfigItem *after, struct menu *m, bool v)
|
||||
: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
|
||||
{
|
||||
init();
|
||||
}
|
||||
ConfigItem(ConfigItem *parent, ConfigItem *after, struct menu *m, bool v)
|
||||
: Parent(parent, after), menu(m), visible(v), goParent(false)
|
||||
: Parent(parent, after), nextItem(0), menu(m), visible(v), goParent(false)
|
||||
{
|
||||
init();
|
||||
}
|
||||
ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
|
||||
: Parent(parent, after), menu(0), visible(v), goParent(true)
|
||||
ConfigItem(ConfigList *parent, ConfigItem *after, bool v)
|
||||
: Parent(parent, after), nextItem(0), menu(0), visible(v), goParent(true)
|
||||
{
|
||||
init();
|
||||
}
|
||||
|
@ -166,33 +145,43 @@ public:
|
|||
void testUpdateMenu(bool v);
|
||||
ConfigList* listView() const
|
||||
{
|
||||
return (ConfigList*)Parent::listView();
|
||||
return (ConfigList*)Parent::treeWidget();
|
||||
}
|
||||
ConfigItem* firstChild() const
|
||||
{
|
||||
return (ConfigItem *)Parent::firstChild();
|
||||
return (ConfigItem *)Parent::child(0);
|
||||
}
|
||||
ConfigItem* nextSibling() const
|
||||
ConfigItem* nextSibling()
|
||||
{
|
||||
return (ConfigItem *)Parent::nextSibling();
|
||||
ConfigItem *ret = NULL;
|
||||
ConfigItem *_parent = (ConfigItem *)parent();
|
||||
|
||||
if(_parent) {
|
||||
ret = (ConfigItem *)_parent->child(_parent->indexOfChild(this)+1);
|
||||
} else {
|
||||
QTreeWidget *_treeWidget = treeWidget();
|
||||
ret = (ConfigItem *)_treeWidget->topLevelItem(_treeWidget->indexOfTopLevelItem(this)+1);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
void setText(colIdx idx, const QString& text)
|
||||
{
|
||||
Parent::setText(listView()->mapIdx(idx), text);
|
||||
Parent::setText(idx, text);
|
||||
}
|
||||
QString text(colIdx idx) const
|
||||
{
|
||||
return Parent::text(listView()->mapIdx(idx));
|
||||
return Parent::text(idx);
|
||||
}
|
||||
void setPixmap(colIdx idx, const QPixmap& pm)
|
||||
void setPixmap(colIdx idx, const QIcon &icon)
|
||||
{
|
||||
Parent::setPixmap(listView()->mapIdx(idx), pm);
|
||||
Parent::setIcon(idx, icon);
|
||||
}
|
||||
const QPixmap* pixmap(colIdx idx) const
|
||||
const QIcon pixmap(colIdx idx) const
|
||||
{
|
||||
return Parent::pixmap(listView()->mapIdx(idx));
|
||||
return icon(idx);
|
||||
}
|
||||
void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
|
||||
// TODO: Implement paintCell
|
||||
|
||||
ConfigItem* nextItem;
|
||||
struct menu *menu;
|
||||
|
@ -216,9 +205,9 @@ public:
|
|||
ConfigItem *item;
|
||||
};
|
||||
|
||||
class ConfigView : public Q3VBox {
|
||||
class ConfigView : public QWidget {
|
||||
Q_OBJECT
|
||||
typedef class Q3VBox Parent;
|
||||
typedef class QWidget Parent;
|
||||
public:
|
||||
ConfigView(QWidget* parent, const char *name = 0);
|
||||
~ConfigView(void);
|
||||
|
@ -249,9 +238,9 @@ public:
|
|||
static QAction *showPromptAction;
|
||||
};
|
||||
|
||||
class ConfigInfoView : public Q3TextBrowser {
|
||||
class ConfigInfoView : public QTextBrowser {
|
||||
Q_OBJECT
|
||||
typedef class Q3TextBrowser Parent;
|
||||
typedef class QTextBrowser Parent;
|
||||
public:
|
||||
ConfigInfoView(QWidget* parent, const char *name = 0);
|
||||
bool showDebug(void) const { return _showDebug; }
|
||||
|
@ -271,8 +260,8 @@ protected:
|
|||
QString debug_info(struct symbol *sym);
|
||||
static QString print_filter(const QString &str);
|
||||
static void expr_print_help(void *data, struct symbol *sym, const char *str);
|
||||
Q3PopupMenu* createPopupMenu(const QPoint& pos);
|
||||
void contentsContextMenuEvent(QContextMenuEvent *e);
|
||||
QMenu *createStandardContextMenu(const QPoint & pos);
|
||||
void contextMenuEvent(QContextMenuEvent *e);
|
||||
|
||||
struct symbol *sym;
|
||||
struct menu *_menu;
|
||||
|
@ -299,10 +288,10 @@ protected:
|
|||
struct symbol **result;
|
||||
};
|
||||
|
||||
class ConfigMainWindow : public Q3MainWindow {
|
||||
class ConfigMainWindow : public QMainWindow {
|
||||
Q_OBJECT
|
||||
|
||||
static Q3Action *saveAction;
|
||||
static QAction *saveAction;
|
||||
static void conf_changed(void);
|
||||
public:
|
||||
ConfigMainWindow(void);
|
||||
|
@ -331,8 +320,11 @@ protected:
|
|||
ConfigView *configView;
|
||||
ConfigList *configList;
|
||||
ConfigInfoView *helpText;
|
||||
Q3ToolBar *toolBar;
|
||||
Q3Action *backAction;
|
||||
QSplitter* split1;
|
||||
QSplitter* split2;
|
||||
QToolBar *toolBar;
|
||||
QAction *backAction;
|
||||
QAction *singleViewAction;
|
||||
QAction *splitViewAction;
|
||||
QAction *fullViewAction;
|
||||
QSplitter *split1;
|
||||
QSplitter *split2;
|
||||
};
|
||||
|
|
|
@ -1116,6 +1116,8 @@ static void sym_check_print_recursive(struct symbol *last_sym)
|
|||
if (stack->sym == last_sym)
|
||||
fprintf(stderr, "%s:%d:error: recursive dependency detected!\n",
|
||||
prop->file->name, prop->lineno);
|
||||
fprintf(stderr, "For a resolution refer to Documentation/kbuild/kconfig-language.txt\n");
|
||||
fprintf(stderr, "subsection \"Kconfig recursive dependency limitations\"\n");
|
||||
if (stack->expr) {
|
||||
fprintf(stderr, "%s:%d:\tsymbol %s %s value contains %s\n",
|
||||
prop->file->name, prop->lineno,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue