diff options
| author | Dave Airlie <airlied@starflyer.(none)> | 2006-01-03 02:18:01 -0500 |
|---|---|---|
| committer | Dave Airlie <airlied@linux.ie> | 2006-01-03 02:18:01 -0500 |
| commit | 97f2aab6698f3ab2552c41c1024a65ffd0763a6d (patch) | |
| tree | bb6e3b2949459f54f884c710fc74d40eef00d834 /scripts | |
| parent | d985c1088146607532093d9eaaaf99758f6a4d21 (diff) | |
| parent | 88026842b0a760145aa71d69e74fbc9ec118ca44 (diff) | |
drm: merge in Linus mainline
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/kconfig/Makefile | 68 | ||||
| -rwxr-xr-x | scripts/kernel-doc | 13 |
2 files changed, 50 insertions, 31 deletions
diff --git a/scripts/kconfig/Makefile b/scripts/kconfig/Makefile index 9d67782b812f..a96153fc793f 100644 --- a/scripts/kconfig/Makefile +++ b/scripts/kconfig/Makefile | |||
| @@ -129,8 +129,8 @@ endif | |||
| 129 | HOSTCFLAGS_lex.zconf.o := -I$(src) | 129 | HOSTCFLAGS_lex.zconf.o := -I$(src) |
| 130 | HOSTCFLAGS_zconf.tab.o := -I$(src) | 130 | HOSTCFLAGS_zconf.tab.o := -I$(src) |
| 131 | 131 | ||
| 132 | HOSTLOADLIBES_qconf = -L$(QTLIBPATH) -Wl,-rpath,$(QTLIBPATH) -l$(LIBS_QT) -ldl | 132 | HOSTLOADLIBES_qconf = $(KC_QT_LIBS) -ldl |
| 133 | HOSTCXXFLAGS_qconf.o = -I$(QTDIR)/include -D LKC_DIRECT_LINK | 133 | HOSTCXXFLAGS_qconf.o = $(KC_QT_CFLAGS) -D LKC_DIRECT_LINK |
| 134 | 134 | ||
| 135 | HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` | 135 | HOSTLOADLIBES_gconf = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --libs` |
| 136 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ | 136 | HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ |
| @@ -139,40 +139,50 @@ HOSTCFLAGS_gconf.o = `pkg-config gtk+-2.0 gmodule-2.0 libglade-2.0 --cflags` \ | |||
| 139 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck | 139 | $(obj)/qconf.o: $(obj)/.tmp_qtcheck |
| 140 | 140 | ||
| 141 | ifeq ($(qconf-target),1) | 141 | ifeq ($(qconf-target),1) |
| 142 | MOC = $(QTDIR)/bin/moc | 142 | $(obj)/.tmp_qtcheck: $(src)/Makefile |
| 143 | QTLIBPATH = $(QTDIR)/lib | ||
| 144 | -include $(obj)/.tmp_qtcheck | 143 | -include $(obj)/.tmp_qtcheck |
| 145 | 144 | ||
| 146 | # QT needs some extra effort... | 145 | # QT needs some extra effort... |
| 147 | $(obj)/.tmp_qtcheck: | 146 | $(obj)/.tmp_qtcheck: |
| 148 | @set -e; for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ | 147 | @set -e; echo " CHECK qt"; dir=""; pkg=""; \ |
| 149 | if [ -f $$d/include/qconfig.h ]; then DIR=$$d; break; fi; \ | 148 | pkg-config --exists qt 2> /dev/null && pkg=qt; \ |
| 150 | done; \ | 149 | pkg-config --exists qt-mt 2> /dev/null && pkg=qt-mt; \ |
| 151 | if [ -z "$$DIR" ]; then \ | 150 | if [ -n "$$pkg" ]; then \ |
| 152 | echo "*"; \ | 151 | cflags="\$$(shell pkg-config $$pkg --cflags)"; \ |
| 153 | echo "* Unable to find the QT installation. Please make sure that the"; \ | 152 | libs="\$$(shell pkg-config $$pkg --libs)"; \ |
| 154 | echo "* QT development package is correctly installed and the QTDIR"; \ | 153 | moc="\$$(shell pkg-config $$pkg --variable=prefix)/bin/moc"; \ |
| 155 | echo "* environment variable is set to the correct location."; \ | 154 | dir="$$(pkg-config $$pkg --variable=prefix)"; \ |
| 156 | echo "*"; \ | ||
| 157 | false; \ | ||
| 158 | fi; \ | ||
| 159 | LIBPATH=$$DIR/lib; LIB=qt; \ | ||
| 160 | if [ -f $$QTLIB/libqt-mt.so ] ; then \ | ||
| 161 | LIB=qt-mt; \ | ||
| 162 | LIBPATH=$$QTLIB; \ | ||
| 163 | else \ | 155 | else \ |
| 164 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | 156 | for d in $$QTDIR /usr/share/qt* /usr/lib/qt*; do \ |
| 165 | LIBPATH=$$DIR/lib/$$($(HOSTCXX) -print-multi-os-directory); \ | 157 | if [ -f $$d/include/qconfig.h ]; then dir=$$d; break; fi; \ |
| 166 | if [ -f $$LIBPATH/libqt-mt.so ]; then LIB=qt-mt; fi; \ | 158 | done; \ |
| 159 | if [ -z "$$dir" ]; then \ | ||
| 160 | echo "*"; \ | ||
| 161 | echo "* Unable to find the QT installation. Please make sure that"; \ | ||
| 162 | echo "* the QT development package is correctly installed and"; \ | ||
| 163 | echo "* either install pkg-config or set the QTDIR environment"; \ | ||
| 164 | echo "* variable to the correct location."; \ | ||
| 165 | echo "*"; \ | ||
| 166 | false; \ | ||
| 167 | fi; \ | ||
| 168 | libpath=$$dir/lib; lib=qt; osdir=""; \ | ||
| 169 | $(HOSTCXX) -print-multi-os-directory > /dev/null 2>&1 && \ | ||
| 170 | osdir=x$$($(HOSTCXX) -print-multi-os-directory); \ | ||
| 171 | test -d $$libpath/$$osdir && libpath=$$libpath/$$osdir; \ | ||
| 172 | test -f $$libpath/libqt-mt.so && lib=qt-mt; \ | ||
| 173 | cflags="-I$$dir/include"; \ | ||
| 174 | libs="-L$$libpath -Wl,-rpath,$$libpath -l$$lib"; \ | ||
| 175 | moc="$$dir/bin/moc"; \ | ||
| 167 | fi; \ | 176 | fi; \ |
| 168 | echo "QTDIR=$$DIR" > $@; echo "QTLIBPATH=$$LIBPATH" >> $@; \ | 177 | if [ ! -x $$dir/bin/moc -a -x /usr/bin/moc ]; then \ |
| 169 | echo "LIBS_QT=$$LIB" >> $@; \ | ||
| 170 | if [ ! -x $$DIR/bin/moc -a -x /usr/bin/moc ]; then \ | ||
| 171 | echo "*"; \ | 178 | echo "*"; \ |
| 172 | echo "* Unable to find $$DIR/bin/moc, using /usr/bin/moc instead."; \ | 179 | echo "* Unable to find $$dir/bin/moc, using /usr/bin/moc instead."; \ |
| 173 | echo "*"; \ | 180 | echo "*"; \ |
| 174 | echo "MOC=/usr/bin/moc" >> $@; \ | 181 | moc="/usr/bin/moc"; \ |
| 175 | fi | 182 | fi; \ |
| 183 | echo "KC_QT_CFLAGS=$$cflags" > $@; \ | ||
| 184 | echo "KC_QT_LIBS=$$libs" >> $@; \ | ||
| 185 | echo "KC_QT_MOC=$$moc" >> $@ | ||
| 176 | endif | 186 | endif |
| 177 | 187 | ||
| 178 | $(obj)/gconf.o: $(obj)/.tmp_gtkcheck | 188 | $(obj)/gconf.o: $(obj)/.tmp_gtkcheck |
| @@ -210,7 +220,7 @@ $(obj)/qconf.o: $(obj)/qconf.moc $(obj)/lkc_defs.h | |||
| 210 | $(obj)/gconf.o: $(obj)/lkc_defs.h | 220 | $(obj)/gconf.o: $(obj)/lkc_defs.h |
| 211 | 221 | ||
| 212 | $(obj)/%.moc: $(src)/%.h | 222 | $(obj)/%.moc: $(src)/%.h |
| 213 | $(MOC) -i $< -o $@ | 223 | $(KC_QT_MOC) -i $< -o $@ |
| 214 | 224 | ||
| 215 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h | 225 | $(obj)/lkc_defs.h: $(src)/lkc_proto.h |
| 216 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' | 226 | sed < $< > $@ 's/P(\([^,]*\),.*/#define \1 (\*\1_p)/' |
diff --git a/scripts/kernel-doc b/scripts/kernel-doc index 8aaf74e64183..2f45fd2969d0 100755 --- a/scripts/kernel-doc +++ b/scripts/kernel-doc | |||
| @@ -117,6 +117,8 @@ use strict; | |||
| 117 | # struct my_struct { | 117 | # struct my_struct { |
| 118 | # int a; | 118 | # int a; |
| 119 | # int b; | 119 | # int b; |
| 120 | # /* private: */ | ||
| 121 | # int c; | ||
| 120 | # }; | 122 | # }; |
| 121 | # | 123 | # |
| 122 | # All descriptions can be multiline, except the short function description. | 124 | # All descriptions can be multiline, except the short function description. |
| @@ -1304,6 +1306,12 @@ sub dump_struct($$) { | |||
| 1304 | # ignore embedded structs or unions | 1306 | # ignore embedded structs or unions |
| 1305 | $members =~ s/{.*?}//g; | 1307 | $members =~ s/{.*?}//g; |
| 1306 | 1308 | ||
| 1309 | # ignore members marked private: | ||
| 1310 | $members =~ s/\/\*.*?private:.*?public:.*?\*\///gos; | ||
| 1311 | $members =~ s/\/\*.*?private:.*//gos; | ||
| 1312 | # strip comments: | ||
| 1313 | $members =~ s/\/\*.*?\*\///gos; | ||
| 1314 | |||
| 1307 | create_parameterlist($members, ';', $file); | 1315 | create_parameterlist($members, ';', $file); |
| 1308 | 1316 | ||
| 1309 | output_declaration($declaration_name, | 1317 | output_declaration($declaration_name, |
| @@ -1329,6 +1337,7 @@ sub dump_enum($$) { | |||
| 1329 | my $x = shift; | 1337 | my $x = shift; |
| 1330 | my $file = shift; | 1338 | my $file = shift; |
| 1331 | 1339 | ||
| 1340 | $x =~ s@/\*.*?\*/@@gos; # strip comments. | ||
| 1332 | if ($x =~ /enum\s+(\w+)\s*{(.*)}/) { | 1341 | if ($x =~ /enum\s+(\w+)\s*{(.*)}/) { |
| 1333 | $declaration_name = $1; | 1342 | $declaration_name = $1; |
| 1334 | my $members = $2; | 1343 | my $members = $2; |
| @@ -1365,6 +1374,7 @@ sub dump_typedef($$) { | |||
| 1365 | my $x = shift; | 1374 | my $x = shift; |
| 1366 | my $file = shift; | 1375 | my $file = shift; |
| 1367 | 1376 | ||
| 1377 | $x =~ s@/\*.*?\*/@@gos; # strip comments. | ||
| 1368 | while (($x =~ /\(*.\)\s*;$/) || ($x =~ /\[*.\]\s*;$/)) { | 1378 | while (($x =~ /\(*.\)\s*;$/) || ($x =~ /\[*.\]\s*;$/)) { |
| 1369 | $x =~ s/\(*.\)\s*;$/;/; | 1379 | $x =~ s/\(*.\)\s*;$/;/; |
| 1370 | $x =~ s/\[*.\]\s*;$/;/; | 1380 | $x =~ s/\[*.\]\s*;$/;/; |
| @@ -1420,7 +1430,7 @@ sub create_parameterlist($$$) { | |||
| 1420 | $type = $arg; | 1430 | $type = $arg; |
| 1421 | $type =~ s/([^\(]+\(\*)$param/$1/; | 1431 | $type =~ s/([^\(]+\(\*)$param/$1/; |
| 1422 | push_parameter($param, $type, $file); | 1432 | push_parameter($param, $type, $file); |
| 1423 | } else { | 1433 | } elsif ($arg) { |
| 1424 | $arg =~ s/\s*:\s*/:/g; | 1434 | $arg =~ s/\s*:\s*/:/g; |
| 1425 | $arg =~ s/\s*\[/\[/g; | 1435 | $arg =~ s/\s*\[/\[/g; |
| 1426 | 1436 | ||
| @@ -1628,7 +1638,6 @@ sub process_state3_type($$) { | |||
| 1628 | my $x = shift; | 1638 | my $x = shift; |
| 1629 | my $file = shift; | 1639 | my $file = shift; |
| 1630 | 1640 | ||
| 1631 | $x =~ s@/\*.*?\*/@@gos; # strip comments. | ||
| 1632 | $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. | 1641 | $x =~ s@[\r\n]+@ @gos; # strip newlines/cr's. |
| 1633 | $x =~ s@^\s+@@gos; # strip leading spaces | 1642 | $x =~ s@^\s+@@gos; # strip leading spaces |
| 1634 | $x =~ s@\s+$@@gos; # strip trailing spaces | 1643 | $x =~ s@\s+$@@gos; # strip trailing spaces |
