mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-27 18:27:05 +08:00
Update to kconfig-frontends-3.6.0, Expand the tarball so that we can accept patches against it
git-svn-id: http://svn.code.sf.net/p/nuttx/code/trunk@5327 42af7a65-404d-4744-a932-0658087f49c3
This commit is contained in:
@@ -10,15 +10,14 @@ genromfs-0.5.2.tar.gz
|
|||||||
This tool is also include in the buildroot and can be built automatically
|
This tool is also include in the buildroot and can be built automatically
|
||||||
from the buildroot.
|
from the buildroot.
|
||||||
|
|
||||||
kconfig-frontends-3.3.0-1.tar.gz
|
kconfig-frontends
|
||||||
|
|
||||||
This is a snapshot of the kconfig-frontends tarball taken from
|
This is a snapshot of the kconfig-frontends version 3.6.0 tarball taken
|
||||||
http://ymorin.is-a-geek.org/projects/kconfig-frontends on April 5, 2012.
|
from http://ymorin.is-a-geek.org/projects/kconfig-frontends.
|
||||||
This snapshot is provided so that a working version of the mconf
|
|
||||||
utility is always available.
|
|
||||||
|
|
||||||
General build instructions:
|
General build instructions:
|
||||||
|
|
||||||
|
cd kconfig-frontends
|
||||||
./configure
|
./configure
|
||||||
make
|
make
|
||||||
make install
|
make install
|
||||||
@@ -32,8 +31,8 @@ kconfig-frontends-3.3.0-1.tar.gz
|
|||||||
kconfig-frontends-3.3.0-1-libintl.patch
|
kconfig-frontends-3.3.0-1-libintl.patch
|
||||||
|
|
||||||
The above build instructions did not work for me under my Cygwin
|
The above build instructions did not work for me under my Cygwin
|
||||||
installation. This patch is a awful hack but will successfully
|
installation with kconfig-frontends-4.4.0. This patch is a awful hack
|
||||||
build 'mconf' under Cygwin.
|
but will successfully build 'mconf' under Cygwin.
|
||||||
|
|
||||||
cat kconfig-frontends-3.3.0-1-libintl.patch | patch -p0
|
cat kconfig-frontends-3.3.0-1-libintl.patch | patch -p0
|
||||||
cd kconfig-frontends-3.3.0-1
|
cd kconfig-frontends-3.3.0-1
|
||||||
@@ -44,10 +43,10 @@ kconfig-frontends-3.3.0-1-libintl.patch
|
|||||||
See: http://ymorin.is-a-geek.org/hg/kconfig-frontends/file/tip/docs/known-issues.txt
|
See: http://ymorin.is-a-geek.org/hg/kconfig-frontends/file/tip/docs/known-issues.txt
|
||||||
|
|
||||||
Update: According to the release notes, version 3.6.0 (and above)
|
Update: According to the release notes, version 3.6.0 (and above)
|
||||||
will build on Cygwin with not patches:
|
will build on Cygwin with no patches:
|
||||||
|
|
||||||
http://ymorin.is-a-geek.org/download/kconfig-frontends/
|
http://ymorin.is-a-geek.org/download/kconfig-frontends/
|
||||||
|
|
||||||
kconfig-macos.path
|
kconfig-macos.path
|
||||||
|
|
||||||
This is a patch to make the kconfig-frontends build on Mac OS X.
|
This is a patch to make the kconfig-frontends-3.3.0 build on Mac OS X.
|
||||||
|
|||||||
Binary file not shown.
@@ -0,0 +1,2 @@
|
|||||||
|
3.6.0 a0d271cbfed1dd50278c6b06bead3d00ba0a88f9 Terrified Chipmunk
|
||||||
|
0
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
Authors of kconfig-frontends.
|
||||||
|
|
||||||
|
The developers of the Linux kernel are the original authors of the kconfig
|
||||||
|
parser and frontends. The list is too long to reproduce here, but you can
|
||||||
|
get a pretty complete list from the Linux kernel repository logs:
|
||||||
|
git shortlog scripts/kconfig
|
||||||
|
|
||||||
|
The packaging uses the GNU autotools build system, of which I
|
||||||
|
will not try to list the many authors here.
|
||||||
|
|
||||||
|
The initial packaging was done by:
|
||||||
|
"Yann E. MORIN" <yann.morin.1998@free.fr>
|
||||||
|
|
||||||
|
For a complete list, see the commit-logs of the kconfig repository.
|
||||||
@@ -0,0 +1,357 @@
|
|||||||
|
|
||||||
|
The kconfig parser and frontends are extracted from the Linux kernel
|
||||||
|
source tree, which is covered by the GPLv2 only. As Linus Torvalds puts it:
|
||||||
|
|
||||||
|
> Also note that the only valid version of the GPL as far as the kernel
|
||||||
|
> is concerned is _this_ particular version of the license (ie v2, not
|
||||||
|
> v2.2 or v3.x or whatever), unless explicitly otherwise stated.
|
||||||
|
|
||||||
|
Although the above quote explictly mentions the Linux kernel, it is my
|
||||||
|
understanding that the whole Linux kernel source tree is covered by this
|
||||||
|
sentence, even non-kernel source code. As such, the license that applies
|
||||||
|
to the kconfig parser and frontends, as published in this package, are
|
||||||
|
also covered by this sentence, and available under the GPLv2, and not any
|
||||||
|
other version of the GPL, unless otherwise stated.
|
||||||
|
|
||||||
|
----------------------------------------
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
Version 2, June 1991
|
||||||
|
|
||||||
|
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
|
||||||
|
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
Everyone is permitted to copy and distribute verbatim copies
|
||||||
|
of this license document, but changing it is not allowed.
|
||||||
|
|
||||||
|
Preamble
|
||||||
|
|
||||||
|
The licenses for most software are designed to take away your
|
||||||
|
freedom to share and change it. By contrast, the GNU General Public
|
||||||
|
License is intended to guarantee your freedom to share and change free
|
||||||
|
software--to make sure the software is free for all its users. This
|
||||||
|
General Public License applies to most of the Free Software
|
||||||
|
Foundation's software and to any other program whose authors commit to
|
||||||
|
using it. (Some other Free Software Foundation software is covered by
|
||||||
|
the GNU Library General Public License instead.) You can apply it to
|
||||||
|
your programs, too.
|
||||||
|
|
||||||
|
When we speak of free software, we are referring to freedom, not
|
||||||
|
price. Our General Public Licenses are designed to make sure that you
|
||||||
|
have the freedom to distribute copies of free software (and charge for
|
||||||
|
this service if you wish), that you receive source code or can get it
|
||||||
|
if you want it, that you can change the software or use pieces of it
|
||||||
|
in new free programs; and that you know you can do these things.
|
||||||
|
|
||||||
|
To protect your rights, we need to make restrictions that forbid
|
||||||
|
anyone to deny you these rights or to ask you to surrender the rights.
|
||||||
|
These restrictions translate to certain responsibilities for you if you
|
||||||
|
distribute copies of the software, or if you modify it.
|
||||||
|
|
||||||
|
For example, if you distribute copies of such a program, whether
|
||||||
|
gratis or for a fee, you must give the recipients all the rights that
|
||||||
|
you have. You must make sure that they, too, receive or can get the
|
||||||
|
source code. And you must show them these terms so they know their
|
||||||
|
rights.
|
||||||
|
|
||||||
|
We protect your rights with two steps: (1) copyright the software, and
|
||||||
|
(2) offer you this license which gives you legal permission to copy,
|
||||||
|
distribute and/or modify the software.
|
||||||
|
|
||||||
|
Also, for each author's protection and ours, we want to make certain
|
||||||
|
that everyone understands that there is no warranty for this free
|
||||||
|
software. If the software is modified by someone else and passed on, we
|
||||||
|
want its recipients to know that what they have is not the original, so
|
||||||
|
that any problems introduced by others will not reflect on the original
|
||||||
|
authors' reputations.
|
||||||
|
|
||||||
|
Finally, any free program is threatened constantly by software
|
||||||
|
patents. We wish to avoid the danger that redistributors of a free
|
||||||
|
program will individually obtain patent licenses, in effect making the
|
||||||
|
program proprietary. To prevent this, we have made it clear that any
|
||||||
|
patent must be licensed for everyone's free use or not licensed at all.
|
||||||
|
|
||||||
|
The precise terms and conditions for copying, distribution and
|
||||||
|
modification follow.
|
||||||
|
|
||||||
|
GNU GENERAL PUBLIC LICENSE
|
||||||
|
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
|
||||||
|
|
||||||
|
0. This License applies to any program or other work which contains
|
||||||
|
a notice placed by the copyright holder saying it may be distributed
|
||||||
|
under the terms of this General Public License. The "Program", below,
|
||||||
|
refers to any such program or work, and a "work based on the Program"
|
||||||
|
means either the Program or any derivative work under copyright law:
|
||||||
|
that is to say, a work containing the Program or a portion of it,
|
||||||
|
either verbatim or with modifications and/or translated into another
|
||||||
|
language. (Hereinafter, translation is included without limitation in
|
||||||
|
the term "modification".) Each licensee is addressed as "you".
|
||||||
|
|
||||||
|
Activities other than copying, distribution and modification are not
|
||||||
|
covered by this License; they are outside its scope. The act of
|
||||||
|
running the Program is not restricted, and the output from the Program
|
||||||
|
is covered only if its contents constitute a work based on the
|
||||||
|
Program (independent of having been made by running the Program).
|
||||||
|
Whether that is true depends on what the Program does.
|
||||||
|
|
||||||
|
1. You may copy and distribute verbatim copies of the Program's
|
||||||
|
source code as you receive it, in any medium, provided that you
|
||||||
|
conspicuously and appropriately publish on each copy an appropriate
|
||||||
|
copyright notice and disclaimer of warranty; keep intact all the
|
||||||
|
notices that refer to this License and to the absence of any warranty;
|
||||||
|
and give any other recipients of the Program a copy of this License
|
||||||
|
along with the Program.
|
||||||
|
|
||||||
|
You may charge a fee for the physical act of transferring a copy, and
|
||||||
|
you may at your option offer warranty protection in exchange for a fee.
|
||||||
|
|
||||||
|
2. You may modify your copy or copies of the Program or any portion
|
||||||
|
of it, thus forming a work based on the Program, and copy and
|
||||||
|
distribute such modifications or work under the terms of Section 1
|
||||||
|
above, provided that you also meet all of these conditions:
|
||||||
|
|
||||||
|
a) You must cause the modified files to carry prominent notices
|
||||||
|
stating that you changed the files and the date of any change.
|
||||||
|
|
||||||
|
b) You must cause any work that you distribute or publish, that in
|
||||||
|
whole or in part contains or is derived from the Program or any
|
||||||
|
part thereof, to be licensed as a whole at no charge to all third
|
||||||
|
parties under the terms of this License.
|
||||||
|
|
||||||
|
c) If the modified program normally reads commands interactively
|
||||||
|
when run, you must cause it, when started running for such
|
||||||
|
interactive use in the most ordinary way, to print or display an
|
||||||
|
announcement including an appropriate copyright notice and a
|
||||||
|
notice that there is no warranty (or else, saying that you provide
|
||||||
|
a warranty) and that users may redistribute the program under
|
||||||
|
these conditions, and telling the user how to view a copy of this
|
||||||
|
License. (Exception: if the Program itself is interactive but
|
||||||
|
does not normally print such an announcement, your work based on
|
||||||
|
the Program is not required to print an announcement.)
|
||||||
|
|
||||||
|
These requirements apply to the modified work as a whole. If
|
||||||
|
identifiable sections of that work are not derived from the Program,
|
||||||
|
and can be reasonably considered independent and separate works in
|
||||||
|
themselves, then this License, and its terms, do not apply to those
|
||||||
|
sections when you distribute them as separate works. But when you
|
||||||
|
distribute the same sections as part of a whole which is a work based
|
||||||
|
on the Program, the distribution of the whole must be on the terms of
|
||||||
|
this License, whose permissions for other licensees extend to the
|
||||||
|
entire whole, and thus to each and every part regardless of who wrote it.
|
||||||
|
|
||||||
|
Thus, it is not the intent of this section to claim rights or contest
|
||||||
|
your rights to work written entirely by you; rather, the intent is to
|
||||||
|
exercise the right to control the distribution of derivative or
|
||||||
|
collective works based on the Program.
|
||||||
|
|
||||||
|
In addition, mere aggregation of another work not based on the Program
|
||||||
|
with the Program (or with a work based on the Program) on a volume of
|
||||||
|
a storage or distribution medium does not bring the other work under
|
||||||
|
the scope of this License.
|
||||||
|
|
||||||
|
3. You may copy and distribute the Program (or a work based on it,
|
||||||
|
under Section 2) in object code or executable form under the terms of
|
||||||
|
Sections 1 and 2 above provided that you also do one of the following:
|
||||||
|
|
||||||
|
a) Accompany it with the complete corresponding machine-readable
|
||||||
|
source code, which must be distributed under the terms of Sections
|
||||||
|
1 and 2 above on a medium customarily used for software interchange; or,
|
||||||
|
|
||||||
|
b) Accompany it with a written offer, valid for at least three
|
||||||
|
years, to give any third party, for a charge no more than your
|
||||||
|
cost of physically performing source distribution, a complete
|
||||||
|
machine-readable copy of the corresponding source code, to be
|
||||||
|
distributed under the terms of Sections 1 and 2 above on a medium
|
||||||
|
customarily used for software interchange; or,
|
||||||
|
|
||||||
|
c) Accompany it with the information you received as to the offer
|
||||||
|
to distribute corresponding source code. (This alternative is
|
||||||
|
allowed only for noncommercial distribution and only if you
|
||||||
|
received the program in object code or executable form with such
|
||||||
|
an offer, in accord with Subsection b above.)
|
||||||
|
|
||||||
|
The source code for a work means the preferred form of the work for
|
||||||
|
making modifications to it. For an executable work, complete source
|
||||||
|
code means all the source code for all modules it contains, plus any
|
||||||
|
associated interface definition files, plus the scripts used to
|
||||||
|
control compilation and installation of the executable. However, as a
|
||||||
|
special exception, the source code distributed need not include
|
||||||
|
anything that is normally distributed (in either source or binary
|
||||||
|
form) with the major components (compiler, kernel, and so on) of the
|
||||||
|
operating system on which the executable runs, unless that component
|
||||||
|
itself accompanies the executable.
|
||||||
|
|
||||||
|
If distribution of executable or object code is made by offering
|
||||||
|
access to copy from a designated place, then offering equivalent
|
||||||
|
access to copy the source code from the same place counts as
|
||||||
|
distribution of the source code, even though third parties are not
|
||||||
|
compelled to copy the source along with the object code.
|
||||||
|
|
||||||
|
4. You may not copy, modify, sublicense, or distribute the Program
|
||||||
|
except as expressly provided under this License. Any attempt
|
||||||
|
otherwise to copy, modify, sublicense or distribute the Program is
|
||||||
|
void, and will automatically terminate your rights under this License.
|
||||||
|
However, parties who have received copies, or rights, from you under
|
||||||
|
this License will not have their licenses terminated so long as such
|
||||||
|
parties remain in full compliance.
|
||||||
|
|
||||||
|
5. You are not required to accept this License, since you have not
|
||||||
|
signed it. However, nothing else grants you permission to modify or
|
||||||
|
distribute the Program or its derivative works. These actions are
|
||||||
|
prohibited by law if you do not accept this License. Therefore, by
|
||||||
|
modifying or distributing the Program (or any work based on the
|
||||||
|
Program), you indicate your acceptance of this License to do so, and
|
||||||
|
all its terms and conditions for copying, distributing or modifying
|
||||||
|
the Program or works based on it.
|
||||||
|
|
||||||
|
6. Each time you redistribute the Program (or any work based on the
|
||||||
|
Program), the recipient automatically receives a license from the
|
||||||
|
original licensor to copy, distribute or modify the Program subject to
|
||||||
|
these terms and conditions. You may not impose any further
|
||||||
|
restrictions on the recipients' exercise of the rights granted herein.
|
||||||
|
You are not responsible for enforcing compliance by third parties to
|
||||||
|
this License.
|
||||||
|
|
||||||
|
7. If, as a consequence of a court judgment or allegation of patent
|
||||||
|
infringement or for any other reason (not limited to patent issues),
|
||||||
|
conditions are imposed on you (whether by court order, agreement or
|
||||||
|
otherwise) that contradict the conditions of this License, they do not
|
||||||
|
excuse you from the conditions of this License. If you cannot
|
||||||
|
distribute so as to satisfy simultaneously your obligations under this
|
||||||
|
License and any other pertinent obligations, then as a consequence you
|
||||||
|
may not distribute the Program at all. For example, if a patent
|
||||||
|
license would not permit royalty-free redistribution of the Program by
|
||||||
|
all those who receive copies directly or indirectly through you, then
|
||||||
|
the only way you could satisfy both it and this License would be to
|
||||||
|
refrain entirely from distribution of the Program.
|
||||||
|
|
||||||
|
If any portion of this section is held invalid or unenforceable under
|
||||||
|
any particular circumstance, the balance of the section is intended to
|
||||||
|
apply and the section as a whole is intended to apply in other
|
||||||
|
circumstances.
|
||||||
|
|
||||||
|
It is not the purpose of this section to induce you to infringe any
|
||||||
|
patents or other property right claims or to contest validity of any
|
||||||
|
such claims; this section has the sole purpose of protecting the
|
||||||
|
integrity of the free software distribution system, which is
|
||||||
|
implemented by public license practices. Many people have made
|
||||||
|
generous contributions to the wide range of software distributed
|
||||||
|
through that system in reliance on consistent application of that
|
||||||
|
system; it is up to the author/donor to decide if he or she is willing
|
||||||
|
to distribute software through any other system and a licensee cannot
|
||||||
|
impose that choice.
|
||||||
|
|
||||||
|
This section is intended to make thoroughly clear what is believed to
|
||||||
|
be a consequence of the rest of this License.
|
||||||
|
|
||||||
|
8. If the distribution and/or use of the Program is restricted in
|
||||||
|
certain countries either by patents or by copyrighted interfaces, the
|
||||||
|
original copyright holder who places the Program under this License
|
||||||
|
may add an explicit geographical distribution limitation excluding
|
||||||
|
those countries, so that distribution is permitted only in or among
|
||||||
|
countries not thus excluded. In such case, this License incorporates
|
||||||
|
the limitation as if written in the body of this License.
|
||||||
|
|
||||||
|
9. The Free Software Foundation may publish revised and/or new versions
|
||||||
|
of the General Public License from time to time. Such new versions will
|
||||||
|
be similar in spirit to the present version, but may differ in detail to
|
||||||
|
address new problems or concerns.
|
||||||
|
|
||||||
|
Each version is given a distinguishing version number. If the Program
|
||||||
|
specifies a version number of this License which applies to it and "any
|
||||||
|
later version", you have the option of following the terms and conditions
|
||||||
|
either of that version or of any later version published by the Free
|
||||||
|
Software Foundation. If the Program does not specify a version number of
|
||||||
|
this License, you may choose any version ever published by the Free Software
|
||||||
|
Foundation.
|
||||||
|
|
||||||
|
10. If you wish to incorporate parts of the Program into other free
|
||||||
|
programs whose distribution conditions are different, write to the author
|
||||||
|
to ask for permission. For software which is copyrighted by the Free
|
||||||
|
Software Foundation, write to the Free Software Foundation; we sometimes
|
||||||
|
make exceptions for this. Our decision will be guided by the two goals
|
||||||
|
of preserving the free status of all derivatives of our free software and
|
||||||
|
of promoting the sharing and reuse of software generally.
|
||||||
|
|
||||||
|
NO WARRANTY
|
||||||
|
|
||||||
|
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
|
||||||
|
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
|
||||||
|
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
|
||||||
|
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
|
||||||
|
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
|
||||||
|
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
|
||||||
|
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
|
||||||
|
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
|
||||||
|
REPAIR OR CORRECTION.
|
||||||
|
|
||||||
|
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||||
|
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
|
||||||
|
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
|
||||||
|
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
|
||||||
|
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
|
||||||
|
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
|
||||||
|
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
|
||||||
|
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
|
||||||
|
POSSIBILITY OF SUCH DAMAGES.
|
||||||
|
|
||||||
|
END OF TERMS AND CONDITIONS
|
||||||
|
|
||||||
|
How to Apply These Terms to Your New Programs
|
||||||
|
|
||||||
|
If you develop a new program, and you want it to be of the greatest
|
||||||
|
possible use to the public, the best way to achieve this is to make it
|
||||||
|
free software which everyone can redistribute and change under these terms.
|
||||||
|
|
||||||
|
To do so, attach the following notices to the program. It is safest
|
||||||
|
to attach them to the start of each source file to most effectively
|
||||||
|
convey the exclusion of warranty; and each file should have at least
|
||||||
|
the "copyright" line and a pointer to where the full notice is found.
|
||||||
|
|
||||||
|
<one line to give the program's name and a brief idea of what it does.>
|
||||||
|
Copyright (C) <year> <name of author>
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2 of the License, or
|
||||||
|
(at your option) any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
||||||
|
|
||||||
|
|
||||||
|
Also add information on how to contact you by electronic and paper mail.
|
||||||
|
|
||||||
|
If the program is interactive, make it output a short notice like this
|
||||||
|
when it starts in an interactive mode:
|
||||||
|
|
||||||
|
Gnomovision version 69, Copyright (C) year name of author
|
||||||
|
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||||
|
This is free software, and you are welcome to redistribute it
|
||||||
|
under certain conditions; type `show c' for details.
|
||||||
|
|
||||||
|
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||||
|
parts of the General Public License. Of course, the commands you use may
|
||||||
|
be called something other than `show w' and `show c'; they could even be
|
||||||
|
mouse-clicks or menu items--whatever suits your program.
|
||||||
|
|
||||||
|
You should also get your employer (if you work as a programmer) or your
|
||||||
|
school, if any, to sign a "copyright disclaimer" for the program, if
|
||||||
|
necessary. Here is a sample; alter the names:
|
||||||
|
|
||||||
|
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
|
||||||
|
`Gnomovision' (which makes passes at compilers) written by James Hacker.
|
||||||
|
|
||||||
|
<signature of Ty Coon>, 1 April 1989
|
||||||
|
Ty Coon, President of Vice
|
||||||
|
|
||||||
|
This General Public License does not permit incorporating your program into
|
||||||
|
proprietary programs. If your program is a subroutine library, you may
|
||||||
|
consider it more useful to permit linking proprietary applications with the
|
||||||
|
library. If this is what you want to do, use the GNU Library General
|
||||||
|
Public License instead of this License.
|
||||||
@@ -0,0 +1,365 @@
|
|||||||
|
Installation Instructions
|
||||||
|
*************************
|
||||||
|
|
||||||
|
Copyright (C) 1994, 1995, 1996, 1999, 2000, 2001, 2002, 2004, 2005,
|
||||||
|
2006, 2007, 2008, 2009 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
Copying and distribution of this file, with or without modification,
|
||||||
|
are permitted in any medium without royalty provided the copyright
|
||||||
|
notice and this notice are preserved. This file is offered as-is,
|
||||||
|
without warranty of any kind.
|
||||||
|
|
||||||
|
Basic Installation
|
||||||
|
==================
|
||||||
|
|
||||||
|
Briefly, the shell commands `./configure; make; make install' should
|
||||||
|
configure, build, and install this package. The following
|
||||||
|
more-detailed instructions are generic; see the `README' file for
|
||||||
|
instructions specific to this package. Some packages provide this
|
||||||
|
`INSTALL' file but do not implement all of the features documented
|
||||||
|
below. The lack of an optional feature in a given package is not
|
||||||
|
necessarily a bug. More recommendations for GNU packages can be found
|
||||||
|
in *note Makefile Conventions: (standards)Makefile Conventions.
|
||||||
|
|
||||||
|
The `configure' shell script attempts to guess correct values for
|
||||||
|
various system-dependent variables used during compilation. It uses
|
||||||
|
those values to create a `Makefile' in each directory of the package.
|
||||||
|
It may also create one or more `.h' files containing system-dependent
|
||||||
|
definitions. Finally, it creates a shell script `config.status' that
|
||||||
|
you can run in the future to recreate the current configuration, and a
|
||||||
|
file `config.log' containing compiler output (useful mainly for
|
||||||
|
debugging `configure').
|
||||||
|
|
||||||
|
It can also use an optional file (typically called `config.cache'
|
||||||
|
and enabled with `--cache-file=config.cache' or simply `-C') that saves
|
||||||
|
the results of its tests to speed up reconfiguring. Caching is
|
||||||
|
disabled by default to prevent problems with accidental use of stale
|
||||||
|
cache files.
|
||||||
|
|
||||||
|
If you need to do unusual things to compile the package, please try
|
||||||
|
to figure out how `configure' could check whether to do them, and mail
|
||||||
|
diffs or instructions to the address given in the `README' so they can
|
||||||
|
be considered for the next release. If you are using the cache, and at
|
||||||
|
some point `config.cache' contains results you don't want to keep, you
|
||||||
|
may remove or edit it.
|
||||||
|
|
||||||
|
The file `configure.ac' (or `configure.in') is used to create
|
||||||
|
`configure' by a program called `autoconf'. You need `configure.ac' if
|
||||||
|
you want to change it or regenerate `configure' using a newer version
|
||||||
|
of `autoconf'.
|
||||||
|
|
||||||
|
The simplest way to compile this package is:
|
||||||
|
|
||||||
|
1. `cd' to the directory containing the package's source code and type
|
||||||
|
`./configure' to configure the package for your system.
|
||||||
|
|
||||||
|
Running `configure' might take a while. While running, it prints
|
||||||
|
some messages telling which features it is checking for.
|
||||||
|
|
||||||
|
2. Type `make' to compile the package.
|
||||||
|
|
||||||
|
3. Optionally, type `make check' to run any self-tests that come with
|
||||||
|
the package, generally using the just-built uninstalled binaries.
|
||||||
|
|
||||||
|
4. Type `make install' to install the programs and any data files and
|
||||||
|
documentation. When installing into a prefix owned by root, it is
|
||||||
|
recommended that the package be configured and built as a regular
|
||||||
|
user, and only the `make install' phase executed with root
|
||||||
|
privileges.
|
||||||
|
|
||||||
|
5. Optionally, type `make installcheck' to repeat any self-tests, but
|
||||||
|
this time using the binaries in their final installed location.
|
||||||
|
This target does not install anything. Running this target as a
|
||||||
|
regular user, particularly if the prior `make install' required
|
||||||
|
root privileges, verifies that the installation completed
|
||||||
|
correctly.
|
||||||
|
|
||||||
|
6. You can remove the program binaries and object files from the
|
||||||
|
source code directory by typing `make clean'. To also remove the
|
||||||
|
files that `configure' created (so you can compile the package for
|
||||||
|
a different kind of computer), type `make distclean'. There is
|
||||||
|
also a `make maintainer-clean' target, but that is intended mainly
|
||||||
|
for the package's developers. If you use it, you may have to get
|
||||||
|
all sorts of other programs in order to regenerate files that came
|
||||||
|
with the distribution.
|
||||||
|
|
||||||
|
7. Often, you can also type `make uninstall' to remove the installed
|
||||||
|
files again. In practice, not all packages have tested that
|
||||||
|
uninstallation works correctly, even though it is required by the
|
||||||
|
GNU Coding Standards.
|
||||||
|
|
||||||
|
8. Some packages, particularly those that use Automake, provide `make
|
||||||
|
distcheck', which can by used by developers to test that all other
|
||||||
|
targets like `make install' and `make uninstall' work correctly.
|
||||||
|
This target is generally not run by end users.
|
||||||
|
|
||||||
|
Compilers and Options
|
||||||
|
=====================
|
||||||
|
|
||||||
|
Some systems require unusual options for compilation or linking that
|
||||||
|
the `configure' script does not know about. Run `./configure --help'
|
||||||
|
for details on some of the pertinent environment variables.
|
||||||
|
|
||||||
|
You can give `configure' initial values for configuration parameters
|
||||||
|
by setting variables in the command line or in the environment. Here
|
||||||
|
is an example:
|
||||||
|
|
||||||
|
./configure CC=c99 CFLAGS=-g LIBS=-lposix
|
||||||
|
|
||||||
|
*Note Defining Variables::, for more details.
|
||||||
|
|
||||||
|
Compiling For Multiple Architectures
|
||||||
|
====================================
|
||||||
|
|
||||||
|
You can compile the package for more than one kind of computer at the
|
||||||
|
same time, by placing the object files for each architecture in their
|
||||||
|
own directory. To do this, you can use GNU `make'. `cd' to the
|
||||||
|
directory where you want the object files and executables to go and run
|
||||||
|
the `configure' script. `configure' automatically checks for the
|
||||||
|
source code in the directory that `configure' is in and in `..'. This
|
||||||
|
is known as a "VPATH" build.
|
||||||
|
|
||||||
|
With a non-GNU `make', it is safer to compile the package for one
|
||||||
|
architecture at a time in the source code directory. After you have
|
||||||
|
installed the package for one architecture, use `make distclean' before
|
||||||
|
reconfiguring for another architecture.
|
||||||
|
|
||||||
|
On MacOS X 10.5 and later systems, you can create libraries and
|
||||||
|
executables that work on multiple system types--known as "fat" or
|
||||||
|
"universal" binaries--by specifying multiple `-arch' options to the
|
||||||
|
compiler but only a single `-arch' option to the preprocessor. Like
|
||||||
|
this:
|
||||||
|
|
||||||
|
./configure CC="gcc -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CXX="g++ -arch i386 -arch x86_64 -arch ppc -arch ppc64" \
|
||||||
|
CPP="gcc -E" CXXCPP="g++ -E"
|
||||||
|
|
||||||
|
This is not guaranteed to produce working output in all cases, you
|
||||||
|
may have to build one architecture at a time and combine the results
|
||||||
|
using the `lipo' tool if you have problems.
|
||||||
|
|
||||||
|
Installation Names
|
||||||
|
==================
|
||||||
|
|
||||||
|
By default, `make install' installs the package's commands under
|
||||||
|
`/usr/local/bin', include files under `/usr/local/include', etc. You
|
||||||
|
can specify an installation prefix other than `/usr/local' by giving
|
||||||
|
`configure' the option `--prefix=PREFIX', where PREFIX must be an
|
||||||
|
absolute file name.
|
||||||
|
|
||||||
|
You can specify separate installation prefixes for
|
||||||
|
architecture-specific files and architecture-independent files. If you
|
||||||
|
pass the option `--exec-prefix=PREFIX' to `configure', the package uses
|
||||||
|
PREFIX as the prefix for installing programs and libraries.
|
||||||
|
Documentation and other data files still use the regular prefix.
|
||||||
|
|
||||||
|
In addition, if you use an unusual directory layout you can give
|
||||||
|
options like `--bindir=DIR' to specify different values for particular
|
||||||
|
kinds of files. Run `configure --help' for a list of the directories
|
||||||
|
you can set and what kinds of files go in them. In general, the
|
||||||
|
default for these options is expressed in terms of `${prefix}', so that
|
||||||
|
specifying just `--prefix' will affect all of the other directory
|
||||||
|
specifications that were not explicitly provided.
|
||||||
|
|
||||||
|
The most portable way to affect installation locations is to pass the
|
||||||
|
correct locations to `configure'; however, many packages provide one or
|
||||||
|
both of the following shortcuts of passing variable assignments to the
|
||||||
|
`make install' command line to change installation locations without
|
||||||
|
having to reconfigure or recompile.
|
||||||
|
|
||||||
|
The first method involves providing an override variable for each
|
||||||
|
affected directory. For example, `make install
|
||||||
|
prefix=/alternate/directory' will choose an alternate location for all
|
||||||
|
directory configuration variables that were expressed in terms of
|
||||||
|
`${prefix}'. Any directories that were specified during `configure',
|
||||||
|
but not in terms of `${prefix}', must each be overridden at install
|
||||||
|
time for the entire installation to be relocated. The approach of
|
||||||
|
makefile variable overrides for each directory variable is required by
|
||||||
|
the GNU Coding Standards, and ideally causes no recompilation.
|
||||||
|
However, some platforms have known limitations with the semantics of
|
||||||
|
shared libraries that end up requiring recompilation when using this
|
||||||
|
method, particularly noticeable in packages that use GNU Libtool.
|
||||||
|
|
||||||
|
The second method involves providing the `DESTDIR' variable. For
|
||||||
|
example, `make install DESTDIR=/alternate/directory' will prepend
|
||||||
|
`/alternate/directory' before all installation names. The approach of
|
||||||
|
`DESTDIR' overrides is not required by the GNU Coding Standards, and
|
||||||
|
does not work on platforms that have drive letters. On the other hand,
|
||||||
|
it does better at avoiding recompilation issues, and works well even
|
||||||
|
when some directory options were not specified in terms of `${prefix}'
|
||||||
|
at `configure' time.
|
||||||
|
|
||||||
|
Optional Features
|
||||||
|
=================
|
||||||
|
|
||||||
|
If the package supports it, you can cause programs to be installed
|
||||||
|
with an extra prefix or suffix on their names by giving `configure' the
|
||||||
|
option `--program-prefix=PREFIX' or `--program-suffix=SUFFIX'.
|
||||||
|
|
||||||
|
Some packages pay attention to `--enable-FEATURE' options to
|
||||||
|
`configure', where FEATURE indicates an optional part of the package.
|
||||||
|
They may also pay attention to `--with-PACKAGE' options, where PACKAGE
|
||||||
|
is something like `gnu-as' or `x' (for the X Window System). The
|
||||||
|
`README' should mention any `--enable-' and `--with-' options that the
|
||||||
|
package recognizes.
|
||||||
|
|
||||||
|
For packages that use the X Window System, `configure' can usually
|
||||||
|
find the X include and library files automatically, but if it doesn't,
|
||||||
|
you can use the `configure' options `--x-includes=DIR' and
|
||||||
|
`--x-libraries=DIR' to specify their locations.
|
||||||
|
|
||||||
|
Some packages offer the ability to configure how verbose the
|
||||||
|
execution of `make' will be. For these packages, running `./configure
|
||||||
|
--enable-silent-rules' sets the default to minimal output, which can be
|
||||||
|
overridden with `make V=1'; while running `./configure
|
||||||
|
--disable-silent-rules' sets the default to verbose, which can be
|
||||||
|
overridden with `make V=0'.
|
||||||
|
|
||||||
|
Particular systems
|
||||||
|
==================
|
||||||
|
|
||||||
|
On HP-UX, the default C compiler is not ANSI C compatible. If GNU
|
||||||
|
CC is not installed, it is recommended to use the following options in
|
||||||
|
order to use an ANSI C compiler:
|
||||||
|
|
||||||
|
./configure CC="cc -Ae -D_XOPEN_SOURCE=500"
|
||||||
|
|
||||||
|
and if that doesn't work, install pre-built binaries of GCC for HP-UX.
|
||||||
|
|
||||||
|
On OSF/1 a.k.a. Tru64, some versions of the default C compiler cannot
|
||||||
|
parse its `<wchar.h>' header file. The option `-nodtk' can be used as
|
||||||
|
a workaround. If GNU CC is not installed, it is therefore recommended
|
||||||
|
to try
|
||||||
|
|
||||||
|
./configure CC="cc"
|
||||||
|
|
||||||
|
and if that doesn't work, try
|
||||||
|
|
||||||
|
./configure CC="cc -nodtk"
|
||||||
|
|
||||||
|
On Solaris, don't put `/usr/ucb' early in your `PATH'. This
|
||||||
|
directory contains several dysfunctional programs; working variants of
|
||||||
|
these programs are available in `/usr/bin'. So, if you need `/usr/ucb'
|
||||||
|
in your `PATH', put it _after_ `/usr/bin'.
|
||||||
|
|
||||||
|
On Haiku, software installed for all users goes in `/boot/common',
|
||||||
|
not `/usr/local'. It is recommended to use the following options:
|
||||||
|
|
||||||
|
./configure --prefix=/boot/common
|
||||||
|
|
||||||
|
Specifying the System Type
|
||||||
|
==========================
|
||||||
|
|
||||||
|
There may be some features `configure' cannot figure out
|
||||||
|
automatically, but needs to determine by the type of machine the package
|
||||||
|
will run on. Usually, assuming the package is built to be run on the
|
||||||
|
_same_ architectures, `configure' can figure that out, but if it prints
|
||||||
|
a message saying it cannot guess the machine type, give it the
|
||||||
|
`--build=TYPE' option. TYPE can either be a short name for the system
|
||||||
|
type, such as `sun4', or a canonical name which has the form:
|
||||||
|
|
||||||
|
CPU-COMPANY-SYSTEM
|
||||||
|
|
||||||
|
where SYSTEM can have one of these forms:
|
||||||
|
|
||||||
|
OS
|
||||||
|
KERNEL-OS
|
||||||
|
|
||||||
|
See the file `config.sub' for the possible values of each field. If
|
||||||
|
`config.sub' isn't included in this package, then this package doesn't
|
||||||
|
need to know the machine type.
|
||||||
|
|
||||||
|
If you are _building_ compiler tools for cross-compiling, you should
|
||||||
|
use the option `--target=TYPE' to select the type of system they will
|
||||||
|
produce code for.
|
||||||
|
|
||||||
|
If you want to _use_ a cross compiler, that generates code for a
|
||||||
|
platform different from the build platform, you should specify the
|
||||||
|
"host" platform (i.e., that on which the generated programs will
|
||||||
|
eventually be run) with `--host=TYPE'.
|
||||||
|
|
||||||
|
Sharing Defaults
|
||||||
|
================
|
||||||
|
|
||||||
|
If you want to set default values for `configure' scripts to share,
|
||||||
|
you can create a site shell script called `config.site' that gives
|
||||||
|
default values for variables like `CC', `cache_file', and `prefix'.
|
||||||
|
`configure' looks for `PREFIX/share/config.site' if it exists, then
|
||||||
|
`PREFIX/etc/config.site' if it exists. Or, you can set the
|
||||||
|
`CONFIG_SITE' environment variable to the location of the site script.
|
||||||
|
A warning: not all `configure' scripts look for a site script.
|
||||||
|
|
||||||
|
Defining Variables
|
||||||
|
==================
|
||||||
|
|
||||||
|
Variables not defined in a site shell script can be set in the
|
||||||
|
environment passed to `configure'. However, some packages may run
|
||||||
|
configure again during the build, and the customized values of these
|
||||||
|
variables may be lost. In order to avoid this problem, you should set
|
||||||
|
them in the `configure' command line, using `VAR=value'. For example:
|
||||||
|
|
||||||
|
./configure CC=/usr/local2/bin/gcc
|
||||||
|
|
||||||
|
causes the specified `gcc' to be used as the C compiler (unless it is
|
||||||
|
overridden in the site shell script).
|
||||||
|
|
||||||
|
Unfortunately, this technique does not work for `CONFIG_SHELL' due to
|
||||||
|
an Autoconf bug. Until the bug is fixed you can use this workaround:
|
||||||
|
|
||||||
|
CONFIG_SHELL=/bin/bash /bin/bash ./configure CONFIG_SHELL=/bin/bash
|
||||||
|
|
||||||
|
`configure' Invocation
|
||||||
|
======================
|
||||||
|
|
||||||
|
`configure' recognizes the following options to control how it
|
||||||
|
operates.
|
||||||
|
|
||||||
|
`--help'
|
||||||
|
`-h'
|
||||||
|
Print a summary of all of the options to `configure', and exit.
|
||||||
|
|
||||||
|
`--help=short'
|
||||||
|
`--help=recursive'
|
||||||
|
Print a summary of the options unique to this package's
|
||||||
|
`configure', and exit. The `short' variant lists options used
|
||||||
|
only in the top level, while the `recursive' variant lists options
|
||||||
|
also present in any nested packages.
|
||||||
|
|
||||||
|
`--version'
|
||||||
|
`-V'
|
||||||
|
Print the version of Autoconf used to generate the `configure'
|
||||||
|
script, and exit.
|
||||||
|
|
||||||
|
`--cache-file=FILE'
|
||||||
|
Enable the cache: use and save the results of the tests in FILE,
|
||||||
|
traditionally `config.cache'. FILE defaults to `/dev/null' to
|
||||||
|
disable caching.
|
||||||
|
|
||||||
|
`--config-cache'
|
||||||
|
`-C'
|
||||||
|
Alias for `--cache-file=config.cache'.
|
||||||
|
|
||||||
|
`--quiet'
|
||||||
|
`--silent'
|
||||||
|
`-q'
|
||||||
|
Do not print messages saying which checks are being made. To
|
||||||
|
suppress all normal output, redirect it to `/dev/null' (any error
|
||||||
|
messages will still be shown).
|
||||||
|
|
||||||
|
`--srcdir=DIR'
|
||||||
|
Look for the package's source code in directory DIR. Usually
|
||||||
|
`configure' can determine that directory automatically.
|
||||||
|
|
||||||
|
`--prefix=DIR'
|
||||||
|
Use DIR as the installation prefix. *note Installation Names::
|
||||||
|
for more details, including other options available for fine-tuning
|
||||||
|
the installation locations.
|
||||||
|
|
||||||
|
`--no-create'
|
||||||
|
`-n'
|
||||||
|
Run the configure checks, but stop before creating any output
|
||||||
|
files.
|
||||||
|
|
||||||
|
`configure' also accepts some other, not widely useful, options. Run
|
||||||
|
`configure --help' for more details.
|
||||||
|
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
ACLOCAL_AMFLAGS = -I scripts/.autostuff/m4
|
||||||
|
MAKEFLAGS = $(SILENT_MAKEFLAGS)
|
||||||
|
if COND_utils
|
||||||
|
MAYBE_utils = utils
|
||||||
|
endif
|
||||||
|
SUBDIRS = docs libs frontends scripts $(MAYBE_utils)
|
||||||
|
EXTRA_DIST = bootstrap .version
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,39 @@
|
|||||||
|
This package contains the kconfig frontends and parser.
|
||||||
|
|
||||||
|
Kconfig is the configuration language used by the Linux kernel. This package
|
||||||
|
is a simple copy of the frontends and the parser found in the Linux kernel
|
||||||
|
source tree, with very minor changes to adapt them to being built out of
|
||||||
|
the kernel build infrastructure.
|
||||||
|
|
||||||
|
This package does *not* take any change to the parser or frontends. Such
|
||||||
|
changes shall be directed directly to the appropriate mailing list, and they
|
||||||
|
will eventually find their way is this package at the next sync:
|
||||||
|
mailto:linux-kbuild@vger.kernel.org
|
||||||
|
|
||||||
|
However, if there is a bug in the packaging infrastructure, patches are
|
||||||
|
most welcome, of course! Most notably, because this is my very first
|
||||||
|
autostuff-based package, I may have done mistakes here and there...
|
||||||
|
|
||||||
|
As such, there are currently a few known limitations:
|
||||||
|
|
||||||
|
- statically linking is much, much more complex than it should be. I have
|
||||||
|
been seemingly able to build part of the frontends with such incantations
|
||||||
|
of ./configure and make:
|
||||||
|
./configure LDFLAGS=-static nconf_EXTRA_LIBS=-lgpm \
|
||||||
|
--disable-shared --enable-static \
|
||||||
|
--disable-gconf --disable-qconf
|
||||||
|
make LDFLAGS="-all-static -static-libtool-libs"
|
||||||
|
|
||||||
|
- the nconf frontends requires (at least on my machine) to be linked against
|
||||||
|
GPM; this is not detected when staticaly linking (hence the nconf_EXTRA_LIBS
|
||||||
|
in the command above).
|
||||||
|
|
||||||
|
- statically linking the graphical frontends (gconf and qconf) is *not*
|
||||||
|
supported: I am missing static libs for Qt3Support, so qconf does not link.
|
||||||
|
And there is a stupid bug in libtool that prevents properly linking against
|
||||||
|
installed static libraries (seemingly fixed in 2.4, but not quite yet, in
|
||||||
|
fact...), so gconf does not link. That's why they are disabled above.
|
||||||
|
|
||||||
|
Note that, provided you have the required dependencies, all frontends are
|
||||||
|
properly built if you link dynamicaly. The following just works as expected:
|
||||||
|
./configure && make
|
||||||
+9137
File diff suppressed because it is too large
Load Diff
Executable
+22
@@ -0,0 +1,22 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
set -e
|
||||||
|
|
||||||
|
printf "Running libtoolize...\n"
|
||||||
|
libtoolize --copy --force
|
||||||
|
|
||||||
|
printf "Running aclocal...\n"
|
||||||
|
aclocal -Wall --force
|
||||||
|
|
||||||
|
printf "Running autoconf...\n"
|
||||||
|
autoconf -Wall --force
|
||||||
|
|
||||||
|
printf "Running autoheader...\n"
|
||||||
|
autoheader -Wall --force
|
||||||
|
|
||||||
|
printf "Running automake...\n"
|
||||||
|
automake --foreign --add-missing --copy -Wall --force
|
||||||
|
|
||||||
|
# Cleanup the mess... :-(
|
||||||
|
rm -rf autom4te.cache
|
||||||
|
|
||||||
|
printf "Done. You may now run:\n ./configure\n"
|
||||||
+20052
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1 @@
|
|||||||
|
dist_doc_DATA = kconfig-language.txt kconfig.txt
|
||||||
@@ -0,0 +1,452 @@
|
|||||||
|
# Makefile.in generated by automake 1.11.1 from Makefile.am.
|
||||||
|
# @configure_input@
|
||||||
|
|
||||||
|
# Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
|
||||||
|
# 2003, 2004, 2005, 2006, 2007, 2008, 2009 Free Software Foundation,
|
||||||
|
# Inc.
|
||||||
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
|
# gives unlimited permission to copy and/or distribute it,
|
||||||
|
# with or without modifications, as long as this notice is preserved.
|
||||||
|
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY, to the extent permitted by law; without
|
||||||
|
# even the implied warranty of MERCHANTABILITY or FITNESS FOR A
|
||||||
|
# PARTICULAR PURPOSE.
|
||||||
|
|
||||||
|
@SET_MAKE@
|
||||||
|
|
||||||
|
VPATH = @srcdir@
|
||||||
|
pkgdatadir = $(datadir)/@PACKAGE@
|
||||||
|
pkgincludedir = $(includedir)/@PACKAGE@
|
||||||
|
pkglibdir = $(libdir)/@PACKAGE@
|
||||||
|
pkglibexecdir = $(libexecdir)/@PACKAGE@
|
||||||
|
am__cd = CDPATH="$${ZSH_VERSION+.}$(PATH_SEPARATOR)" && cd
|
||||||
|
install_sh_DATA = $(install_sh) -c -m 644
|
||||||
|
install_sh_PROGRAM = $(install_sh) -c
|
||||||
|
install_sh_SCRIPT = $(install_sh) -c
|
||||||
|
INSTALL_HEADER = $(INSTALL_DATA)
|
||||||
|
transform = $(program_transform_name)
|
||||||
|
NORMAL_INSTALL = :
|
||||||
|
PRE_INSTALL = :
|
||||||
|
POST_INSTALL = :
|
||||||
|
NORMAL_UNINSTALL = :
|
||||||
|
PRE_UNINSTALL = :
|
||||||
|
POST_UNINSTALL = :
|
||||||
|
build_triplet = @build@
|
||||||
|
host_triplet = @host@
|
||||||
|
subdir = docs
|
||||||
|
DIST_COMMON = $(dist_doc_DATA) $(srcdir)/Makefile.am \
|
||||||
|
$(srcdir)/Makefile.in
|
||||||
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
|
am__aclocal_m4_deps = $(top_srcdir)/configure.ac
|
||||||
|
am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
|
||||||
|
$(ACLOCAL_M4)
|
||||||
|
mkinstalldirs = $(install_sh) -d
|
||||||
|
CONFIG_HEADER = $(top_builddir)/scripts/.autostuff/config.h
|
||||||
|
CONFIG_CLEAN_FILES =
|
||||||
|
CONFIG_CLEAN_VPATH_FILES =
|
||||||
|
AM_V_GEN = $(am__v_GEN_$(V))
|
||||||
|
am__v_GEN_ = $(am__v_GEN_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
am__v_GEN_0 = @echo " GEN " $@;
|
||||||
|
AM_V_at = $(am__v_at_$(V))
|
||||||
|
am__v_at_ = $(am__v_at_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
am__v_at_0 = @
|
||||||
|
SOURCES =
|
||||||
|
DIST_SOURCES =
|
||||||
|
am__vpath_adj_setup = srcdirstrip=`echo "$(srcdir)" | sed 's|.|.|g'`;
|
||||||
|
am__vpath_adj = case $$p in \
|
||||||
|
$(srcdir)/*) f=`echo "$$p" | sed "s|^$$srcdirstrip/||"`;; \
|
||||||
|
*) f=$$p;; \
|
||||||
|
esac;
|
||||||
|
am__strip_dir = f=`echo $$p | sed -e 's|^.*/||'`;
|
||||||
|
am__install_max = 40
|
||||||
|
am__nobase_strip_setup = \
|
||||||
|
srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*|]/\\\\&/g'`
|
||||||
|
am__nobase_strip = \
|
||||||
|
for p in $$list; do echo "$$p"; done | sed -e "s|$$srcdirstrip/||"
|
||||||
|
am__nobase_list = $(am__nobase_strip_setup); \
|
||||||
|
for p in $$list; do echo "$$p $$p"; done | \
|
||||||
|
sed "s| $$srcdirstrip/| |;"' / .*\//!s/ .*/ ./; s,\( .*\)/[^/]*$$,\1,' | \
|
||||||
|
$(AWK) 'BEGIN { files["."] = "" } { files[$$2] = files[$$2] " " $$1; \
|
||||||
|
if (++n[$$2] == $(am__install_max)) \
|
||||||
|
{ print $$2, files[$$2]; n[$$2] = 0; files[$$2] = "" } } \
|
||||||
|
END { for (dir in files) print dir, files[dir] }'
|
||||||
|
am__base_list = \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;$$!N;s/\n/ /g' | \
|
||||||
|
sed '$$!N;$$!N;$$!N;$$!N;s/\n/ /g'
|
||||||
|
am__installdirs = "$(DESTDIR)$(docdir)"
|
||||||
|
DATA = $(dist_doc_DATA)
|
||||||
|
DISTFILES = $(DIST_COMMON) $(DIST_SOURCES) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
|
ACLOCAL = @ACLOCAL@
|
||||||
|
ALLOCA = @ALLOCA@
|
||||||
|
AMTAR = @AMTAR@
|
||||||
|
AM_DEFAULT_VERBOSITY = @AM_DEFAULT_VERBOSITY@
|
||||||
|
AM_LFLAGS = @AM_LFLAGS@
|
||||||
|
AM_YFLAGS = @AM_YFLAGS@
|
||||||
|
AR = @AR@
|
||||||
|
AUTOCONF = @AUTOCONF@
|
||||||
|
AUTOHEADER = @AUTOHEADER@
|
||||||
|
AUTOMAKE = @AUTOMAKE@
|
||||||
|
AWK = @AWK@
|
||||||
|
CC = @CC@
|
||||||
|
CCDEPMODE = @CCDEPMODE@
|
||||||
|
CFLAGS = @CFLAGS@
|
||||||
|
CPP = @CPP@
|
||||||
|
CPPFLAGS = @CPPFLAGS@
|
||||||
|
CURSES_LOC = @CURSES_LOC@
|
||||||
|
CXX = @CXX@
|
||||||
|
CXXCPP = @CXXCPP@
|
||||||
|
CXXDEPMODE = @CXXDEPMODE@
|
||||||
|
CXXFLAGS = @CXXFLAGS@
|
||||||
|
CYGPATH_W = @CYGPATH_W@
|
||||||
|
DEFS = @DEFS@
|
||||||
|
DEPDIR = @DEPDIR@
|
||||||
|
DSYMUTIL = @DSYMUTIL@
|
||||||
|
DUMPBIN = @DUMPBIN@
|
||||||
|
ECHO_C = @ECHO_C@
|
||||||
|
ECHO_N = @ECHO_N@
|
||||||
|
ECHO_T = @ECHO_T@
|
||||||
|
EGREP = @EGREP@
|
||||||
|
EXEEXT = @EXEEXT@
|
||||||
|
FGREP = @FGREP@
|
||||||
|
GPERF = @GPERF@
|
||||||
|
GREP = @GREP@
|
||||||
|
INSTALL = @INSTALL@
|
||||||
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
|
INSTALL_PROGRAM = @INSTALL_PROGRAM@
|
||||||
|
INSTALL_SCRIPT = @INSTALL_SCRIPT@
|
||||||
|
INSTALL_STRIP_PROGRAM = @INSTALL_STRIP_PROGRAM@
|
||||||
|
KCONFIGPARSER_LIB_VERSION = @KCONFIGPARSER_LIB_VERSION@
|
||||||
|
LD = @LD@
|
||||||
|
LDFLAGS = @LDFLAGS@
|
||||||
|
LEX = @LEX@
|
||||||
|
LEXLIB = @LEXLIB@
|
||||||
|
LEX_OUTPUT_ROOT = @LEX_OUTPUT_ROOT@
|
||||||
|
LIBOBJS = @LIBOBJS@
|
||||||
|
LIBS = @LIBS@
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
LIPO = @LIPO@
|
||||||
|
LN_S = @LN_S@
|
||||||
|
LTLIBOBJS = @LTLIBOBJS@
|
||||||
|
MAKEINFO = @MAKEINFO@
|
||||||
|
MKDIR_P = @MKDIR_P@
|
||||||
|
MOC = @MOC@
|
||||||
|
NM = @NM@
|
||||||
|
NMEDIT = @NMEDIT@
|
||||||
|
OBJDUMP = @OBJDUMP@
|
||||||
|
OBJEXT = @OBJEXT@
|
||||||
|
OTOOL = @OTOOL@
|
||||||
|
OTOOL64 = @OTOOL64@
|
||||||
|
PACKAGE = @PACKAGE@
|
||||||
|
PACKAGE_BUGREPORT = @PACKAGE_BUGREPORT@
|
||||||
|
PACKAGE_NAME = @PACKAGE_NAME@
|
||||||
|
PACKAGE_STRING = @PACKAGE_STRING@
|
||||||
|
PACKAGE_TARNAME = @PACKAGE_TARNAME@
|
||||||
|
PACKAGE_URL = @PACKAGE_URL@
|
||||||
|
PACKAGE_VERSION = @PACKAGE_VERSION@
|
||||||
|
PATH_SEPARATOR = @PATH_SEPARATOR@
|
||||||
|
PKG_CONFIG = @PKG_CONFIG@
|
||||||
|
PKG_CONFIG_LIBDIR = @PKG_CONFIG_LIBDIR@
|
||||||
|
PKG_CONFIG_PATH = @PKG_CONFIG_PATH@
|
||||||
|
RANLIB = @RANLIB@
|
||||||
|
SED = @SED@
|
||||||
|
SET_MAKE = @SET_MAKE@
|
||||||
|
SHELL = @SHELL@
|
||||||
|
SILENT_MAKEFLAGS = @SILENT_MAKEFLAGS@
|
||||||
|
STRIP = @STRIP@
|
||||||
|
VERSION = @VERSION@
|
||||||
|
YACC = @YACC@
|
||||||
|
YFLAGS = @YFLAGS@
|
||||||
|
abs_builddir = @abs_builddir@
|
||||||
|
abs_srcdir = @abs_srcdir@
|
||||||
|
abs_top_builddir = @abs_top_builddir@
|
||||||
|
abs_top_srcdir = @abs_top_srcdir@
|
||||||
|
ac_ct_CC = @ac_ct_CC@
|
||||||
|
ac_ct_CXX = @ac_ct_CXX@
|
||||||
|
ac_ct_DUMPBIN = @ac_ct_DUMPBIN@
|
||||||
|
am__include = @am__include@
|
||||||
|
am__leading_dot = @am__leading_dot@
|
||||||
|
am__quote = @am__quote@
|
||||||
|
am__tar = @am__tar@
|
||||||
|
am__untar = @am__untar@
|
||||||
|
bindir = @bindir@
|
||||||
|
build = @build@
|
||||||
|
build_alias = @build_alias@
|
||||||
|
build_cpu = @build_cpu@
|
||||||
|
build_os = @build_os@
|
||||||
|
build_vendor = @build_vendor@
|
||||||
|
builddir = @builddir@
|
||||||
|
conf_EXTRA_LIBS = @conf_EXTRA_LIBS@
|
||||||
|
config_prefix = @config_prefix@
|
||||||
|
datadir = @datadir@
|
||||||
|
datarootdir = @datarootdir@
|
||||||
|
docdir = @docdir@
|
||||||
|
dvidir = @dvidir@
|
||||||
|
enable_L10n = @enable_L10n@
|
||||||
|
enable_conf = @enable_conf@
|
||||||
|
enable_frontends = @enable_frontends@
|
||||||
|
enable_gconf = @enable_gconf@
|
||||||
|
enable_mconf = @enable_mconf@
|
||||||
|
enable_nconf = @enable_nconf@
|
||||||
|
enable_qconf = @enable_qconf@
|
||||||
|
enable_utils = @enable_utils@
|
||||||
|
exec_prefix = @exec_prefix@
|
||||||
|
gconf_EXTRA_LIBS = @gconf_EXTRA_LIBS@
|
||||||
|
gtk_CFLAGS = @gtk_CFLAGS@
|
||||||
|
gtk_LIBS = @gtk_LIBS@
|
||||||
|
host = @host@
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_cpu = @host_cpu@
|
||||||
|
host_os = @host_os@
|
||||||
|
host_vendor = @host_vendor@
|
||||||
|
htmldir = @htmldir@
|
||||||
|
includedir = @includedir@
|
||||||
|
infodir = @infodir@
|
||||||
|
install_sh = @install_sh@
|
||||||
|
intl_CPPFLAGS = @intl_CPPFLAGS@
|
||||||
|
intl_LIBS = @intl_LIBS@
|
||||||
|
kf_CFLAGS = @kf_CFLAGS@
|
||||||
|
libdir = @libdir@
|
||||||
|
libexecdir = @libexecdir@
|
||||||
|
localedir = @localedir@
|
||||||
|
localstatedir = @localstatedir@
|
||||||
|
lt_ECHO = @lt_ECHO@
|
||||||
|
mandir = @mandir@
|
||||||
|
mconf_EXTRA_LIBS = @mconf_EXTRA_LIBS@
|
||||||
|
mkdir_p = @mkdir_p@
|
||||||
|
nconf_EXTRA_LIBS = @nconf_EXTRA_LIBS@
|
||||||
|
ncurses_LIBS = @ncurses_LIBS@
|
||||||
|
ncurses_extra_CPPFLAGS = @ncurses_extra_CPPFLAGS@
|
||||||
|
ncurses_extra_LIBS = @ncurses_extra_LIBS@
|
||||||
|
oldincludedir = @oldincludedir@
|
||||||
|
pdfdir = @pdfdir@
|
||||||
|
prefix = @prefix@
|
||||||
|
program_transform_name = @program_transform_name@
|
||||||
|
psdir = @psdir@
|
||||||
|
qconf_EXTRA_LIBS = @qconf_EXTRA_LIBS@
|
||||||
|
qt4_CFLAGS = @qt4_CFLAGS@
|
||||||
|
qt4_LIBS = @qt4_LIBS@
|
||||||
|
root_menu = @root_menu@
|
||||||
|
sbindir = @sbindir@
|
||||||
|
sharedstatedir = @sharedstatedir@
|
||||||
|
srcdir = @srcdir@
|
||||||
|
sysconfdir = @sysconfdir@
|
||||||
|
target_alias = @target_alias@
|
||||||
|
top_build_prefix = @top_build_prefix@
|
||||||
|
top_builddir = @top_builddir@
|
||||||
|
top_srcdir = @top_srcdir@
|
||||||
|
wall_CFLAGS = @wall_CFLAGS@
|
||||||
|
werror_CFLAGS = @werror_CFLAGS@
|
||||||
|
dist_doc_DATA = kconfig-language.txt kconfig.txt
|
||||||
|
all: all-am
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
$(srcdir)/Makefile.in: $(srcdir)/Makefile.am $(am__configure_deps)
|
||||||
|
@for dep in $?; do \
|
||||||
|
case '$(am__configure_deps)' in \
|
||||||
|
*$$dep*) \
|
||||||
|
( cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh ) \
|
||||||
|
&& { if test -f $@; then exit 0; else break; fi; }; \
|
||||||
|
exit 1;; \
|
||||||
|
esac; \
|
||||||
|
done; \
|
||||||
|
echo ' cd $(top_srcdir) && $(AUTOMAKE) --foreign docs/Makefile'; \
|
||||||
|
$(am__cd) $(top_srcdir) && \
|
||||||
|
$(AUTOMAKE) --foreign docs/Makefile
|
||||||
|
.PRECIOUS: Makefile
|
||||||
|
Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
|
||||||
|
@case '$?' in \
|
||||||
|
*config.status*) \
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh;; \
|
||||||
|
*) \
|
||||||
|
echo ' cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe)'; \
|
||||||
|
cd $(top_builddir) && $(SHELL) ./config.status $(subdir)/$@ $(am__depfiles_maybe);; \
|
||||||
|
esac;
|
||||||
|
|
||||||
|
$(top_builddir)/config.status: $(top_srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
|
||||||
|
$(top_srcdir)/configure: $(am__configure_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(ACLOCAL_M4): $(am__aclocal_m4_deps)
|
||||||
|
cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
|
||||||
|
$(am__aclocal_m4_deps):
|
||||||
|
|
||||||
|
mostlyclean-libtool:
|
||||||
|
-rm -f *.lo
|
||||||
|
|
||||||
|
clean-libtool:
|
||||||
|
-rm -rf .libs _libs
|
||||||
|
install-dist_docDATA: $(dist_doc_DATA)
|
||||||
|
@$(NORMAL_INSTALL)
|
||||||
|
test -z "$(docdir)" || $(MKDIR_P) "$(DESTDIR)$(docdir)"
|
||||||
|
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||||
|
for p in $$list; do \
|
||||||
|
if test -f "$$p"; then d=; else d="$(srcdir)/"; fi; \
|
||||||
|
echo "$$d$$p"; \
|
||||||
|
done | $(am__base_list) | \
|
||||||
|
while read files; do \
|
||||||
|
echo " $(INSTALL_DATA) $$files '$(DESTDIR)$(docdir)'"; \
|
||||||
|
$(INSTALL_DATA) $$files "$(DESTDIR)$(docdir)" || exit $$?; \
|
||||||
|
done
|
||||||
|
|
||||||
|
uninstall-dist_docDATA:
|
||||||
|
@$(NORMAL_UNINSTALL)
|
||||||
|
@list='$(dist_doc_DATA)'; test -n "$(docdir)" || list=; \
|
||||||
|
files=`for p in $$list; do echo $$p; done | sed -e 's|^.*/||'`; \
|
||||||
|
test -n "$$files" || exit 0; \
|
||||||
|
echo " ( cd '$(DESTDIR)$(docdir)' && rm -f" $$files ")"; \
|
||||||
|
cd "$(DESTDIR)$(docdir)" && rm -f $$files
|
||||||
|
tags: TAGS
|
||||||
|
TAGS:
|
||||||
|
|
||||||
|
ctags: CTAGS
|
||||||
|
CTAGS:
|
||||||
|
|
||||||
|
|
||||||
|
distdir: $(DISTFILES)
|
||||||
|
@srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \
|
||||||
|
list='$(DISTFILES)'; \
|
||||||
|
dist_files=`for file in $$list; do echo $$file; done | \
|
||||||
|
sed -e "s|^$$srcdirstrip/||;t" \
|
||||||
|
-e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t"`; \
|
||||||
|
case $$dist_files in \
|
||||||
|
*/*) $(MKDIR_P) `echo "$$dist_files" | \
|
||||||
|
sed '/\//!d;s|^|$(distdir)/|;s,/[^/]*$$,,' | \
|
||||||
|
sort -u` ;; \
|
||||||
|
esac; \
|
||||||
|
for file in $$dist_files; do \
|
||||||
|
if test -f $$file || test -d $$file; then d=.; else d=$(srcdir); fi; \
|
||||||
|
if test -d $$d/$$file; then \
|
||||||
|
dir=`echo "/$$file" | sed -e 's,/[^/]*$$,,'`; \
|
||||||
|
if test -d "$(distdir)/$$file"; then \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
if test -d $(srcdir)/$$file && test $$d != $(srcdir); then \
|
||||||
|
cp -fpR $(srcdir)/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
find "$(distdir)/$$file" -type d ! -perm -700 -exec chmod u+rwx {} \;; \
|
||||||
|
fi; \
|
||||||
|
cp -fpR $$d/$$file "$(distdir)$$dir" || exit 1; \
|
||||||
|
else \
|
||||||
|
test -f "$(distdir)/$$file" \
|
||||||
|
|| cp -p $$d/$$file "$(distdir)/$$file" \
|
||||||
|
|| exit 1; \
|
||||||
|
fi; \
|
||||||
|
done
|
||||||
|
check-am: all-am
|
||||||
|
check: check-am
|
||||||
|
all-am: Makefile $(DATA)
|
||||||
|
installdirs:
|
||||||
|
for dir in "$(DESTDIR)$(docdir)"; do \
|
||||||
|
test -z "$$dir" || $(MKDIR_P) "$$dir"; \
|
||||||
|
done
|
||||||
|
install: install-am
|
||||||
|
install-exec: install-exec-am
|
||||||
|
install-data: install-data-am
|
||||||
|
uninstall: uninstall-am
|
||||||
|
|
||||||
|
install-am: all-am
|
||||||
|
@$(MAKE) $(AM_MAKEFLAGS) install-exec-am install-data-am
|
||||||
|
|
||||||
|
installcheck: installcheck-am
|
||||||
|
install-strip:
|
||||||
|
$(MAKE) $(AM_MAKEFLAGS) INSTALL_PROGRAM="$(INSTALL_STRIP_PROGRAM)" \
|
||||||
|
install_sh_PROGRAM="$(INSTALL_STRIP_PROGRAM)" INSTALL_STRIP_FLAG=-s \
|
||||||
|
`test -z '$(STRIP)' || \
|
||||||
|
echo "INSTALL_PROGRAM_ENV=STRIPPROG='$(STRIP)'"` install
|
||||||
|
mostlyclean-generic:
|
||||||
|
|
||||||
|
clean-generic:
|
||||||
|
|
||||||
|
distclean-generic:
|
||||||
|
-test -z "$(CONFIG_CLEAN_FILES)" || rm -f $(CONFIG_CLEAN_FILES)
|
||||||
|
-test . = "$(srcdir)" || test -z "$(CONFIG_CLEAN_VPATH_FILES)" || rm -f $(CONFIG_CLEAN_VPATH_FILES)
|
||||||
|
|
||||||
|
maintainer-clean-generic:
|
||||||
|
@echo "This command is intended for maintainers to use"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
clean: clean-am
|
||||||
|
|
||||||
|
clean-am: clean-generic clean-libtool mostlyclean-am
|
||||||
|
|
||||||
|
distclean: distclean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
distclean-am: clean-am distclean-generic
|
||||||
|
|
||||||
|
dvi: dvi-am
|
||||||
|
|
||||||
|
dvi-am:
|
||||||
|
|
||||||
|
html: html-am
|
||||||
|
|
||||||
|
html-am:
|
||||||
|
|
||||||
|
info: info-am
|
||||||
|
|
||||||
|
info-am:
|
||||||
|
|
||||||
|
install-data-am: install-dist_docDATA
|
||||||
|
|
||||||
|
install-dvi: install-dvi-am
|
||||||
|
|
||||||
|
install-dvi-am:
|
||||||
|
|
||||||
|
install-exec-am:
|
||||||
|
|
||||||
|
install-html: install-html-am
|
||||||
|
|
||||||
|
install-html-am:
|
||||||
|
|
||||||
|
install-info: install-info-am
|
||||||
|
|
||||||
|
install-info-am:
|
||||||
|
|
||||||
|
install-man:
|
||||||
|
|
||||||
|
install-pdf: install-pdf-am
|
||||||
|
|
||||||
|
install-pdf-am:
|
||||||
|
|
||||||
|
install-ps: install-ps-am
|
||||||
|
|
||||||
|
install-ps-am:
|
||||||
|
|
||||||
|
installcheck-am:
|
||||||
|
|
||||||
|
maintainer-clean: maintainer-clean-am
|
||||||
|
-rm -f Makefile
|
||||||
|
maintainer-clean-am: distclean-am maintainer-clean-generic
|
||||||
|
|
||||||
|
mostlyclean: mostlyclean-am
|
||||||
|
|
||||||
|
mostlyclean-am: mostlyclean-generic mostlyclean-libtool
|
||||||
|
|
||||||
|
pdf: pdf-am
|
||||||
|
|
||||||
|
pdf-am:
|
||||||
|
|
||||||
|
ps: ps-am
|
||||||
|
|
||||||
|
ps-am:
|
||||||
|
|
||||||
|
uninstall-am: uninstall-dist_docDATA
|
||||||
|
|
||||||
|
.MAKE: install-am install-strip
|
||||||
|
|
||||||
|
.PHONY: all all-am check check-am clean clean-generic clean-libtool \
|
||||||
|
distclean distclean-generic distclean-libtool distdir dvi \
|
||||||
|
dvi-am html html-am info info-am install install-am \
|
||||||
|
install-data install-data-am install-dist_docDATA install-dvi \
|
||||||
|
install-dvi-am install-exec install-exec-am install-html \
|
||||||
|
install-html-am install-info install-info-am install-man \
|
||||||
|
install-pdf install-pdf-am install-ps install-ps-am \
|
||||||
|
install-strip installcheck installcheck-am installdirs \
|
||||||
|
maintainer-clean maintainer-clean-generic mostlyclean \
|
||||||
|
mostlyclean-generic mostlyclean-libtool pdf pdf-am ps ps-am \
|
||||||
|
uninstall uninstall-am uninstall-dist_docDATA
|
||||||
|
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make to not export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
||||||
@@ -0,0 +1,413 @@
|
|||||||
|
Introduction
|
||||||
|
------------
|
||||||
|
|
||||||
|
The configuration database is a collection of configuration options
|
||||||
|
organized in a tree structure:
|
||||||
|
|
||||||
|
+- Code maturity level options
|
||||||
|
| +- Prompt for development and/or incomplete code/drivers
|
||||||
|
+- General setup
|
||||||
|
| +- Networking support
|
||||||
|
| +- System V IPC
|
||||||
|
| +- BSD Process Accounting
|
||||||
|
| +- Sysctl support
|
||||||
|
+- Loadable module support
|
||||||
|
| +- Enable loadable module support
|
||||||
|
| +- Set version information on all module symbols
|
||||||
|
| +- Kernel module loader
|
||||||
|
+- ...
|
||||||
|
|
||||||
|
Every entry has its own dependencies. These dependencies are used
|
||||||
|
to determine the visibility of an entry. Any child entry is only
|
||||||
|
visible if its parent entry is also visible.
|
||||||
|
|
||||||
|
Menu entries
|
||||||
|
------------
|
||||||
|
|
||||||
|
Most entries define a config option; all other entries help to organize
|
||||||
|
them. A single configuration option is defined like this:
|
||||||
|
|
||||||
|
config MODVERSIONS
|
||||||
|
bool "Set version information on all module symbols"
|
||||||
|
depends on MODULES
|
||||||
|
help
|
||||||
|
Usually, modules have to be recompiled whenever you switch to a new
|
||||||
|
kernel. ...
|
||||||
|
|
||||||
|
Every line starts with a key word and can be followed by multiple
|
||||||
|
arguments. "config" starts a new config entry. The following lines
|
||||||
|
define attributes for this config option. Attributes can be the type of
|
||||||
|
the config option, input prompt, dependencies, help text and default
|
||||||
|
values. A config option can be defined multiple times with the same
|
||||||
|
name, but every definition can have only a single input prompt and the
|
||||||
|
type must not conflict.
|
||||||
|
|
||||||
|
Menu attributes
|
||||||
|
---------------
|
||||||
|
|
||||||
|
A menu entry can have a number of attributes. Not all of them are
|
||||||
|
applicable everywhere (see syntax).
|
||||||
|
|
||||||
|
- type definition: "bool"/"tristate"/"string"/"hex"/"int"
|
||||||
|
Every config option must have a type. There are only two basic types:
|
||||||
|
tristate and string; the other types are based on these two. The type
|
||||||
|
definition optionally accepts an input prompt, so these two examples
|
||||||
|
are equivalent:
|
||||||
|
|
||||||
|
bool "Networking support"
|
||||||
|
and
|
||||||
|
bool
|
||||||
|
prompt "Networking support"
|
||||||
|
|
||||||
|
- input prompt: "prompt" <prompt> ["if" <expr>]
|
||||||
|
Every menu entry can have at most one prompt, which is used to display
|
||||||
|
to the user. Optionally dependencies only for this prompt can be added
|
||||||
|
with "if".
|
||||||
|
|
||||||
|
- default value: "default" <expr> ["if" <expr>]
|
||||||
|
A config option can have any number of default values. If multiple
|
||||||
|
default values are visible, only the first defined one is active.
|
||||||
|
Default values are not limited to the menu entry where they are
|
||||||
|
defined. This means the default can be defined somewhere else or be
|
||||||
|
overridden by an earlier definition.
|
||||||
|
The default value is only assigned to the config symbol if no other
|
||||||
|
value was set by the user (via the input prompt above). If an input
|
||||||
|
prompt is visible the default value is presented to the user and can
|
||||||
|
be overridden by him.
|
||||||
|
Optionally, dependencies only for this default value can be added with
|
||||||
|
"if".
|
||||||
|
|
||||||
|
- type definition + default value:
|
||||||
|
"def_bool"/"def_tristate" <expr> ["if" <expr>]
|
||||||
|
This is a shorthand notation for a type definition plus a value.
|
||||||
|
Optionally dependencies for this default value can be added with "if".
|
||||||
|
|
||||||
|
- dependencies: "depends on" <expr>
|
||||||
|
This defines a dependency for this menu entry. If multiple
|
||||||
|
dependencies are defined, they are connected with '&&'. Dependencies
|
||||||
|
are applied to all other options within this menu entry (which also
|
||||||
|
accept an "if" expression), so these two examples are equivalent:
|
||||||
|
|
||||||
|
bool "foo" if BAR
|
||||||
|
default y if BAR
|
||||||
|
and
|
||||||
|
depends on BAR
|
||||||
|
bool "foo"
|
||||||
|
default y
|
||||||
|
|
||||||
|
- reverse dependencies: "select" <symbol> ["if" <expr>]
|
||||||
|
While normal dependencies reduce the upper limit of a symbol (see
|
||||||
|
below), reverse dependencies can be used to force a lower limit of
|
||||||
|
another symbol. The value of the current menu symbol is used as the
|
||||||
|
minimal value <symbol> can be set to. If <symbol> is selected multiple
|
||||||
|
times, the limit is set to the largest selection.
|
||||||
|
Reverse dependencies can only be used with boolean or tristate
|
||||||
|
symbols.
|
||||||
|
Note:
|
||||||
|
select should be used with care. select will force
|
||||||
|
a symbol to a value without visiting the dependencies.
|
||||||
|
By abusing select you are able to select a symbol FOO even
|
||||||
|
if FOO depends on BAR that is not set.
|
||||||
|
In general use select only for non-visible symbols
|
||||||
|
(no prompts anywhere) and for symbols with no dependencies.
|
||||||
|
That will limit the usefulness but on the other hand avoid
|
||||||
|
the illegal configurations all over.
|
||||||
|
|
||||||
|
- limiting menu display: "visible if" <expr>
|
||||||
|
This attribute is only applicable to menu blocks, if the condition is
|
||||||
|
false, the menu block is not displayed to the user (the symbols
|
||||||
|
contained there can still be selected by other symbols, though). It is
|
||||||
|
similar to a conditional "prompt" attribute for individual menu
|
||||||
|
entries. Default value of "visible" is true.
|
||||||
|
|
||||||
|
- numerical ranges: "range" <symbol> <symbol> ["if" <expr>]
|
||||||
|
This allows to limit the range of possible input values for int
|
||||||
|
and hex symbols. The user can only input a value which is larger than
|
||||||
|
or equal to the first symbol and smaller than or equal to the second
|
||||||
|
symbol.
|
||||||
|
|
||||||
|
- help text: "help" or "---help---"
|
||||||
|
This defines a help text. The end of the help text is determined by
|
||||||
|
the indentation level, this means it ends at the first line which has
|
||||||
|
a smaller indentation than the first line of the help text.
|
||||||
|
"---help---" and "help" do not differ in behaviour, "---help---" is
|
||||||
|
used to help visually separate configuration logic from help within
|
||||||
|
the file as an aid to developers.
|
||||||
|
|
||||||
|
- misc options: "option" <symbol>[=<value>]
|
||||||
|
Various less common options can be defined via this option syntax,
|
||||||
|
which can modify the behaviour of the menu entry and its config
|
||||||
|
symbol. These options are currently possible:
|
||||||
|
|
||||||
|
- "defconfig_list"
|
||||||
|
This declares a list of default entries which can be used when
|
||||||
|
looking for the default configuration (which is used when the main
|
||||||
|
.config doesn't exists yet.)
|
||||||
|
|
||||||
|
- "modules"
|
||||||
|
This declares the symbol to be used as the MODULES symbol, which
|
||||||
|
enables the third modular state for all config symbols.
|
||||||
|
|
||||||
|
- "env"=<value>
|
||||||
|
This imports the environment variable into Kconfig. It behaves like
|
||||||
|
a default, except that the value comes from the environment, this
|
||||||
|
also means that the behaviour when mixing it with normal defaults is
|
||||||
|
undefined at this point. The symbol is currently not exported back
|
||||||
|
to the build environment (if this is desired, it can be done via
|
||||||
|
another symbol).
|
||||||
|
|
||||||
|
Menu dependencies
|
||||||
|
-----------------
|
||||||
|
|
||||||
|
Dependencies define the visibility of a menu entry and can also reduce
|
||||||
|
the input range of tristate symbols. The tristate logic used in the
|
||||||
|
expressions uses one more state than normal boolean logic to express the
|
||||||
|
module state. Dependency expressions have the following syntax:
|
||||||
|
|
||||||
|
<expr> ::= <symbol> (1)
|
||||||
|
<symbol> '=' <symbol> (2)
|
||||||
|
<symbol> '!=' <symbol> (3)
|
||||||
|
'(' <expr> ')' (4)
|
||||||
|
'!' <expr> (5)
|
||||||
|
<expr> '&&' <expr> (6)
|
||||||
|
<expr> '||' <expr> (7)
|
||||||
|
|
||||||
|
Expressions are listed in decreasing order of precedence.
|
||||||
|
|
||||||
|
(1) Convert the symbol into an expression. Boolean and tristate symbols
|
||||||
|
are simply converted into the respective expression values. All
|
||||||
|
other symbol types result in 'n'.
|
||||||
|
(2) If the values of both symbols are equal, it returns 'y',
|
||||||
|
otherwise 'n'.
|
||||||
|
(3) If the values of both symbols are equal, it returns 'n',
|
||||||
|
otherwise 'y'.
|
||||||
|
(4) Returns the value of the expression. Used to override precedence.
|
||||||
|
(5) Returns the result of (2-/expr/).
|
||||||
|
(6) Returns the result of min(/expr/, /expr/).
|
||||||
|
(7) Returns the result of max(/expr/, /expr/).
|
||||||
|
|
||||||
|
An expression can have a value of 'n', 'm' or 'y' (or 0, 1, 2
|
||||||
|
respectively for calculations). A menu entry becomes visible when its
|
||||||
|
expression evaluates to 'm' or 'y'.
|
||||||
|
|
||||||
|
There are two types of symbols: constant and non-constant symbols.
|
||||||
|
Non-constant symbols are the most common ones and are defined with the
|
||||||
|
'config' statement. Non-constant symbols consist entirely of alphanumeric
|
||||||
|
characters or underscores.
|
||||||
|
Constant symbols are only part of expressions. Constant symbols are
|
||||||
|
always surrounded by single or double quotes. Within the quote, any
|
||||||
|
other character is allowed and the quotes can be escaped using '\'.
|
||||||
|
|
||||||
|
Menu structure
|
||||||
|
--------------
|
||||||
|
|
||||||
|
The position of a menu entry in the tree is determined in two ways. First
|
||||||
|
it can be specified explicitly:
|
||||||
|
|
||||||
|
menu "Network device support"
|
||||||
|
depends on NET
|
||||||
|
|
||||||
|
config NETDEVICES
|
||||||
|
...
|
||||||
|
|
||||||
|
endmenu
|
||||||
|
|
||||||
|
All entries within the "menu" ... "endmenu" block become a submenu of
|
||||||
|
"Network device support". All subentries inherit the dependencies from
|
||||||
|
the menu entry, e.g. this means the dependency "NET" is added to the
|
||||||
|
dependency list of the config option NETDEVICES.
|
||||||
|
|
||||||
|
The other way to generate the menu structure is done by analyzing the
|
||||||
|
dependencies. If a menu entry somehow depends on the previous entry, it
|
||||||
|
can be made a submenu of it. First, the previous (parent) symbol must
|
||||||
|
be part of the dependency list and then one of these two conditions
|
||||||
|
must be true:
|
||||||
|
- the child entry must become invisible, if the parent is set to 'n'
|
||||||
|
- the child entry must only be visible, if the parent is visible
|
||||||
|
|
||||||
|
config MODULES
|
||||||
|
bool "Enable loadable module support"
|
||||||
|
|
||||||
|
config MODVERSIONS
|
||||||
|
bool "Set version information on all module symbols"
|
||||||
|
depends on MODULES
|
||||||
|
|
||||||
|
comment "module support disabled"
|
||||||
|
depends on !MODULES
|
||||||
|
|
||||||
|
MODVERSIONS directly depends on MODULES, this means it's only visible if
|
||||||
|
MODULES is different from 'n'. The comment on the other hand is always
|
||||||
|
visible when MODULES is visible (the (empty) dependency of MODULES is
|
||||||
|
also part of the comment dependencies).
|
||||||
|
|
||||||
|
|
||||||
|
Kconfig syntax
|
||||||
|
--------------
|
||||||
|
|
||||||
|
The configuration file describes a series of menu entries, where every
|
||||||
|
line starts with a keyword (except help texts). The following keywords
|
||||||
|
end a menu entry:
|
||||||
|
- config
|
||||||
|
- menuconfig
|
||||||
|
- choice/endchoice
|
||||||
|
- comment
|
||||||
|
- menu/endmenu
|
||||||
|
- if/endif
|
||||||
|
- source
|
||||||
|
The first five also start the definition of a menu entry.
|
||||||
|
|
||||||
|
config:
|
||||||
|
|
||||||
|
"config" <symbol>
|
||||||
|
<config options>
|
||||||
|
|
||||||
|
This defines a config symbol <symbol> and accepts any of above
|
||||||
|
attributes as options.
|
||||||
|
|
||||||
|
menuconfig:
|
||||||
|
"menuconfig" <symbol>
|
||||||
|
<config options>
|
||||||
|
|
||||||
|
This is similar to the simple config entry above, but it also gives a
|
||||||
|
hint to front ends, that all suboptions should be displayed as a
|
||||||
|
separate list of options.
|
||||||
|
|
||||||
|
choices:
|
||||||
|
|
||||||
|
"choice" [symbol]
|
||||||
|
<choice options>
|
||||||
|
<choice block>
|
||||||
|
"endchoice"
|
||||||
|
|
||||||
|
This defines a choice group and accepts any of the above attributes as
|
||||||
|
options. A choice can only be of type bool or tristate, while a boolean
|
||||||
|
choice only allows a single config entry to be selected, a tristate
|
||||||
|
choice also allows any number of config entries to be set to 'm'. This
|
||||||
|
can be used if multiple drivers for a single hardware exists and only a
|
||||||
|
single driver can be compiled/loaded into the kernel, but all drivers
|
||||||
|
can be compiled as modules.
|
||||||
|
A choice accepts another option "optional", which allows to set the
|
||||||
|
choice to 'n' and no entry needs to be selected.
|
||||||
|
If no [symbol] is associated with a choice, then you can not have multiple
|
||||||
|
definitions of that choice. If a [symbol] is associated to the choice,
|
||||||
|
then you may define the same choice (ie. with the same entries) in another
|
||||||
|
place.
|
||||||
|
|
||||||
|
comment:
|
||||||
|
|
||||||
|
"comment" <prompt>
|
||||||
|
<comment options>
|
||||||
|
|
||||||
|
This defines a comment which is displayed to the user during the
|
||||||
|
configuration process and is also echoed to the output files. The only
|
||||||
|
possible options are dependencies.
|
||||||
|
|
||||||
|
menu:
|
||||||
|
|
||||||
|
"menu" <prompt>
|
||||||
|
<menu options>
|
||||||
|
<menu block>
|
||||||
|
"endmenu"
|
||||||
|
|
||||||
|
This defines a menu block, see "Menu structure" above for more
|
||||||
|
information. The only possible options are dependencies and "visible"
|
||||||
|
attributes.
|
||||||
|
|
||||||
|
if:
|
||||||
|
|
||||||
|
"if" <expr>
|
||||||
|
<if block>
|
||||||
|
"endif"
|
||||||
|
|
||||||
|
This defines an if block. The dependency expression <expr> is appended
|
||||||
|
to all enclosed menu entries.
|
||||||
|
|
||||||
|
source:
|
||||||
|
|
||||||
|
"source" <prompt>
|
||||||
|
|
||||||
|
This reads the specified configuration file. This file is always parsed.
|
||||||
|
|
||||||
|
mainmenu:
|
||||||
|
|
||||||
|
"mainmenu" <prompt>
|
||||||
|
|
||||||
|
This sets the config program's title bar if the config program chooses
|
||||||
|
to use it. It should be placed at the top of the configuration, before any
|
||||||
|
other statement.
|
||||||
|
|
||||||
|
|
||||||
|
Kconfig hints
|
||||||
|
-------------
|
||||||
|
This is a collection of Kconfig tips, most of which aren't obvious at
|
||||||
|
first glance and most of which have become idioms in several Kconfig
|
||||||
|
files.
|
||||||
|
|
||||||
|
Adding common features and make the usage configurable
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
It is a common idiom to implement a feature/functionality that are
|
||||||
|
relevant for some architectures but not all.
|
||||||
|
The recommended way to do so is to use a config variable named HAVE_*
|
||||||
|
that is defined in a common Kconfig file and selected by the relevant
|
||||||
|
architectures.
|
||||||
|
An example is the generic IOMAP functionality.
|
||||||
|
|
||||||
|
We would in lib/Kconfig see:
|
||||||
|
|
||||||
|
# Generic IOMAP is used to ...
|
||||||
|
config HAVE_GENERIC_IOMAP
|
||||||
|
|
||||||
|
config GENERIC_IOMAP
|
||||||
|
depends on HAVE_GENERIC_IOMAP && FOO
|
||||||
|
|
||||||
|
And in lib/Makefile we would see:
|
||||||
|
obj-$(CONFIG_GENERIC_IOMAP) += iomap.o
|
||||||
|
|
||||||
|
For each architecture using the generic IOMAP functionality we would see:
|
||||||
|
|
||||||
|
config X86
|
||||||
|
select ...
|
||||||
|
select HAVE_GENERIC_IOMAP
|
||||||
|
select ...
|
||||||
|
|
||||||
|
Note: we use the existing config option and avoid creating a new
|
||||||
|
config variable to select HAVE_GENERIC_IOMAP.
|
||||||
|
|
||||||
|
Note: the use of the internal config variable HAVE_GENERIC_IOMAP, it is
|
||||||
|
introduced to overcome the limitation of select which will force a
|
||||||
|
config option to 'y' no matter the dependencies.
|
||||||
|
The dependencies are moved to the symbol GENERIC_IOMAP and we avoid the
|
||||||
|
situation where select forces a symbol equals to 'y'.
|
||||||
|
|
||||||
|
Build as module only
|
||||||
|
~~~~~~~~~~~~~~~~~~~~
|
||||||
|
To restrict a component build to module-only, qualify its config symbol
|
||||||
|
with "depends on m". E.g.:
|
||||||
|
|
||||||
|
config FOO
|
||||||
|
depends on BAR && m
|
||||||
|
|
||||||
|
limits FOO to module (=m) or disabled (=n).
|
||||||
|
|
||||||
|
Kconfig symbol existence
|
||||||
|
~~~~~~~~~~~~~~~~~~~~~~~~
|
||||||
|
The following two methods produce the same kconfig symbol dependencies
|
||||||
|
but differ greatly in kconfig symbol existence (production) in the
|
||||||
|
generated config file.
|
||||||
|
|
||||||
|
case 1:
|
||||||
|
|
||||||
|
config FOO
|
||||||
|
tristate "about foo"
|
||||||
|
depends on BAR
|
||||||
|
|
||||||
|
vs. case 2:
|
||||||
|
|
||||||
|
if BAR
|
||||||
|
config FOO
|
||||||
|
tristate "about foo"
|
||||||
|
endif
|
||||||
|
|
||||||
|
In case 1, the symbol FOO will always exist in the config file (given
|
||||||
|
no other dependencies). In case 2, the symbol FOO will only exist in
|
||||||
|
the config file if BAR is enabled.
|
||||||
@@ -0,0 +1,191 @@
|
|||||||
|
This file contains some assistance for using "make *config".
|
||||||
|
|
||||||
|
Use "make help" to list all of the possible configuration targets.
|
||||||
|
|
||||||
|
The xconfig ('qconf') and menuconfig ('mconf') programs also
|
||||||
|
have embedded help text. Be sure to check it for navigation,
|
||||||
|
search, and other general help text.
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
General
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
New kernel releases often introduce new config symbols. Often more
|
||||||
|
important, new kernel releases may rename config symbols. When
|
||||||
|
this happens, using a previously working .config file and running
|
||||||
|
"make oldconfig" won't necessarily produce a working new kernel
|
||||||
|
for you, so you may find that you need to see what NEW kernel
|
||||||
|
symbols have been introduced.
|
||||||
|
|
||||||
|
To see a list of new config symbols when using "make oldconfig", use
|
||||||
|
|
||||||
|
cp user/some/old.config .config
|
||||||
|
yes "" | make oldconfig >conf.new
|
||||||
|
|
||||||
|
and the config program will list as (NEW) any new symbols that have
|
||||||
|
unknown values. Of course, the .config file is also updated with
|
||||||
|
new (default) values, so you can use:
|
||||||
|
|
||||||
|
grep "(NEW)" conf.new
|
||||||
|
|
||||||
|
to see the new config symbols or you can use diffconfig to see the
|
||||||
|
differences between the previous and new .config files:
|
||||||
|
|
||||||
|
scripts/diffconfig .config.old .config | less
|
||||||
|
|
||||||
|
______________________________________________________________________
|
||||||
|
Environment variables for '*config'
|
||||||
|
|
||||||
|
KCONFIG_CONFIG
|
||||||
|
--------------------------------------------------
|
||||||
|
This environment variable can be used to specify a default kernel config
|
||||||
|
file name to override the default name of ".config".
|
||||||
|
|
||||||
|
KCONFIG_OVERWRITECONFIG
|
||||||
|
--------------------------------------------------
|
||||||
|
If you set KCONFIG_OVERWRITECONFIG in the environment, Kconfig will not
|
||||||
|
break symlinks when .config is a symlink to somewhere else.
|
||||||
|
|
||||||
|
______________________________________________________________________
|
||||||
|
Environment variables for '{allyes/allmod/allno/rand}config'
|
||||||
|
|
||||||
|
KCONFIG_ALLCONFIG
|
||||||
|
--------------------------------------------------
|
||||||
|
(partially based on lkml email from/by Rob Landley, re: miniconfig)
|
||||||
|
--------------------------------------------------
|
||||||
|
The allyesconfig/allmodconfig/allnoconfig/randconfig variants can also
|
||||||
|
use the environment variable KCONFIG_ALLCONFIG as a flag or a filename
|
||||||
|
that contains config symbols that the user requires to be set to a
|
||||||
|
specific value. If KCONFIG_ALLCONFIG is used without a filename where
|
||||||
|
KCONFIG_ALLCONFIG == "" or KCONFIG_ALLCONFIG == "1", "make *config"
|
||||||
|
checks for a file named "all{yes/mod/no/def/random}.config"
|
||||||
|
(corresponding to the *config command that was used) for symbol values
|
||||||
|
that are to be forced. If this file is not found, it checks for a
|
||||||
|
file named "all.config" to contain forced values.
|
||||||
|
|
||||||
|
This enables you to create "miniature" config (miniconfig) or custom
|
||||||
|
config files containing just the config symbols that you are interested
|
||||||
|
in. Then the kernel config system generates the full .config file,
|
||||||
|
including symbols of your miniconfig file.
|
||||||
|
|
||||||
|
This 'KCONFIG_ALLCONFIG' file is a config file which contains
|
||||||
|
(usually a subset of all) preset config symbols. These variable
|
||||||
|
settings are still subject to normal dependency checks.
|
||||||
|
|
||||||
|
Examples:
|
||||||
|
KCONFIG_ALLCONFIG=custom-notebook.config make allnoconfig
|
||||||
|
or
|
||||||
|
KCONFIG_ALLCONFIG=mini.config make allnoconfig
|
||||||
|
or
|
||||||
|
make KCONFIG_ALLCONFIG=mini.config allnoconfig
|
||||||
|
|
||||||
|
These examples will disable most options (allnoconfig) but enable or
|
||||||
|
disable the options that are explicitly listed in the specified
|
||||||
|
mini-config files.
|
||||||
|
|
||||||
|
______________________________________________________________________
|
||||||
|
Environment variables for 'silentoldconfig'
|
||||||
|
|
||||||
|
KCONFIG_NOSILENTUPDATE
|
||||||
|
--------------------------------------------------
|
||||||
|
If this variable has a non-blank value, it prevents silent kernel
|
||||||
|
config updates (requires explicit updates).
|
||||||
|
|
||||||
|
KCONFIG_AUTOCONFIG
|
||||||
|
--------------------------------------------------
|
||||||
|
This environment variable can be set to specify the path & name of the
|
||||||
|
"auto.conf" file. Its default value is "include/config/auto.conf".
|
||||||
|
|
||||||
|
KCONFIG_TRISTATE
|
||||||
|
--------------------------------------------------
|
||||||
|
This environment variable can be set to specify the path & name of the
|
||||||
|
"tristate.conf" file. Its default value is "include/config/tristate.conf".
|
||||||
|
|
||||||
|
KCONFIG_AUTOHEADER
|
||||||
|
--------------------------------------------------
|
||||||
|
This environment variable can be set to specify the path & name of the
|
||||||
|
"autoconf.h" (header) file.
|
||||||
|
Its default value is "include/generated/autoconf.h".
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
menuconfig
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
SEARCHING for CONFIG symbols
|
||||||
|
|
||||||
|
Searching in menuconfig:
|
||||||
|
|
||||||
|
The Search function searches for kernel configuration symbol
|
||||||
|
names, so you have to know something close to what you are
|
||||||
|
looking for.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
/hotplug
|
||||||
|
This lists all config symbols that contain "hotplug",
|
||||||
|
e.g., HOTPLUG, HOTPLUG_CPU, MEMORY_HOTPLUG.
|
||||||
|
|
||||||
|
For search help, enter / followed TAB-TAB-TAB (to highlight
|
||||||
|
<Help>) and Enter. This will tell you that you can also use
|
||||||
|
regular expressions (regexes) in the search string, so if you
|
||||||
|
are not interested in MEMORY_HOTPLUG, you could try
|
||||||
|
|
||||||
|
/^hotplug
|
||||||
|
|
||||||
|
______________________________________________________________________
|
||||||
|
User interface options for 'menuconfig'
|
||||||
|
|
||||||
|
MENUCONFIG_COLOR
|
||||||
|
--------------------------------------------------
|
||||||
|
It is possible to select different color themes using the variable
|
||||||
|
MENUCONFIG_COLOR. To select a theme use:
|
||||||
|
|
||||||
|
make MENUCONFIG_COLOR=<theme> menuconfig
|
||||||
|
|
||||||
|
Available themes are:
|
||||||
|
mono => selects colors suitable for monochrome displays
|
||||||
|
blackbg => selects a color scheme with black background
|
||||||
|
classic => theme with blue background. The classic look
|
||||||
|
bluetitle => a LCD friendly version of classic. (default)
|
||||||
|
|
||||||
|
MENUCONFIG_MODE
|
||||||
|
--------------------------------------------------
|
||||||
|
This mode shows all sub-menus in one large tree.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
make MENUCONFIG_MODE=single_menu menuconfig
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
xconfig
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
Searching in xconfig:
|
||||||
|
|
||||||
|
The Search function searches for kernel configuration symbol
|
||||||
|
names, so you have to know something close to what you are
|
||||||
|
looking for.
|
||||||
|
|
||||||
|
Example:
|
||||||
|
Ctrl-F hotplug
|
||||||
|
or
|
||||||
|
Menu: File, Search, hotplug
|
||||||
|
|
||||||
|
lists all config symbol entries that contain "hotplug" in
|
||||||
|
the symbol name. In this Search dialog, you may change the
|
||||||
|
config setting for any of the entries that are not grayed out.
|
||||||
|
You can also enter a different search string without having
|
||||||
|
to return to the main menu.
|
||||||
|
|
||||||
|
|
||||||
|
======================================================================
|
||||||
|
gconfig
|
||||||
|
--------------------------------------------------
|
||||||
|
|
||||||
|
Searching in gconfig:
|
||||||
|
|
||||||
|
None (gconfig isn't maintained as well as xconfig or menuconfig);
|
||||||
|
however, gconfig does have a few more viewing choices than
|
||||||
|
xconfig does.
|
||||||
|
|
||||||
|
###
|
||||||
@@ -0,0 +1,16 @@
|
|||||||
|
if COND_conf
|
||||||
|
MAYBE_conf = conf
|
||||||
|
endif
|
||||||
|
if COND_mconf
|
||||||
|
MAYBE_mconf = mconf
|
||||||
|
endif
|
||||||
|
if COND_nconf
|
||||||
|
MAYBE_nconf = nconf
|
||||||
|
endif
|
||||||
|
if COND_gconf
|
||||||
|
MAYBE_gconf = gconf
|
||||||
|
endif
|
||||||
|
if COND_qconf
|
||||||
|
MAYBE_qconf = qconf
|
||||||
|
endif
|
||||||
|
SUBDIRS = $(MAYBE_conf) $(MAYBE_mconf) $(MAYBE_nconf) $(MAYBE_gconf) $(MAYBE_qconf)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,10 @@
|
|||||||
|
bin_PROGRAMS = conf
|
||||||
|
|
||||||
|
conf_SOURCES = conf.c
|
||||||
|
conf_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(intl_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/libs/parser
|
||||||
|
conf_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
|
||||||
|
conf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \
|
||||||
|
$(intl_LIBS) \
|
||||||
|
$(conf_EXTRA_LIBS)
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,17 @@
|
|||||||
|
bin_PROGRAMS = gconf
|
||||||
|
|
||||||
|
gconf_SOURCES = gconf.c gconf.glade
|
||||||
|
gconf_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(intl_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/libs/parser \
|
||||||
|
-I$(top_builddir)/libs/images \
|
||||||
|
-DGUI_PATH='"$(pkgdatadir)/gconf.glade"'
|
||||||
|
gconf_CFLAGS = $(AM_CFLAGS) \
|
||||||
|
$(kf_CFLAGS) \
|
||||||
|
$(gtk_CFLAGS)
|
||||||
|
gconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \
|
||||||
|
$(top_builddir)/libs/images/libkconfig-images.a \
|
||||||
|
$(intl_LIBS) $(gtk_LIBS) $(gconf_EXTRA_LIBS)
|
||||||
|
gconfdir = $(pkgdatadir)
|
||||||
|
gconf_DATA = gconf.glade
|
||||||
|
EXTRA_DIST = gconf.c.patch
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,40 @@
|
|||||||
|
diff --git a/frontends/gconf/gconf.c b/frontends/gconf/gconf.c
|
||||||
|
--- a/frontends/gconf/gconf.c
|
||||||
|
+++ b/frontends/gconf/gconf.c
|
||||||
|
@@ -11,7 +11,7 @@
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "lkc.h"
|
||||||
|
-#include "images.c"
|
||||||
|
+#include "images.h"
|
||||||
|
|
||||||
|
#include <glade/glade.h>
|
||||||
|
#include <gtk/gtk.h>
|
||||||
|
@@ -1468,8 +1468,10 @@
|
||||||
|
int main(int ac, char *av[])
|
||||||
|
{
|
||||||
|
const char *name;
|
||||||
|
+#if 0
|
||||||
|
char *env;
|
||||||
|
+#endif
|
||||||
|
- gchar *glade_file;
|
||||||
|
+ gchar *glade_file = GUI_PATH;
|
||||||
|
|
||||||
|
bindtextdomain(PACKAGE, LOCALEDIR);
|
||||||
|
bind_textdomain_codeset(PACKAGE, "UTF-8");
|
||||||
|
@@ -1483,6 +1485,7 @@
|
||||||
|
//add_pixmap_directory (PACKAGE_DATA_DIR "/" PACKAGE "/pixmaps");
|
||||||
|
//add_pixmap_directory (PACKAGE_SOURCE_DIR "/pixmaps");
|
||||||
|
|
||||||
|
+#if 0
|
||||||
|
/* Determine GUI path */
|
||||||
|
env = getenv(SRCTREE);
|
||||||
|
if (env)
|
||||||
|
@@ -1491,6 +1494,7 @@
|
||||||
|
glade_file = g_strconcat(av[0], ".glade", NULL);
|
||||||
|
else
|
||||||
|
glade_file = g_strconcat(g_get_current_dir(), "/", av[0], ".glade", NULL);
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Conf stuffs */
|
||||||
|
if (ac > 1 && av[1][0] == '-') {
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
bin_PROGRAMS = mconf
|
||||||
|
|
||||||
|
mconf_SOURCES = mconf.c
|
||||||
|
mconf_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
-DCURSES_LOC='"$(CURSES_LOC)"' \
|
||||||
|
$(intl_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/libs \
|
||||||
|
-I$(top_srcdir)/libs/parser
|
||||||
|
mconf_CFLAGS = $(AM_CFLAGS) \
|
||||||
|
$(kf_CFLAGS)
|
||||||
|
mconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \
|
||||||
|
$(top_builddir)/libs/lxdialog/libkconfig-lxdialog.a \
|
||||||
|
$(intl_LIBS) $(ncurses_LIBS) $(mconf_EXTRA_LIBS)
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
|||||||
|
bin_PROGRAMS = nconf
|
||||||
|
|
||||||
|
nconf_SOURCES = nconf.c nconf.gui.c nconf.h
|
||||||
|
nconf_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(intl_CPPFLAGS) \
|
||||||
|
$(ncurses_extra_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/libs/parser
|
||||||
|
nconf_CFLAGS = $(AM_CFLAGS) \
|
||||||
|
$(kf_CFLAGS)
|
||||||
|
nconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \
|
||||||
|
$(intl_LIBS) $(ncurses_extra_LIBS) $(ncurses_LIBS) \
|
||||||
|
$(nconf_EXTRA_LIBS)
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,96 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2008 Nir Tzachar <nir.tzachar@gmail.com?
|
||||||
|
* Released under the terms of the GNU GPL v2.0.
|
||||||
|
*
|
||||||
|
* Derived from menuconfig.
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <limits.h>
|
||||||
|
#include <stdarg.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <locale.h>
|
||||||
|
#include <curses.h>
|
||||||
|
#include <menu.h>
|
||||||
|
#include <panel.h>
|
||||||
|
#include <form.h>
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#include <time.h>
|
||||||
|
#include <sys/time.h>
|
||||||
|
|
||||||
|
#include "ncurses.h"
|
||||||
|
|
||||||
|
#define max(a, b) ({\
|
||||||
|
typeof(a) _a = a;\
|
||||||
|
typeof(b) _b = b;\
|
||||||
|
_a > _b ? _a : _b; })
|
||||||
|
|
||||||
|
#define min(a, b) ({\
|
||||||
|
typeof(a) _a = a;\
|
||||||
|
typeof(b) _b = b;\
|
||||||
|
_a < _b ? _a : _b; })
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
NORMAL = 1,
|
||||||
|
MAIN_HEADING,
|
||||||
|
MAIN_MENU_BOX,
|
||||||
|
MAIN_MENU_FORE,
|
||||||
|
MAIN_MENU_BACK,
|
||||||
|
MAIN_MENU_GREY,
|
||||||
|
MAIN_MENU_HEADING,
|
||||||
|
SCROLLWIN_TEXT,
|
||||||
|
SCROLLWIN_HEADING,
|
||||||
|
SCROLLWIN_BOX,
|
||||||
|
DIALOG_TEXT,
|
||||||
|
DIALOG_MENU_FORE,
|
||||||
|
DIALOG_MENU_BACK,
|
||||||
|
DIALOG_BOX,
|
||||||
|
INPUT_BOX,
|
||||||
|
INPUT_HEADING,
|
||||||
|
INPUT_TEXT,
|
||||||
|
INPUT_FIELD,
|
||||||
|
FUNCTION_TEXT,
|
||||||
|
FUNCTION_HIGHLIGHT,
|
||||||
|
ATTR_MAX
|
||||||
|
} attributes_t;
|
||||||
|
extern attributes_t attributes[];
|
||||||
|
|
||||||
|
typedef enum {
|
||||||
|
F_HELP = 1,
|
||||||
|
F_SYMBOL = 2,
|
||||||
|
F_INSTS = 3,
|
||||||
|
F_CONF = 4,
|
||||||
|
F_BACK = 5,
|
||||||
|
F_SAVE = 6,
|
||||||
|
F_LOAD = 7,
|
||||||
|
F_SEARCH = 8,
|
||||||
|
F_EXIT = 9,
|
||||||
|
} function_key;
|
||||||
|
|
||||||
|
void set_colors(void);
|
||||||
|
|
||||||
|
/* this changes the windows attributes !!! */
|
||||||
|
void print_in_middle(WINDOW *win,
|
||||||
|
int starty,
|
||||||
|
int startx,
|
||||||
|
int width,
|
||||||
|
const char *string,
|
||||||
|
chtype color);
|
||||||
|
int get_line_length(const char *line);
|
||||||
|
int get_line_no(const char *text);
|
||||||
|
const char *get_line(const char *text, int line_no);
|
||||||
|
void fill_window(WINDOW *win, const char *text);
|
||||||
|
int btn_dialog(WINDOW *main_window, const char *msg, int btn_num, ...);
|
||||||
|
int dialog_inputbox(WINDOW *main_window,
|
||||||
|
const char *title, const char *prompt,
|
||||||
|
const char *init, char **resultp, int *result_len);
|
||||||
|
void refresh_all_windows(WINDOW *main_window);
|
||||||
|
void show_scroll_win(WINDOW *main_window,
|
||||||
|
const char *title,
|
||||||
|
const char *text);
|
||||||
@@ -0,0 +1,23 @@
|
|||||||
|
bin_PROGRAMS = qconf
|
||||||
|
|
||||||
|
qconf_SOURCES = qconf.cc qconf.h
|
||||||
|
BUILT_SOURCES = qconf.moc
|
||||||
|
qconf_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
$(intl_CPPFLAGS) \
|
||||||
|
-I$(top_srcdir)/libs/parser \
|
||||||
|
-I$(top_builddir)/libs/images
|
||||||
|
qconf_CXXFLAGS = $(AM_CXXFLAGS) \
|
||||||
|
$(kf_CFLAGS) \
|
||||||
|
$(qt4_CFLAGS)
|
||||||
|
qconf_LDADD = $(top_builddir)/libs/parser/libkconfig-parser.la \
|
||||||
|
$(top_builddir)/libs/images/libkconfig-images.a \
|
||||||
|
$(intl_LIBS) $(qt4_LIBS) $(qconf_EXTRA_LIBS)
|
||||||
|
CLEANFILES = qconf.moc
|
||||||
|
EXTRA_DIST = qconf.cc.patch
|
||||||
|
|
||||||
|
AM_V_MOC = $(AM_V_MOC_$(V))
|
||||||
|
AM_V_MOC_ = $(AM_V_MOC_$(AM_DEFAULT_VERBOSITY))
|
||||||
|
AM_V_MOC_0 = @echo " MOC " $@;
|
||||||
|
|
||||||
|
.h.moc:
|
||||||
|
$(AM_V_MOC)$(MOC) -i $< -o $@
|
||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,12 @@
|
|||||||
|
diff --git a/frontends/qconf/qconf.cc b/frontends/qconf/qconf.cc
|
||||||
|
--- a/frontends/qconf/qconf.cc
|
||||||
|
+++ b/frontends/qconf/qconf.cc
|
||||||
|
@@ -46,7 +46,7 @@
|
||||||
|
#include "qconf.h"
|
||||||
|
|
||||||
|
#include "qconf.moc"
|
||||||
|
-#include "images.c"
|
||||||
|
+#include "images.h"
|
||||||
|
|
||||||
|
#ifdef _
|
||||||
|
# undef _
|
||||||
@@ -0,0 +1,337 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
|
||||||
|
* Released under the terms of the GNU GPL v2.0.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#if QT_VERSION < 0x040000
|
||||||
|
#include <qlistview.h>
|
||||||
|
#else
|
||||||
|
#include <q3listview.h>
|
||||||
|
#endif
|
||||||
|
#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
|
||||||
|
|
||||||
|
class ConfigView;
|
||||||
|
class ConfigList;
|
||||||
|
class ConfigItem;
|
||||||
|
class ConfigLineEdit;
|
||||||
|
class ConfigMainWindow;
|
||||||
|
|
||||||
|
class ConfigSettings : public QSettings {
|
||||||
|
public:
|
||||||
|
Q3ValueList<int> readSizes(const QString& key, bool *ok);
|
||||||
|
bool writeSizes(const QString& key, const Q3ValueList<int>& value);
|
||||||
|
};
|
||||||
|
|
||||||
|
enum colIdx {
|
||||||
|
promptColIdx, nameColIdx, noColIdx, modColIdx, yesColIdx, dataColIdx, colNr
|
||||||
|
};
|
||||||
|
enum listMode {
|
||||||
|
singleMode, menuMode, symbolMode, fullMode, listMode
|
||||||
|
};
|
||||||
|
enum optionMode {
|
||||||
|
normalOpt = 0, allOpt, promptOpt
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigList : public Q3ListView {
|
||||||
|
Q_OBJECT
|
||||||
|
typedef class Q3ListView Parent;
|
||||||
|
public:
|
||||||
|
ConfigList(ConfigView* p, const char *name = 0);
|
||||||
|
void reinit(void);
|
||||||
|
ConfigView* parent(void) const
|
||||||
|
{
|
||||||
|
return (ConfigView*)Parent::parent();
|
||||||
|
}
|
||||||
|
ConfigItem* findConfigItem(struct menu *);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
void contentsMousePressEvent(QMouseEvent *e);
|
||||||
|
void contentsMouseReleaseEvent(QMouseEvent *e);
|
||||||
|
void contentsMouseMoveEvent(QMouseEvent *e);
|
||||||
|
void contentsMouseDoubleClickEvent(QMouseEvent *e);
|
||||||
|
void focusInEvent(QFocusEvent *e);
|
||||||
|
void contextMenuEvent(QContextMenuEvent *e);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setRootMenu(struct menu *menu);
|
||||||
|
|
||||||
|
void updateList(ConfigItem *item);
|
||||||
|
void setValue(ConfigItem* item, tristate val);
|
||||||
|
void changeValue(ConfigItem* item);
|
||||||
|
void updateSelection(void);
|
||||||
|
void saveSettings(void);
|
||||||
|
signals:
|
||||||
|
void menuChanged(struct menu *menu);
|
||||||
|
void menuSelected(struct menu *menu);
|
||||||
|
void parentSelected(void);
|
||||||
|
void gotFocus(struct menu *);
|
||||||
|
|
||||||
|
public:
|
||||||
|
void updateListAll(void)
|
||||||
|
{
|
||||||
|
updateAll = true;
|
||||||
|
updateList(NULL);
|
||||||
|
updateAll = false;
|
||||||
|
}
|
||||||
|
ConfigList* listView()
|
||||||
|
{
|
||||||
|
return this;
|
||||||
|
}
|
||||||
|
ConfigItem* firstChild() const
|
||||||
|
{
|
||||||
|
return (ConfigItem *)Parent::firstChild();
|
||||||
|
}
|
||||||
|
int mapIdx(colIdx idx)
|
||||||
|
{
|
||||||
|
return colMap[idx];
|
||||||
|
}
|
||||||
|
void addColumn(colIdx idx, const QString& label)
|
||||||
|
{
|
||||||
|
colMap[idx] = Parent::addColumn(label);
|
||||||
|
colRevMap[colMap[idx]] = idx;
|
||||||
|
}
|
||||||
|
void removeColumn(colIdx idx)
|
||||||
|
{
|
||||||
|
int col = colMap[idx];
|
||||||
|
if (col >= 0) {
|
||||||
|
Parent::removeColumn(col);
|
||||||
|
colRevMap[col] = colMap[idx] = -1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
void setAllOpen(bool open);
|
||||||
|
void setParentMenu(void);
|
||||||
|
|
||||||
|
bool menuSkip(struct menu *);
|
||||||
|
|
||||||
|
template <class P>
|
||||||
|
void updateMenuList(P*, struct menu*);
|
||||||
|
|
||||||
|
bool updateAll;
|
||||||
|
|
||||||
|
QPixmap symbolYesPix, symbolModPix, symbolNoPix;
|
||||||
|
QPixmap choiceYesPix, choiceNoPix;
|
||||||
|
QPixmap menuPix, menuInvPix, menuBackPix, voidPix;
|
||||||
|
|
||||||
|
bool showName, showRange, showData;
|
||||||
|
enum listMode mode;
|
||||||
|
enum optionMode optMode;
|
||||||
|
struct menu *rootEntry;
|
||||||
|
QColorGroup disabledColorGroup;
|
||||||
|
QColorGroup inactivedColorGroup;
|
||||||
|
Q3PopupMenu* headerPopup;
|
||||||
|
|
||||||
|
private:
|
||||||
|
int colMap[colNr];
|
||||||
|
int colRevMap[colNr];
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigItem : public Q3ListViewItem {
|
||||||
|
typedef class Q3ListViewItem Parent;
|
||||||
|
public:
|
||||||
|
ConfigItem(Q3ListView *parent, ConfigItem *after, struct menu *m, bool v)
|
||||||
|
: Parent(parent, after), 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)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
ConfigItem(Q3ListView *parent, ConfigItem *after, bool v)
|
||||||
|
: Parent(parent, after), menu(0), visible(v), goParent(true)
|
||||||
|
{
|
||||||
|
init();
|
||||||
|
}
|
||||||
|
~ConfigItem(void);
|
||||||
|
void init(void);
|
||||||
|
void okRename(int col);
|
||||||
|
void updateMenu(void);
|
||||||
|
void testUpdateMenu(bool v);
|
||||||
|
ConfigList* listView() const
|
||||||
|
{
|
||||||
|
return (ConfigList*)Parent::listView();
|
||||||
|
}
|
||||||
|
ConfigItem* firstChild() const
|
||||||
|
{
|
||||||
|
return (ConfigItem *)Parent::firstChild();
|
||||||
|
}
|
||||||
|
ConfigItem* nextSibling() const
|
||||||
|
{
|
||||||
|
return (ConfigItem *)Parent::nextSibling();
|
||||||
|
}
|
||||||
|
void setText(colIdx idx, const QString& text)
|
||||||
|
{
|
||||||
|
Parent::setText(listView()->mapIdx(idx), text);
|
||||||
|
}
|
||||||
|
QString text(colIdx idx) const
|
||||||
|
{
|
||||||
|
return Parent::text(listView()->mapIdx(idx));
|
||||||
|
}
|
||||||
|
void setPixmap(colIdx idx, const QPixmap& pm)
|
||||||
|
{
|
||||||
|
Parent::setPixmap(listView()->mapIdx(idx), pm);
|
||||||
|
}
|
||||||
|
const QPixmap* pixmap(colIdx idx) const
|
||||||
|
{
|
||||||
|
return Parent::pixmap(listView()->mapIdx(idx));
|
||||||
|
}
|
||||||
|
void paintCell(QPainter* p, const QColorGroup& cg, int column, int width, int align);
|
||||||
|
|
||||||
|
ConfigItem* nextItem;
|
||||||
|
struct menu *menu;
|
||||||
|
bool visible;
|
||||||
|
bool goParent;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigLineEdit : public QLineEdit {
|
||||||
|
Q_OBJECT
|
||||||
|
typedef class QLineEdit Parent;
|
||||||
|
public:
|
||||||
|
ConfigLineEdit(ConfigView* parent);
|
||||||
|
ConfigView* parent(void) const
|
||||||
|
{
|
||||||
|
return (ConfigView*)Parent::parent();
|
||||||
|
}
|
||||||
|
void show(ConfigItem *i);
|
||||||
|
void keyPressEvent(QKeyEvent *e);
|
||||||
|
|
||||||
|
public:
|
||||||
|
ConfigItem *item;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigView : public Q3VBox {
|
||||||
|
Q_OBJECT
|
||||||
|
typedef class Q3VBox Parent;
|
||||||
|
public:
|
||||||
|
ConfigView(QWidget* parent, const char *name = 0);
|
||||||
|
~ConfigView(void);
|
||||||
|
static void updateList(ConfigItem* item);
|
||||||
|
static void updateListAll(void);
|
||||||
|
|
||||||
|
bool showName(void) const { return list->showName; }
|
||||||
|
bool showRange(void) const { return list->showRange; }
|
||||||
|
bool showData(void) const { return list->showData; }
|
||||||
|
public slots:
|
||||||
|
void setShowName(bool);
|
||||||
|
void setShowRange(bool);
|
||||||
|
void setShowData(bool);
|
||||||
|
void setOptionMode(QAction *);
|
||||||
|
signals:
|
||||||
|
void showNameChanged(bool);
|
||||||
|
void showRangeChanged(bool);
|
||||||
|
void showDataChanged(bool);
|
||||||
|
public:
|
||||||
|
ConfigList* list;
|
||||||
|
ConfigLineEdit* lineEdit;
|
||||||
|
|
||||||
|
static ConfigView* viewList;
|
||||||
|
ConfigView* nextView;
|
||||||
|
|
||||||
|
static QAction *showNormalAction;
|
||||||
|
static QAction *showAllAction;
|
||||||
|
static QAction *showPromptAction;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigInfoView : public Q3TextBrowser {
|
||||||
|
Q_OBJECT
|
||||||
|
typedef class Q3TextBrowser Parent;
|
||||||
|
public:
|
||||||
|
ConfigInfoView(QWidget* parent, const char *name = 0);
|
||||||
|
bool showDebug(void) const { return _showDebug; }
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void setInfo(struct menu *menu);
|
||||||
|
void saveSettings(void);
|
||||||
|
void setShowDebug(bool);
|
||||||
|
|
||||||
|
signals:
|
||||||
|
void showDebugChanged(bool);
|
||||||
|
void menuSelected(struct menu *);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void symbolInfo(void);
|
||||||
|
void menuInfo(void);
|
||||||
|
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);
|
||||||
|
|
||||||
|
struct symbol *sym;
|
||||||
|
struct menu *_menu;
|
||||||
|
bool _showDebug;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigSearchWindow : public QDialog {
|
||||||
|
Q_OBJECT
|
||||||
|
typedef class QDialog Parent;
|
||||||
|
public:
|
||||||
|
ConfigSearchWindow(ConfigMainWindow* parent, const char *name = 0);
|
||||||
|
|
||||||
|
public slots:
|
||||||
|
void saveSettings(void);
|
||||||
|
void search(void);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
QLineEdit* editField;
|
||||||
|
QPushButton* searchButton;
|
||||||
|
QSplitter* split;
|
||||||
|
ConfigView* list;
|
||||||
|
ConfigInfoView* info;
|
||||||
|
|
||||||
|
struct symbol **result;
|
||||||
|
};
|
||||||
|
|
||||||
|
class ConfigMainWindow : public Q3MainWindow {
|
||||||
|
Q_OBJECT
|
||||||
|
|
||||||
|
static Q3Action *saveAction;
|
||||||
|
static void conf_changed(void);
|
||||||
|
public:
|
||||||
|
ConfigMainWindow(void);
|
||||||
|
public slots:
|
||||||
|
void changeMenu(struct menu *);
|
||||||
|
void setMenuLink(struct menu *);
|
||||||
|
void listFocusChanged(void);
|
||||||
|
void goBack(void);
|
||||||
|
void loadConfig(void);
|
||||||
|
bool saveConfig(void);
|
||||||
|
void saveConfigAs(void);
|
||||||
|
void searchConfig(void);
|
||||||
|
void showSingleView(void);
|
||||||
|
void showSplitView(void);
|
||||||
|
void showFullView(void);
|
||||||
|
void showIntro(void);
|
||||||
|
void showAbout(void);
|
||||||
|
void saveSettings(void);
|
||||||
|
|
||||||
|
protected:
|
||||||
|
void closeEvent(QCloseEvent *e);
|
||||||
|
|
||||||
|
ConfigSearchWindow *searchWindow;
|
||||||
|
ConfigView *menuView;
|
||||||
|
ConfigList *menuList;
|
||||||
|
ConfigView *configView;
|
||||||
|
ConfigList *configList;
|
||||||
|
ConfigInfoView *helpText;
|
||||||
|
Q3ToolBar *toolBar;
|
||||||
|
Q3Action *backAction;
|
||||||
|
QSplitter* split1;
|
||||||
|
QSplitter* split2;
|
||||||
|
};
|
||||||
@@ -0,0 +1,7 @@
|
|||||||
|
if COND_lxdialog
|
||||||
|
MAYBE_lxdialog = lxdialog
|
||||||
|
endif
|
||||||
|
if COND_images
|
||||||
|
MAYBE_images = images
|
||||||
|
endif
|
||||||
|
SUBDIRS = parser $(MAYBE_images) $(MAYBE_lxdialog)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,13 @@
|
|||||||
|
noinst_LIBRARIES = libkconfig-images.a
|
||||||
|
|
||||||
|
libkconfig_images_a_SOURCES = images.c_orig
|
||||||
|
nodist_libkconfig_images_a_SOURCES = images.c
|
||||||
|
BUILT_SOURCES = images.c images.h
|
||||||
|
CLEANFILES = images.c images.h
|
||||||
|
|
||||||
|
images.c: images.c_orig
|
||||||
|
$(AM_V_GEN)$(SED) -r -e 's/^static //' $< >$@
|
||||||
|
|
||||||
|
images.h: images.c_orig
|
||||||
|
$(AM_V_GEN)$(SED) -r -e '/^static (const char \*xpm_(.+)\[\]) = \{/!d; s//extern \1;/' \
|
||||||
|
$< >$@
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,326 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (C) 2002 Roman Zippel <zippel@linux-m68k.org>
|
||||||
|
* Released under the terms of the GNU GPL v2.0.
|
||||||
|
*/
|
||||||
|
|
||||||
|
static const char *xpm_load[] = {
|
||||||
|
"22 22 5 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000000",
|
||||||
|
"c c #838100",
|
||||||
|
"a c #ffff00",
|
||||||
|
"b c #ffffff",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"............####....#.",
|
||||||
|
"...........#....##.##.",
|
||||||
|
"..................###.",
|
||||||
|
".................####.",
|
||||||
|
".####...........#####.",
|
||||||
|
"#abab##########.......",
|
||||||
|
"#babababababab#.......",
|
||||||
|
"#ababababababa#.......",
|
||||||
|
"#babababababab#.......",
|
||||||
|
"#ababab###############",
|
||||||
|
"#babab##cccccccccccc##",
|
||||||
|
"#abab##cccccccccccc##.",
|
||||||
|
"#bab##cccccccccccc##..",
|
||||||
|
"#ab##cccccccccccc##...",
|
||||||
|
"#b##cccccccccccc##....",
|
||||||
|
"###cccccccccccc##.....",
|
||||||
|
"##cccccccccccc##......",
|
||||||
|
"###############.......",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_save[] = {
|
||||||
|
"22 22 5 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000000",
|
||||||
|
"a c #838100",
|
||||||
|
"b c #c5c2c5",
|
||||||
|
"c c #cdb6d5",
|
||||||
|
"......................",
|
||||||
|
".####################.",
|
||||||
|
".#aa#bbbbbbbbbbbb#bb#.",
|
||||||
|
".#aa#bbbbbbbbbbbb#bb#.",
|
||||||
|
".#aa#bbbbbbbbbcbb####.",
|
||||||
|
".#aa#bbbccbbbbbbb#aa#.",
|
||||||
|
".#aa#bbbccbbbbbbb#aa#.",
|
||||||
|
".#aa#bbbbbbbbbbbb#aa#.",
|
||||||
|
".#aa#bbbbbbbbbbbb#aa#.",
|
||||||
|
".#aa#bbbbbbbbbbbb#aa#.",
|
||||||
|
".#aa#bbbbbbbbbbbb#aa#.",
|
||||||
|
".#aaa############aaa#.",
|
||||||
|
".#aaaaaaaaaaaaaaaaaa#.",
|
||||||
|
".#aaaaaaaaaaaaaaaaaa#.",
|
||||||
|
".#aaa#############aa#.",
|
||||||
|
".#aaa#########bbb#aa#.",
|
||||||
|
".#aaa#########bbb#aa#.",
|
||||||
|
".#aaa#########bbb#aa#.",
|
||||||
|
".#aaa#########bbb#aa#.",
|
||||||
|
".#aaa#########bbb#aa#.",
|
||||||
|
"..##################..",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_back[] = {
|
||||||
|
"22 22 3 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000083",
|
||||||
|
"a c #838183",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"...........######a....",
|
||||||
|
"..#......##########...",
|
||||||
|
"..##...####......##a..",
|
||||||
|
"..###.###.........##..",
|
||||||
|
"..######..........##..",
|
||||||
|
"..#####...........##..",
|
||||||
|
"..######..........##..",
|
||||||
|
"..#######.........##..",
|
||||||
|
"..########.......##a..",
|
||||||
|
"...............a###...",
|
||||||
|
"...............###....",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_tree_view[] = {
|
||||||
|
"22 22 2 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000000",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......########........",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......########........",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......#...............",
|
||||||
|
"......########........",
|
||||||
|
"......................",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_single_view[] = {
|
||||||
|
"22 22 2 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000000",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"..........#...........",
|
||||||
|
"......................",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_split_view[] = {
|
||||||
|
"22 22 2 1",
|
||||||
|
". c None",
|
||||||
|
"# c #000000",
|
||||||
|
"......................",
|
||||||
|
"......................",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......#......#........",
|
||||||
|
"......................",
|
||||||
|
"......................"};
|
||||||
|
|
||||||
|
static const char *xpm_symbol_no[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_symbol_mod[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_symbol_yes[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . .. . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_choice_no[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .... ",
|
||||||
|
" .. .. ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" . . ",
|
||||||
|
" .. .. ",
|
||||||
|
" .... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_choice_yes[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .... ",
|
||||||
|
" .. .. ",
|
||||||
|
" . . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . ",
|
||||||
|
" .. .. ",
|
||||||
|
" .... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_menu[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" . . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . ...... . ",
|
||||||
|
" . ...... . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_menu_inv[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" .......... ",
|
||||||
|
" .. ...... ",
|
||||||
|
" .. .... ",
|
||||||
|
" .. .. ",
|
||||||
|
" .. .. ",
|
||||||
|
" .. .... ",
|
||||||
|
" .. ...... ",
|
||||||
|
" .......... ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_menuback[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" .......... ",
|
||||||
|
" . . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . ...... . ",
|
||||||
|
" . ...... . ",
|
||||||
|
" . .... . ",
|
||||||
|
" . .. . ",
|
||||||
|
" . . ",
|
||||||
|
" .......... ",
|
||||||
|
" "};
|
||||||
|
|
||||||
|
static const char *xpm_void[] = {
|
||||||
|
"12 12 2 1",
|
||||||
|
" c white",
|
||||||
|
". c black",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" ",
|
||||||
|
" "};
|
||||||
@@ -0,0 +1,15 @@
|
|||||||
|
noinst_LIBRARIES = libkconfig-lxdialog.a
|
||||||
|
|
||||||
|
libkconfig_lxdialog_a_SOURCES = \
|
||||||
|
checklist.c \
|
||||||
|
dialog.h \
|
||||||
|
inputbox.c \
|
||||||
|
menubox.c \
|
||||||
|
textbox.c \
|
||||||
|
util.c \
|
||||||
|
yesno.c
|
||||||
|
|
||||||
|
libkconfig_lxdialog_a_CPPFLAGS = $(AM_CPPFLAGS) \
|
||||||
|
-DCURSES_LOC='"${CURSES_LOC}"' \
|
||||||
|
$(intl_CPPFLAGS)
|
||||||
|
liblxdialog_a_CFLAGS = $(AM_CFLAGS) $(kf_CFLAGS)
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,332 @@
|
|||||||
|
/*
|
||||||
|
* checklist.c -- implements the checklist box
|
||||||
|
*
|
||||||
|
* ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
|
||||||
|
* Stuart Herbert - S.Herbert@sheffield.ac.uk: radiolist extension
|
||||||
|
* Alessandro Rubini - rubini@ipvvis.unipv.it: merged the two
|
||||||
|
* MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dialog.h"
|
||||||
|
|
||||||
|
static int list_width, check_x, item_x;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Print list item
|
||||||
|
*/
|
||||||
|
static void print_item(WINDOW * win, int choice, int selected)
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
char *list_item = malloc(list_width + 1);
|
||||||
|
|
||||||
|
strncpy(list_item, item_str(), list_width - item_x);
|
||||||
|
list_item[list_width - item_x] = '\0';
|
||||||
|
|
||||||
|
/* Clear 'residue' of last item */
|
||||||
|
wattrset(win, dlg.menubox.atr);
|
||||||
|
wmove(win, choice, 0);
|
||||||
|
for (i = 0; i < list_width; i++)
|
||||||
|
waddch(win, ' ');
|
||||||
|
|
||||||
|
wmove(win, choice, check_x);
|
||||||
|
wattrset(win, selected ? dlg.check_selected.atr
|
||||||
|
: dlg.check.atr);
|
||||||
|
if (!item_is_tag(':'))
|
||||||
|
wprintw(win, "(%c)", item_is_tag('X') ? 'X' : ' ');
|
||||||
|
|
||||||
|
wattrset(win, selected ? dlg.tag_selected.atr : dlg.tag.atr);
|
||||||
|
mvwaddch(win, choice, item_x, list_item[0]);
|
||||||
|
wattrset(win, selected ? dlg.item_selected.atr : dlg.item.atr);
|
||||||
|
waddstr(win, list_item + 1);
|
||||||
|
if (selected) {
|
||||||
|
wmove(win, choice, check_x + 1);
|
||||||
|
wrefresh(win);
|
||||||
|
}
|
||||||
|
free(list_item);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Print the scroll indicators.
|
||||||
|
*/
|
||||||
|
static void print_arrows(WINDOW * win, int choice, int item_no, int scroll,
|
||||||
|
int y, int x, int height)
|
||||||
|
{
|
||||||
|
wmove(win, y, x);
|
||||||
|
|
||||||
|
if (scroll > 0) {
|
||||||
|
wattrset(win, dlg.uarrow.atr);
|
||||||
|
waddch(win, ACS_UARROW);
|
||||||
|
waddstr(win, "(-)");
|
||||||
|
} else {
|
||||||
|
wattrset(win, dlg.menubox.atr);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
}
|
||||||
|
|
||||||
|
y = y + height + 1;
|
||||||
|
wmove(win, y, x);
|
||||||
|
|
||||||
|
if ((height < item_no) && (scroll + choice < item_no - 1)) {
|
||||||
|
wattrset(win, dlg.darrow.atr);
|
||||||
|
waddch(win, ACS_DARROW);
|
||||||
|
waddstr(win, "(+)");
|
||||||
|
} else {
|
||||||
|
wattrset(win, dlg.menubox_border.atr);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
waddch(win, ACS_HLINE);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Display the termination buttons
|
||||||
|
*/
|
||||||
|
static void print_buttons(WINDOW * dialog, int height, int width, int selected)
|
||||||
|
{
|
||||||
|
int x = width / 2 - 11;
|
||||||
|
int y = height - 2;
|
||||||
|
|
||||||
|
print_button(dialog, gettext("Select"), y, x, selected == 0);
|
||||||
|
print_button(dialog, gettext(" Help "), y, x + 14, selected == 1);
|
||||||
|
|
||||||
|
wmove(dialog, y, x + 1 + 14 * selected);
|
||||||
|
wrefresh(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Display a dialog box with a list of options that can be turned on or off
|
||||||
|
* in the style of radiolist (only one option turned on at a time).
|
||||||
|
*/
|
||||||
|
int dialog_checklist(const char *title, const char *prompt, int height,
|
||||||
|
int width, int list_height)
|
||||||
|
{
|
||||||
|
int i, x, y, box_x, box_y;
|
||||||
|
int key = 0, button = 0, choice = 0, scroll = 0, max_choice;
|
||||||
|
WINDOW *dialog, *list;
|
||||||
|
|
||||||
|
/* which item to highlight */
|
||||||
|
item_foreach() {
|
||||||
|
if (item_is_tag('X'))
|
||||||
|
choice = item_n();
|
||||||
|
if (item_is_selected()) {
|
||||||
|
choice = item_n();
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
do_resize:
|
||||||
|
if (getmaxy(stdscr) < (height + 6))
|
||||||
|
return -ERRDISPLAYTOOSMALL;
|
||||||
|
if (getmaxx(stdscr) < (width + 6))
|
||||||
|
return -ERRDISPLAYTOOSMALL;
|
||||||
|
|
||||||
|
max_choice = MIN(list_height, item_count());
|
||||||
|
|
||||||
|
/* center dialog box on screen */
|
||||||
|
x = (COLS - width) / 2;
|
||||||
|
y = (LINES - height) / 2;
|
||||||
|
|
||||||
|
draw_shadow(stdscr, y, x, height, width);
|
||||||
|
|
||||||
|
dialog = newwin(height, width, y, x);
|
||||||
|
keypad(dialog, TRUE);
|
||||||
|
|
||||||
|
draw_box(dialog, 0, 0, height, width,
|
||||||
|
dlg.dialog.atr, dlg.border.atr);
|
||||||
|
wattrset(dialog, dlg.border.atr);
|
||||||
|
mvwaddch(dialog, height - 3, 0, ACS_LTEE);
|
||||||
|
for (i = 0; i < width - 2; i++)
|
||||||
|
waddch(dialog, ACS_HLINE);
|
||||||
|
wattrset(dialog, dlg.dialog.atr);
|
||||||
|
waddch(dialog, ACS_RTEE);
|
||||||
|
|
||||||
|
print_title(dialog, title, width);
|
||||||
|
|
||||||
|
wattrset(dialog, dlg.dialog.atr);
|
||||||
|
print_autowrap(dialog, prompt, width - 2, 1, 3);
|
||||||
|
|
||||||
|
list_width = width - 6;
|
||||||
|
box_y = height - list_height - 5;
|
||||||
|
box_x = (width - list_width) / 2 - 1;
|
||||||
|
|
||||||
|
/* create new window for the list */
|
||||||
|
list = subwin(dialog, list_height, list_width, y + box_y + 1,
|
||||||
|
x + box_x + 1);
|
||||||
|
|
||||||
|
keypad(list, TRUE);
|
||||||
|
|
||||||
|
/* draw a box around the list items */
|
||||||
|
draw_box(dialog, box_y, box_x, list_height + 2, list_width + 2,
|
||||||
|
dlg.menubox_border.atr, dlg.menubox.atr);
|
||||||
|
|
||||||
|
/* Find length of longest item in order to center checklist */
|
||||||
|
check_x = 0;
|
||||||
|
item_foreach()
|
||||||
|
check_x = MAX(check_x, strlen(item_str()) + 4);
|
||||||
|
check_x = MIN(check_x, list_width);
|
||||||
|
|
||||||
|
check_x = (list_width - check_x) / 2;
|
||||||
|
item_x = check_x + 4;
|
||||||
|
|
||||||
|
if (choice >= list_height) {
|
||||||
|
scroll = choice - list_height + 1;
|
||||||
|
choice -= scroll;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Print the list */
|
||||||
|
for (i = 0; i < max_choice; i++) {
|
||||||
|
item_set(scroll + i);
|
||||||
|
print_item(list, i, i == choice);
|
||||||
|
}
|
||||||
|
|
||||||
|
print_arrows(dialog, choice, item_count(), scroll,
|
||||||
|
box_y, box_x + check_x + 5, list_height);
|
||||||
|
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
|
||||||
|
wnoutrefresh(dialog);
|
||||||
|
wnoutrefresh(list);
|
||||||
|
doupdate();
|
||||||
|
|
||||||
|
while (key != KEY_ESC) {
|
||||||
|
key = wgetch(dialog);
|
||||||
|
|
||||||
|
for (i = 0; i < max_choice; i++) {
|
||||||
|
item_set(i + scroll);
|
||||||
|
if (toupper(key) == toupper(item_str()[0]))
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (i < max_choice || key == KEY_UP || key == KEY_DOWN ||
|
||||||
|
key == '+' || key == '-') {
|
||||||
|
if (key == KEY_UP || key == '-') {
|
||||||
|
if (!choice) {
|
||||||
|
if (!scroll)
|
||||||
|
continue;
|
||||||
|
/* Scroll list down */
|
||||||
|
if (list_height > 1) {
|
||||||
|
/* De-highlight current first item */
|
||||||
|
item_set(scroll);
|
||||||
|
print_item(list, 0, FALSE);
|
||||||
|
scrollok(list, TRUE);
|
||||||
|
wscrl(list, -1);
|
||||||
|
scrollok(list, FALSE);
|
||||||
|
}
|
||||||
|
scroll--;
|
||||||
|
item_set(scroll);
|
||||||
|
print_item(list, 0, TRUE);
|
||||||
|
print_arrows(dialog, choice, item_count(),
|
||||||
|
scroll, box_y, box_x + check_x + 5, list_height);
|
||||||
|
|
||||||
|
wnoutrefresh(dialog);
|
||||||
|
wrefresh(list);
|
||||||
|
|
||||||
|
continue; /* wait for another key press */
|
||||||
|
} else
|
||||||
|
i = choice - 1;
|
||||||
|
} else if (key == KEY_DOWN || key == '+') {
|
||||||
|
if (choice == max_choice - 1) {
|
||||||
|
if (scroll + choice >= item_count() - 1)
|
||||||
|
continue;
|
||||||
|
/* Scroll list up */
|
||||||
|
if (list_height > 1) {
|
||||||
|
/* De-highlight current last item before scrolling up */
|
||||||
|
item_set(scroll + max_choice - 1);
|
||||||
|
print_item(list,
|
||||||
|
max_choice - 1,
|
||||||
|
FALSE);
|
||||||
|
scrollok(list, TRUE);
|
||||||
|
wscrl(list, 1);
|
||||||
|
scrollok(list, FALSE);
|
||||||
|
}
|
||||||
|
scroll++;
|
||||||
|
item_set(scroll + max_choice - 1);
|
||||||
|
print_item(list, max_choice - 1, TRUE);
|
||||||
|
|
||||||
|
print_arrows(dialog, choice, item_count(),
|
||||||
|
scroll, box_y, box_x + check_x + 5, list_height);
|
||||||
|
|
||||||
|
wnoutrefresh(dialog);
|
||||||
|
wrefresh(list);
|
||||||
|
|
||||||
|
continue; /* wait for another key press */
|
||||||
|
} else
|
||||||
|
i = choice + 1;
|
||||||
|
}
|
||||||
|
if (i != choice) {
|
||||||
|
/* De-highlight current item */
|
||||||
|
item_set(scroll + choice);
|
||||||
|
print_item(list, choice, FALSE);
|
||||||
|
/* Highlight new item */
|
||||||
|
choice = i;
|
||||||
|
item_set(scroll + choice);
|
||||||
|
print_item(list, choice, TRUE);
|
||||||
|
wnoutrefresh(dialog);
|
||||||
|
wrefresh(list);
|
||||||
|
}
|
||||||
|
continue; /* wait for another key press */
|
||||||
|
}
|
||||||
|
switch (key) {
|
||||||
|
case 'H':
|
||||||
|
case 'h':
|
||||||
|
case '?':
|
||||||
|
button = 1;
|
||||||
|
/* fall-through */
|
||||||
|
case 'S':
|
||||||
|
case 's':
|
||||||
|
case ' ':
|
||||||
|
case '\n':
|
||||||
|
item_foreach()
|
||||||
|
item_set_selected(0);
|
||||||
|
item_set(scroll + choice);
|
||||||
|
item_set_selected(1);
|
||||||
|
delwin(list);
|
||||||
|
delwin(dialog);
|
||||||
|
return button;
|
||||||
|
case TAB:
|
||||||
|
case KEY_LEFT:
|
||||||
|
case KEY_RIGHT:
|
||||||
|
button = ((key == KEY_LEFT ? --button : ++button) < 0)
|
||||||
|
? 1 : (button > 1 ? 0 : button);
|
||||||
|
|
||||||
|
print_buttons(dialog, height, width, button);
|
||||||
|
wrefresh(dialog);
|
||||||
|
break;
|
||||||
|
case 'X':
|
||||||
|
case 'x':
|
||||||
|
key = KEY_ESC;
|
||||||
|
break;
|
||||||
|
case KEY_ESC:
|
||||||
|
key = on_key_esc(dialog);
|
||||||
|
break;
|
||||||
|
case KEY_RESIZE:
|
||||||
|
delwin(list);
|
||||||
|
delwin(dialog);
|
||||||
|
on_key_resize();
|
||||||
|
goto do_resize;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Now, update everything... */
|
||||||
|
doupdate();
|
||||||
|
}
|
||||||
|
delwin(list);
|
||||||
|
delwin(dialog);
|
||||||
|
return key; /* ESC pressed */
|
||||||
|
}
|
||||||
@@ -0,0 +1,230 @@
|
|||||||
|
/*
|
||||||
|
* dialog.h -- common declarations for all dialog modules
|
||||||
|
*
|
||||||
|
* AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <sys/types.h>
|
||||||
|
#include <fcntl.h>
|
||||||
|
#include <unistd.h>
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
#include <stdbool.h>
|
||||||
|
|
||||||
|
#ifndef KBUILD_NO_NLS
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# define gettext(Msgid) ((const char *) (Msgid))
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __sun__
|
||||||
|
#define CURS_MACROS
|
||||||
|
#endif
|
||||||
|
#include CURSES_LOC
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Colors in ncurses 1.9.9e do not work properly since foreground and
|
||||||
|
* background colors are OR'd rather than separately masked. This version
|
||||||
|
* of dialog was hacked to work with ncurses 1.9.9e, making it incompatible
|
||||||
|
* with standard curses. The simplest fix (to make this work with standard
|
||||||
|
* curses) uses the wbkgdset() function, not used in the original hack.
|
||||||
|
* Turn it off if we're building with 1.9.9e, since it just confuses things.
|
||||||
|
*/
|
||||||
|
#if defined(NCURSES_VERSION) && defined(_NEED_WRAP) && !defined(GCC_PRINTFLIKE)
|
||||||
|
#define OLD_NCURSES 1
|
||||||
|
#undef wbkgdset
|
||||||
|
#define wbkgdset(w,p) /*nothing */
|
||||||
|
#else
|
||||||
|
#define OLD_NCURSES 0
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define TR(params) _tracef params
|
||||||
|
|
||||||
|
#define KEY_ESC 27
|
||||||
|
#define TAB 9
|
||||||
|
#define MAX_LEN 2048
|
||||||
|
#define BUF_SIZE (10*1024)
|
||||||
|
#define MIN(x,y) (x < y ? x : y)
|
||||||
|
#define MAX(x,y) (x > y ? x : y)
|
||||||
|
|
||||||
|
#ifndef ACS_ULCORNER
|
||||||
|
#define ACS_ULCORNER '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_LLCORNER
|
||||||
|
#define ACS_LLCORNER '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_URCORNER
|
||||||
|
#define ACS_URCORNER '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_LRCORNER
|
||||||
|
#define ACS_LRCORNER '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_HLINE
|
||||||
|
#define ACS_HLINE '-'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_VLINE
|
||||||
|
#define ACS_VLINE '|'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_LTEE
|
||||||
|
#define ACS_LTEE '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_RTEE
|
||||||
|
#define ACS_RTEE '+'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_UARROW
|
||||||
|
#define ACS_UARROW '^'
|
||||||
|
#endif
|
||||||
|
#ifndef ACS_DARROW
|
||||||
|
#define ACS_DARROW 'v'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* error return codes */
|
||||||
|
#define ERRDISPLAYTOOSMALL (KEY_MAX + 1)
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Color definitions
|
||||||
|
*/
|
||||||
|
struct dialog_color {
|
||||||
|
chtype atr; /* Color attribute */
|
||||||
|
int fg; /* foreground */
|
||||||
|
int bg; /* background */
|
||||||
|
int hl; /* highlight this item */
|
||||||
|
};
|
||||||
|
|
||||||
|
struct dialog_info {
|
||||||
|
const char *backtitle;
|
||||||
|
struct dialog_color screen;
|
||||||
|
struct dialog_color shadow;
|
||||||
|
struct dialog_color dialog;
|
||||||
|
struct dialog_color title;
|
||||||
|
struct dialog_color border;
|
||||||
|
struct dialog_color button_active;
|
||||||
|
struct dialog_color button_inactive;
|
||||||
|
struct dialog_color button_key_active;
|
||||||
|
struct dialog_color button_key_inactive;
|
||||||
|
struct dialog_color button_label_active;
|
||||||
|
struct dialog_color button_label_inactive;
|
||||||
|
struct dialog_color inputbox;
|
||||||
|
struct dialog_color inputbox_border;
|
||||||
|
struct dialog_color searchbox;
|
||||||
|
struct dialog_color searchbox_title;
|
||||||
|
struct dialog_color searchbox_border;
|
||||||
|
struct dialog_color position_indicator;
|
||||||
|
struct dialog_color menubox;
|
||||||
|
struct dialog_color menubox_border;
|
||||||
|
struct dialog_color item;
|
||||||
|
struct dialog_color item_selected;
|
||||||
|
struct dialog_color tag;
|
||||||
|
struct dialog_color tag_selected;
|
||||||
|
struct dialog_color tag_key;
|
||||||
|
struct dialog_color tag_key_selected;
|
||||||
|
struct dialog_color check;
|
||||||
|
struct dialog_color check_selected;
|
||||||
|
struct dialog_color uarrow;
|
||||||
|
struct dialog_color darrow;
|
||||||
|
};
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Global variables
|
||||||
|
*/
|
||||||
|
extern struct dialog_info dlg;
|
||||||
|
extern char dialog_input_result[];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Function prototypes
|
||||||
|
*/
|
||||||
|
|
||||||
|
/* item list as used by checklist and menubox */
|
||||||
|
void item_reset(void);
|
||||||
|
void item_make(const char *fmt, ...);
|
||||||
|
void item_add_str(const char *fmt, ...);
|
||||||
|
void item_set_tag(char tag);
|
||||||
|
void item_set_data(void *p);
|
||||||
|
void item_set_selected(int val);
|
||||||
|
int item_activate_selected(void);
|
||||||
|
void *item_data(void);
|
||||||
|
char item_tag(void);
|
||||||
|
|
||||||
|
/* item list manipulation for lxdialog use */
|
||||||
|
#define MAXITEMSTR 200
|
||||||
|
struct dialog_item {
|
||||||
|
char str[MAXITEMSTR]; /* promtp displayed */
|
||||||
|
char tag;
|
||||||
|
void *data; /* pointer to menu item - used by menubox+checklist */
|
||||||
|
int selected; /* Set to 1 by dialog_*() function if selected. */
|
||||||
|
};
|
||||||
|
|
||||||
|
/* list of lialog_items */
|
||||||
|
struct dialog_list {
|
||||||
|
struct dialog_item node;
|
||||||
|
struct dialog_list *next;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern struct dialog_list *item_cur;
|
||||||
|
extern struct dialog_list item_nil;
|
||||||
|
extern struct dialog_list *item_head;
|
||||||
|
|
||||||
|
int item_count(void);
|
||||||
|
void item_set(int n);
|
||||||
|
int item_n(void);
|
||||||
|
const char *item_str(void);
|
||||||
|
int item_is_selected(void);
|
||||||
|
int item_is_tag(char tag);
|
||||||
|
#define item_foreach() \
|
||||||
|
for (item_cur = item_head ? item_head: item_cur; \
|
||||||
|
item_cur && (item_cur != &item_nil); item_cur = item_cur->next)
|
||||||
|
|
||||||
|
/* generic key handlers */
|
||||||
|
int on_key_esc(WINDOW *win);
|
||||||
|
int on_key_resize(void);
|
||||||
|
|
||||||
|
int init_dialog(const char *backtitle);
|
||||||
|
void set_dialog_backtitle(const char *backtitle);
|
||||||
|
void end_dialog(int x, int y);
|
||||||
|
void attr_clear(WINDOW * win, int height, int width, chtype attr);
|
||||||
|
void dialog_clear(void);
|
||||||
|
void print_autowrap(WINDOW * win, const char *prompt, int width, int y, int x);
|
||||||
|
void print_button(WINDOW * win, const char *label, int y, int x, int selected);
|
||||||
|
void print_title(WINDOW *dialog, const char *title, int width);
|
||||||
|
void draw_box(WINDOW * win, int y, int x, int height, int width, chtype box,
|
||||||
|
chtype border);
|
||||||
|
void draw_shadow(WINDOW * win, int y, int x, int height, int width);
|
||||||
|
|
||||||
|
int first_alpha(const char *string, const char *exempt);
|
||||||
|
int dialog_yesno(const char *title, const char *prompt, int height, int width);
|
||||||
|
int dialog_msgbox(const char *title, const char *prompt, int height,
|
||||||
|
int width, int pause);
|
||||||
|
int dialog_textbox(const char *title, const char *file, int height, int width);
|
||||||
|
int dialog_menu(const char *title, const char *prompt,
|
||||||
|
const void *selected, int *s_scroll);
|
||||||
|
int dialog_checklist(const char *title, const char *prompt, int height,
|
||||||
|
int width, int list_height);
|
||||||
|
extern char dialog_input_result[];
|
||||||
|
int dialog_inputbox(const char *title, const char *prompt, int height,
|
||||||
|
int width, const char *init);
|
||||||
|
|
||||||
|
/*
|
||||||
|
* This is the base for fictitious keys, which activate
|
||||||
|
* the buttons.
|
||||||
|
*
|
||||||
|
* Mouse-generated keys are the following:
|
||||||
|
* -- the first 32 are used as numbers, in addition to '0'-'9'
|
||||||
|
* -- the lowercase are used to signal mouse-enter events (M_EVENT + 'o')
|
||||||
|
* -- uppercase chars are used to invoke the button (M_EVENT + 'O')
|
||||||
|
*/
|
||||||
|
#define M_EVENT (KEY_MAX+1)
|
||||||
@@ -0,0 +1,238 @@
|
|||||||
|
/*
|
||||||
|
* inputbox.c -- implements the input box
|
||||||
|
*
|
||||||
|
* ORIGINAL AUTHOR: Savio Lam (lam836@cs.cuhk.hk)
|
||||||
|
* MODIFIED FOR LINUX KERNEL CONFIG BY: William Roadcap (roadcap@cfw.com)
|
||||||
|
*
|
||||||
|
* This program is free software; you can redistribute it and/or
|
||||||
|
* modify it under the terms of the GNU General Public License
|
||||||
|
* as published by the Free Software Foundation; either version 2
|
||||||
|
* of the License, or (at your option) any later version.
|
||||||
|
*
|
||||||
|
* This program is distributed in the hope that it will be useful,
|
||||||
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
* GNU General Public License for more details.
|
||||||
|
*
|
||||||
|
* You should have received a copy of the GNU General Public License
|
||||||
|
* along with this program; if not, write to the Free Software
|
||||||
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include "dialog.h"
|
||||||
|
|
||||||
|
char dialog_input_result[MAX_LEN + 1];
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Print the termination buttons
|
||||||
|
*/
|
||||||
|
static void print_buttons(WINDOW * dialog, int height, int width, int selected)
|
||||||
|
{
|
||||||
|
int x = width / 2 - 11;
|
||||||
|
int y = height - 2;
|
||||||
|
|
||||||
|
print_button(dialog, gettext(" Ok "), y, x, selected == 0);
|
||||||
|
print_button(dialog, gettext(" Help "), y, x + 14, selected == 1);
|
||||||
|
|
||||||
|
wmove(dialog, y, x + 1 + 14 * selected);
|
||||||
|
wrefresh(dialog);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Display a dialog box for inputing a string
|
||||||
|
*/
|
||||||
|
int dialog_inputbox(const char *title, const char *prompt, int height, int width,
|
||||||
|
const char *init)
|
||||||
|
{
|
||||||
|
int i, x, y, box_y, box_x, box_width;
|
||||||
|
int input_x = 0, scroll = 0, key = 0, button = -1;
|
||||||
|
char *instr = dialog_input_result;
|
||||||
|
WINDOW *dialog;
|
||||||
|
|
||||||
|
if (!init)
|
||||||
|
instr[0] = '\0';
|
||||||
|
else
|
||||||
|
strcpy(instr, init);
|
||||||
|
|
||||||
|
do_resize:
|
||||||
|
if (getmaxy(stdscr) <= (height - 2))
|
||||||
|
return -ERRDISPLAYTOOSMALL;
|
||||||
|
if (getmaxx(stdscr) <= (width - 2))
|
||||||
|
return -ERRDISPLAYTOOSMALL;
|
||||||
|
|
||||||
|
/* center dialog box on screen */
|
||||||
|
x = (COLS - width) / 2;
|
||||||
|
y = (LINES - height) / 2;
|
||||||
|
|
||||||
|
draw_shadow(stdscr, y, x, height, width);
|
||||||
|
|
||||||
|
dialog = newwin(height, width, y, x);
|
||||||
|
keypad(dialog, TRUE);
|
||||||
|
|
||||||
|
draw_box(dialog, 0, 0, height, width,
|
||||||
|
dlg.dialog.atr, dlg.border.atr);
|
||||||
|
wattrset(dialog, dlg.border.atr);
|
||||||
|
mvwaddch(dialog, height - 3, 0, ACS_LTEE);
|
||||||
|
for (i = 0; i < width - 2; i++)
|
||||||
|
waddch(dialog, ACS_HLINE);
|
||||||
|
wattrset(dialog, dlg.dialog.atr);
|
||||||
|
waddch(dialog, ACS_RTEE);
|
||||||
|
|
||||||
|
print_title(dialog, title, width);
|
||||||
|
|
||||||
|
wattrset(dialog, dlg.dialog.atr);
|
||||||
|
print_autowrap(dialog, prompt, width - 2, 1, 3);
|
||||||
|
|
||||||
|
/* Draw the input field box */
|
||||||
|
box_width = width - 6;
|
||||||
|
getyx(dialog, y, x);
|
||||||
|
box_y = y + 2;
|
||||||
|
box_x = (width - box_width) / 2;
|
||||||
|
draw_box(dialog, y + 1, box_x - 1, 3, box_width + 2,
|
||||||
|
dlg.dialog.atr, dlg.border.atr);
|
||||||
|
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
|
||||||
|
/* Set up the initial value */
|
||||||
|
wmove(dialog, box_y, box_x);
|
||||||
|
wattrset(dialog, dlg.inputbox.atr);
|
||||||
|
|
||||||
|
input_x = strlen(instr);
|
||||||
|
|
||||||
|
if (input_x >= box_width) {
|
||||||
|
scroll = input_x - box_width + 1;
|
||||||
|
input_x = box_width - 1;
|
||||||
|
for (i = 0; i < box_width - 1; i++)
|
||||||
|
waddch(dialog, instr[scroll + i]);
|
||||||
|
} else {
|
||||||
|
waddstr(dialog, instr);
|
||||||
|
}
|
||||||
|
|
||||||
|
wmove(dialog, box_y, box_x + input_x);
|
||||||
|
|
||||||
|
wrefresh(dialog);
|
||||||
|
|
||||||
|
while (key != KEY_ESC) {
|
||||||
|
key = wgetch(dialog);
|
||||||
|
|
||||||
|
if (button == -1) { /* Input box selected */
|
||||||
|
switch (key) {
|
||||||
|
case TAB:
|
||||||
|
case KEY_UP:
|
||||||
|
case KEY_DOWN:
|
||||||
|
break;
|
||||||
|
case KEY_LEFT:
|
||||||
|
continue;
|
||||||
|
case KEY_RIGHT:
|
||||||
|
continue;
|
||||||
|
case KEY_BACKSPACE:
|
||||||
|
case 127:
|
||||||
|
if (input_x || scroll) {
|
||||||
|
wattrset(dialog, dlg.inputbox.atr);
|
||||||
|
if (!input_x) {
|
||||||
|
scroll = scroll < box_width - 1 ? 0 : scroll - (box_width - 1);
|
||||||
|
wmove(dialog, box_y, box_x);
|
||||||
|
for (i = 0; i < box_width; i++)
|
||||||
|
waddch(dialog,
|
||||||
|
instr[scroll + input_x + i] ?
|
||||||
|
instr[scroll + input_x + i] : ' ');
|
||||||
|
input_x = strlen(instr) - scroll;
|
||||||
|
} else
|
||||||
|
input_x--;
|
||||||
|
instr[scroll + input_x] = '\0';
|
||||||
|
mvwaddch(dialog, box_y, input_x + box_x, ' ');
|
||||||
|
wmove(dialog, box_y, input_x + box_x);
|
||||||
|
wrefresh(dialog);
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
default:
|
||||||
|
if (key < 0x100 && isprint(key)) {
|
||||||
|
if (scroll + input_x < MAX_LEN) {
|
||||||
|
wattrset(dialog, dlg.inputbox.atr);
|
||||||
|
instr[scroll + input_x] = key;
|
||||||
|
instr[scroll + input_x + 1] = '\0';
|
||||||
|
if (input_x == box_width - 1) {
|
||||||
|
scroll++;
|
||||||
|
wmove(dialog, box_y, box_x);
|
||||||
|
for (i = 0; i < box_width - 1; i++)
|
||||||
|
waddch(dialog, instr [scroll + i]);
|
||||||
|
} else {
|
||||||
|
wmove(dialog, box_y, input_x++ + box_x);
|
||||||
|
waddch(dialog, key);
|
||||||
|
}
|
||||||
|
wrefresh(dialog);
|
||||||
|
} else
|
||||||
|
flash(); /* Alarm user about overflow */
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
switch (key) {
|
||||||
|
case 'O':
|
||||||
|
case 'o':
|
||||||
|
delwin(dialog);
|
||||||
|
return 0;
|
||||||
|
case 'H':
|
||||||
|
case 'h':
|
||||||
|
delwin(dialog);
|
||||||
|
return 1;
|
||||||
|
case KEY_UP:
|
||||||
|
case KEY_LEFT:
|
||||||
|
switch (button) {
|
||||||
|
case -1:
|
||||||
|
button = 1; /* Indicates "Help" button is selected */
|
||||||
|
print_buttons(dialog, height, width, 1);
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
button = -1; /* Indicates input box is selected */
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
wmove(dialog, box_y, box_x + input_x);
|
||||||
|
wrefresh(dialog);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
button = 0; /* Indicates "OK" button is selected */
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case TAB:
|
||||||
|
case KEY_DOWN:
|
||||||
|
case KEY_RIGHT:
|
||||||
|
switch (button) {
|
||||||
|
case -1:
|
||||||
|
button = 0; /* Indicates "OK" button is selected */
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
break;
|
||||||
|
case 0:
|
||||||
|
button = 1; /* Indicates "Help" button is selected */
|
||||||
|
print_buttons(dialog, height, width, 1);
|
||||||
|
break;
|
||||||
|
case 1:
|
||||||
|
button = -1; /* Indicates input box is selected */
|
||||||
|
print_buttons(dialog, height, width, 0);
|
||||||
|
wmove(dialog, box_y, box_x + input_x);
|
||||||
|
wrefresh(dialog);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
case ' ':
|
||||||
|
case '\n':
|
||||||
|
delwin(dialog);
|
||||||
|
return (button == -1 ? 0 : button);
|
||||||
|
case 'X':
|
||||||
|
case 'x':
|
||||||
|
key = KEY_ESC;
|
||||||
|
break;
|
||||||
|
case KEY_ESC:
|
||||||
|
key = on_key_esc(dialog);
|
||||||
|
break;
|
||||||
|
case KEY_RESIZE:
|
||||||
|
delwin(dialog);
|
||||||
|
on_key_resize();
|
||||||
|
goto do_resize;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
delwin(dialog);
|
||||||
|
return KEY_ESC; /* ESC pressed */
|
||||||
|
}
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user