Bug 368069 - RFE: Contribute Autotools plug-ins to the CDT
5
build/org.eclipse.cdt.autotools-feature/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
17
build/org.eclipse.cdt.autotools-feature/.project
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools-feature</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.FeatureBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.FeatureNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
138
build/org.eclipse.cdt.autotools-feature/ChangeLog
Normal file
|
@ -0,0 +1,138 @@
|
|||
2012-02-17 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* p2.inf: Add additional info so update path
|
||||
from old autotools feature to new works smoothly.
|
||||
|
||||
2012-01-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Refactor to org.eclipse.cdt.autotools-feature.
|
||||
|
||||
2011-08-16 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* pom.xml: Bump up feature to 3.0.1.
|
||||
* feature.xml: Ditto.
|
||||
|
||||
2011-05-10 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Resolves: #342895
|
||||
* feature.xml: Remove autotools compatibility plug-in. Bump up to
|
||||
version 3.0.0.
|
||||
* pom.xml: Update version number.
|
||||
|
||||
2010-12-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Bump up version to 2.0.1 for 0.7 release.
|
||||
|
||||
2010-05-18 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.properties: Fix provider name.
|
||||
|
||||
2010-04-26 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.properties: Match consistent license text (bug #306627). Update
|
||||
copyright year.
|
||||
* license.html: New file. HTML version of SUA (bug #306627).
|
||||
* build.properties: Include license.html.
|
||||
* about.html: Remove.
|
||||
* feature.xml: Use licenseURL property instead of explicit URL.
|
||||
|
||||
2010-04-12 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.properties: Match consistent license text (bug #306627).
|
||||
|
||||
2009-11-10 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.properties: Make featureName a bit more user-friendly.
|
||||
|
||||
2009-11-04 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Fix dependencies to support CDT 6.0.0 and up.
|
||||
|
||||
2009-11-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Fix feature id.
|
||||
|
||||
2009-10-21 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Add revised org.eclipse.linuxtools.cdt.autotools plug-in that has been
|
||||
set up for compatbility mode to build older projects.
|
||||
|
||||
2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Bump to 2.0.0. Refer to new org.eclipse.linuxtools.cdt.autotools.core and
|
||||
org.eclipse.linuxtools.cdt.autotools.ui plug-ins.
|
||||
|
||||
2009-04-24 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Fix dependencies to not require 6.0.0 CDT plugins as they
|
||||
aren't in the CDT Master zip yet for Galileo builds.
|
||||
|
||||
2009-04-23 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.xml: Use 6.0.0 CDT requirements on Galileo branch.
|
||||
|
||||
2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Bump up version to 1.0.2.
|
||||
|
||||
2009-01-08 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Fixes #260436
|
||||
|
||||
* feature.xml: Add .qualifier to version id.
|
||||
|
||||
2009-01-06 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.xml: Add update site information.
|
||||
* build.properties: Add feature.properties and epl-v10.html.
|
||||
|
||||
2008-10-31 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* feature.xml: Use %featureName, %provider, %copyright, and %description from
|
||||
feature.properties. Add "(Incubation)".
|
||||
* feature.properties: Initial import.
|
||||
* epl-v10.html: Likewise.
|
||||
|
||||
2008-10-14 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 1.0.1.
|
||||
|
||||
2008-08-08 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 1.0.0.
|
||||
|
||||
2008-01-28 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.6.
|
||||
|
||||
2007-12-05 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.5.3.
|
||||
|
||||
2007-11-19 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.5.2.
|
||||
|
||||
2007-10-23 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.5.1.
|
||||
|
||||
2007-10-04 jjohnstn <jjohnstn@vermillion>
|
||||
|
||||
* feature.xml: Update release to 0.9.5.
|
||||
|
||||
2007-09-24 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.4.
|
||||
|
||||
2007-09-05 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Update release to 0.9.3.
|
||||
|
||||
2007-08-17 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Fix up release number.
|
||||
|
||||
2007-07-19 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* feature.xml: Fix up description to not reference sample url.
|
5
build/org.eclipse.cdt.autotools-feature/build.properties
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin.includes = feature.xml,\
|
||||
epl-v10.html,\
|
||||
feature.properties,\
|
||||
p2.inf,\
|
||||
license.html
|
320
build/org.eclipse.cdt.autotools-feature/epl-v10.html
Normal file
|
@ -0,0 +1,320 @@
|
|||
<html xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns="http://www.w3.org/TR/REC-html40"><head>
|
||||
|
||||
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=windows-1252">
|
||||
<meta name="ProgId" content="Word.Document">
|
||||
<meta name="Generator" content="Microsoft Word 9">
|
||||
<meta name="Originator" content="Microsoft Word 9">
|
||||
<link rel="File-List" href="http://www.eclipse.org/legal/Eclipse%20EPL%202003_11_10%20Final_files/filelist.xml">
|
||||
<title>Eclipse Public License - Version 1.0</title>
|
||||
<!--[if gte mso 9]><xml>
|
||||
<o:DocumentProperties>
|
||||
<o:Revision>2</o:Revision>
|
||||
<o:TotalTime>3</o:TotalTime>
|
||||
<o:Created>2004-03-05T23:03:00Z</o:Created>
|
||||
<o:LastSaved>2004-03-05T23:03:00Z</o:LastSaved>
|
||||
<o:Pages>4</o:Pages>
|
||||
<o:Words>1626</o:Words>
|
||||
<o:Characters>9270</o:Characters>
|
||||
<o:Lines>77</o:Lines>
|
||||
<o:Paragraphs>18</o:Paragraphs>
|
||||
<o:CharactersWithSpaces>11384</o:CharactersWithSpaces>
|
||||
<o:Version>9.4402</o:Version>
|
||||
</o:DocumentProperties>
|
||||
</xml><![endif]--><!--[if gte mso 9]><xml>
|
||||
<w:WordDocument>
|
||||
<w:TrackRevisions/>
|
||||
</w:WordDocument>
|
||||
</xml><![endif]-->
|
||||
<style>
|
||||
<!--
|
||||
/* Font Definitions */
|
||||
@font-face
|
||||
{font-family:Tahoma;
|
||||
panose-1:2 11 6 4 3 5 4 4 2 4;
|
||||
mso-font-charset:0;
|
||||
mso-generic-font-family:swiss;
|
||||
mso-font-pitch:variable;
|
||||
mso-font-signature:553679495 -2147483648 8 0 66047 0;}
|
||||
/* Style Definitions */
|
||||
p.MsoNormal, li.MsoNormal, div.MsoNormal
|
||||
{mso-style-parent:"";
|
||||
margin:0in;
|
||||
margin-bottom:.0001pt;
|
||||
mso-pagination:widow-orphan;
|
||||
font-size:12.0pt;
|
||||
font-family:"Times New Roman";
|
||||
mso-fareast-font-family:"Times New Roman";}
|
||||
p
|
||||
{margin-right:0in;
|
||||
mso-margin-top-alt:auto;
|
||||
mso-margin-bottom-alt:auto;
|
||||
margin-left:0in;
|
||||
mso-pagination:widow-orphan;
|
||||
font-size:12.0pt;
|
||||
font-family:"Times New Roman";
|
||||
mso-fareast-font-family:"Times New Roman";}
|
||||
p.BalloonText, li.BalloonText, div.BalloonText
|
||||
{mso-style-name:"Balloon Text";
|
||||
margin:0in;
|
||||
margin-bottom:.0001pt;
|
||||
mso-pagination:widow-orphan;
|
||||
font-size:8.0pt;
|
||||
font-family:Tahoma;
|
||||
mso-fareast-font-family:"Times New Roman";}
|
||||
@page Section1
|
||||
{size:8.5in 11.0in;
|
||||
margin:1.0in 1.25in 1.0in 1.25in;
|
||||
mso-header-margin:.5in;
|
||||
mso-footer-margin:.5in;
|
||||
mso-paper-source:0;}
|
||||
div.Section1
|
||||
{page:Section1;}
|
||||
-->
|
||||
</style>
|
||||
</head><body style="" lang="EN-US">
|
||||
|
||||
<div class="Section1">
|
||||
|
||||
<p style="text-align: center;" align="center"><b>Eclipse Public License - v 1.0</b>
|
||||
</p>
|
||||
|
||||
<p><span style="font-size: 10pt;">THE ACCOMPANYING PROGRAM IS PROVIDED UNDER
|
||||
THE TERMS OF THIS ECLIPSE PUBLIC LICENSE ("AGREEMENT"). ANY USE,
|
||||
REPRODUCTION OR DISTRIBUTION OF THE PROGRAM CONSTITUTES RECIPIENT'S ACCEPTANCE
|
||||
OF THIS AGREEMENT.</span> </p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">1. DEFINITIONS</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">"Contribution" means:</span> </p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
|
||||
in the case of the initial Contributor, the initial code and documentation
|
||||
distributed under this Agreement, and<br clear="left">
|
||||
b) in the case of each subsequent Contributor:</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
|
||||
changes to the Program, and</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
|
||||
additions to the Program;</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">where
|
||||
such changes and/or additions to the Program originate from and are distributed
|
||||
by that particular Contributor. A Contribution 'originates' from a Contributor
|
||||
if it was added to the Program by such Contributor itself or anyone acting on
|
||||
such Contributor's behalf. Contributions do not include additions to the
|
||||
Program which: (i) are separate modules of software distributed in conjunction
|
||||
with the Program under their own license agreement, and (ii) are not derivative
|
||||
works of the Program. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">"Contributor" means any person or
|
||||
entity that distributes the Program.</span> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">"Licensed Patents " mean patent
|
||||
claims licensable by a Contributor which are necessarily infringed by the use
|
||||
or sale of its Contribution alone or when combined with the Program. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">"Program" means the Contributions
|
||||
distributed in accordance with this Agreement.</span> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">"Recipient" means anyone who
|
||||
receives the Program under this Agreement, including all Contributors.</span> </p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">2. GRANT OF RIGHTS</span></b> </p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
|
||||
Subject to the terms of this Agreement, each Contributor hereby grants Recipient
|
||||
a non-exclusive, worldwide, royalty-free copyright license to<span style="color: red;"> </span>reproduce, prepare derivative works of, publicly
|
||||
display, publicly perform, distribute and sublicense the Contribution of such
|
||||
Contributor, if any, and such derivative works, in source code and object code
|
||||
form.</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
|
||||
Subject to the terms of this Agreement, each Contributor hereby grants
|
||||
Recipient a non-exclusive, worldwide,<span style="color: green;"> </span>royalty-free
|
||||
patent license under Licensed Patents to make, use, sell, offer to sell, import
|
||||
and otherwise transfer the Contribution of such Contributor, if any, in source
|
||||
code and object code form. This patent license shall apply to the combination
|
||||
of the Contribution and the Program if, at the time the Contribution is added
|
||||
by the Contributor, such addition of the Contribution causes such combination
|
||||
to be covered by the Licensed Patents. The patent license shall not apply to
|
||||
any other combinations which include the Contribution. No hardware per se is
|
||||
licensed hereunder. </span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">c)
|
||||
Recipient understands that although each Contributor grants the licenses to its
|
||||
Contributions set forth herein, no assurances are provided by any Contributor
|
||||
that the Program does not infringe the patent or other intellectual property
|
||||
rights of any other entity. Each Contributor disclaims any liability to Recipient
|
||||
for claims brought by any other entity based on infringement of intellectual
|
||||
property rights or otherwise. As a condition to exercising the rights and
|
||||
licenses granted hereunder, each Recipient hereby assumes sole responsibility
|
||||
to secure any other intellectual property rights needed, if any. For example,
|
||||
if a third party patent license is required to allow Recipient to distribute
|
||||
the Program, it is Recipient's responsibility to acquire that license before
|
||||
distributing the Program.</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">d)
|
||||
Each Contributor represents that to its knowledge it has sufficient copyright
|
||||
rights in its Contribution, if any, to grant the copyright license set forth in
|
||||
this Agreement. </span></p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">3. REQUIREMENTS</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">A Contributor may choose to distribute the
|
||||
Program in object code form under its own license agreement, provided that:</span>
|
||||
</p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
|
||||
it complies with the terms and conditions of this Agreement; and</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b)
|
||||
its license agreement:</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">i)
|
||||
effectively disclaims on behalf of all Contributors all warranties and
|
||||
conditions, express and implied, including warranties or conditions of title
|
||||
and non-infringement, and implied warranties or conditions of merchantability
|
||||
and fitness for a particular purpose; </span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">ii)
|
||||
effectively excludes on behalf of all Contributors all liability for damages,
|
||||
including direct, indirect, special, incidental and consequential damages, such
|
||||
as lost profits; </span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iii)
|
||||
states that any provisions which differ from this Agreement are offered by that
|
||||
Contributor alone and not by any other party; and</span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">iv)
|
||||
states that source code for the Program is available from such Contributor, and
|
||||
informs licensees how to obtain it in a reasonable manner on or through a
|
||||
medium customarily used for software exchange.<span style="color: blue;"> </span></span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">When the Program is made available in source
|
||||
code form:</span> </p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">a)
|
||||
it must be made available under this Agreement; and </span></p>
|
||||
|
||||
<p class="MsoNormal" style="margin-left: 0.5in;"><span style="font-size: 10pt;">b) a
|
||||
copy of this Agreement must be included with each copy of the Program. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">Contributors may not remove or alter any
|
||||
copyright notices contained within the Program. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">Each Contributor must identify itself as the
|
||||
originator of its Contribution, if any, in a manner that reasonably allows
|
||||
subsequent Recipients to identify the originator of the Contribution. </span></p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">4. COMMERCIAL DISTRIBUTION</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">Commercial distributors of software may
|
||||
accept certain responsibilities with respect to end users, business partners
|
||||
and the like. While this license is intended to facilitate the commercial use
|
||||
of the Program, the Contributor who includes the Program in a commercial
|
||||
product offering should do so in a manner which does not create potential
|
||||
liability for other Contributors. Therefore, if a Contributor includes the
|
||||
Program in a commercial product offering, such Contributor ("Commercial
|
||||
Contributor") hereby agrees to defend and indemnify every other
|
||||
Contributor ("Indemnified Contributor") against any losses, damages and
|
||||
costs (collectively "Losses") arising from claims, lawsuits and other
|
||||
legal actions brought by a third party against the Indemnified Contributor to
|
||||
the extent caused by the acts or omissions of such Commercial Contributor in
|
||||
connection with its distribution of the Program in a commercial product
|
||||
offering. The obligations in this section do not apply to any claims or Losses
|
||||
relating to any actual or alleged intellectual property infringement. In order
|
||||
to qualify, an Indemnified Contributor must: a) promptly notify the Commercial
|
||||
Contributor in writing of such claim, and b) allow the Commercial Contributor
|
||||
to control, and cooperate with the Commercial Contributor in, the defense and
|
||||
any related settlement negotiations. The Indemnified Contributor may participate
|
||||
in any such claim at its own expense.</span> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">For example, a Contributor might include the
|
||||
Program in a commercial product offering, Product X. That Contributor is then a
|
||||
Commercial Contributor. If that Commercial Contributor then makes performance
|
||||
claims, or offers warranties related to Product X, those performance claims and
|
||||
warranties are such Commercial Contributor's responsibility alone. Under this
|
||||
section, the Commercial Contributor would have to defend claims against the
|
||||
other Contributors related to those performance claims and warranties, and if a
|
||||
court requires any other Contributor to pay any damages as a result, the
|
||||
Commercial Contributor must pay those damages.</span> </p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">5. NO WARRANTY</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
|
||||
AGREEMENT, THE PROGRAM IS PROVIDED ON AN "AS IS" BASIS, WITHOUT
|
||||
WARRANTIES OR CONDITIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED INCLUDING,
|
||||
WITHOUT LIMITATION, ANY WARRANTIES OR CONDITIONS OF TITLE, NON-INFRINGEMENT,
|
||||
MERCHANTABILITY OR FITNESS FOR A PARTICULAR PURPOSE. Each Recipient is solely
|
||||
responsible for determining the appropriateness of using and distributing the
|
||||
Program and assumes all risks associated with its exercise of rights under this
|
||||
Agreement , including but not limited to the risks and costs of program errors,
|
||||
compliance with applicable laws, damage to or loss of data, programs or
|
||||
equipment, and unavailability or interruption of operations. </span></p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">6. DISCLAIMER OF LIABILITY</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">EXCEPT AS EXPRESSLY SET FORTH IN THIS
|
||||
AGREEMENT, NEITHER RECIPIENT NOR ANY CONTRIBUTORS SHALL HAVE ANY LIABILITY FOR
|
||||
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
|
||||
(INCLUDING WITHOUT LIMITATION LOST PROFITS), HOWEVER CAUSED AND ON ANY THEORY
|
||||
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OR DISTRIBUTION OF
|
||||
THE PROGRAM OR THE EXERCISE OF ANY RIGHTS GRANTED HEREUNDER, EVEN IF ADVISED OF
|
||||
THE POSSIBILITY OF SUCH DAMAGES.</span> </p>
|
||||
|
||||
<p><b><span style="font-size: 10pt;">7. GENERAL</span></b> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">If any provision of this Agreement is invalid
|
||||
or unenforceable under applicable law, it shall not affect the validity or
|
||||
enforceability of the remainder of the terms of this Agreement, and without
|
||||
further action by the parties hereto, such provision shall be reformed to the
|
||||
minimum extent necessary to make such provision valid and enforceable.</span> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">If Recipient institutes patent litigation
|
||||
against any entity (including a cross-claim or counterclaim in a lawsuit)
|
||||
alleging that the Program itself (excluding combinations of the Program with
|
||||
other software or hardware) infringes such Recipient's patent(s), then such
|
||||
Recipient's rights granted under Section 2(b) shall terminate as of the date
|
||||
such litigation is filed. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">All Recipient's rights under this Agreement
|
||||
shall terminate if it fails to comply with any of the material terms or
|
||||
conditions of this Agreement and does not cure such failure in a reasonable
|
||||
period of time after becoming aware of such noncompliance. If all Recipient's
|
||||
rights under this Agreement terminate, Recipient agrees to cease use and
|
||||
distribution of the Program as soon as reasonably practicable. However,
|
||||
Recipient's obligations under this Agreement and any licenses granted by
|
||||
Recipient relating to the Program shall continue and survive. </span></p>
|
||||
|
||||
<p><span style="font-size: 10pt;">Everyone is permitted to copy and distribute
|
||||
copies of this Agreement, but in order to avoid inconsistency the Agreement is
|
||||
copyrighted and may only be modified in the following manner. The Agreement
|
||||
Steward reserves the right to publish new versions (including revisions) of
|
||||
this Agreement from time to time. No one other than the Agreement Steward has
|
||||
the right to modify this Agreement. The Eclipse Foundation is the initial
|
||||
Agreement Steward. The Eclipse Foundation may assign the responsibility to
|
||||
serve as the Agreement Steward to a suitable separate entity. Each new version
|
||||
of the Agreement will be given a distinguishing version number. The Program
|
||||
(including Contributions) may always be distributed subject to the version of
|
||||
the Agreement under which it was received. In addition, after a new version of
|
||||
the Agreement is published, Contributor may elect to distribute the Program
|
||||
(including its Contributions) under the new version. Except as expressly stated
|
||||
in Sections 2(a) and 2(b) above, Recipient receives no rights or licenses to
|
||||
the intellectual property of any Contributor under this Agreement, whether
|
||||
expressly, by implication, estoppel or otherwise. All rights in the Program not
|
||||
expressly granted under this Agreement are reserved.</span> </p>
|
||||
|
||||
<p><span style="font-size: 10pt;">This Agreement is governed by the laws of the
|
||||
State of New York and the intellectual property laws of the United States of
|
||||
America. No party to this Agreement will bring a legal action under this
|
||||
Agreement more than one year after the cause of action arose. Each party waives
|
||||
its rights to a jury trial in any resulting litigation.</span> </p>
|
||||
|
||||
<p class="MsoNormal"><!--[if !supportEmptyParas]--> <!--[endif]--><o:p></o:p></p>
|
||||
|
||||
</div>
|
||||
|
||||
</body></html>
|
139
build/org.eclipse.cdt.autotools-feature/feature.properties
Normal file
|
@ -0,0 +1,139 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2008 Red Hat, Inc.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
#################################################################################
|
||||
featureName=Autotools support for CDT
|
||||
description=Plugins for maintaining C/C++ projects that use Autotools (autoconf and automake).
|
||||
provider=Eclipse CDT
|
||||
copyright=Copyright 2006, 2007, 2008, 2009, 2010 Red Hat, Inc.
|
||||
licenseURL=license.html
|
||||
license=\
|
||||
Eclipse Foundation Software User Agreement\n\
|
||||
February 1, 2011\n\
|
||||
\n\
|
||||
Usage Of Content\n\
|
||||
\n\
|
||||
THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR\n\
|
||||
OTHER MATERIALS FOR OPEN SOURCE PROJECTS (COLLECTIVELY "CONTENT").\n\
|
||||
USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS\n\
|
||||
AGREEMENT AND/OR THE TERMS AND CONDITIONS OF LICENSE AGREEMENTS OR\n\
|
||||
NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU\n\
|
||||
AGREE THAT YOUR USE OF THE CONTENT IS GOVERNED BY THIS AGREEMENT\n\
|
||||
AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS\n\
|
||||
OR NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE\n\
|
||||
TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND CONDITIONS\n\
|
||||
OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED\n\
|
||||
BELOW, THEN YOU MAY NOT USE THE CONTENT.\n\
|
||||
\n\
|
||||
Applicable Licenses\n\
|
||||
\n\
|
||||
Unless otherwise indicated, all Content made available by the\n\
|
||||
Eclipse Foundation is provided to you under the terms and conditions of\n\
|
||||
the Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is\n\
|
||||
provided with this Content and is also available at http://www.eclipse.org/legal/epl-v10.html.\n\
|
||||
For purposes of the EPL, "Program" will mean the Content.\n\
|
||||
\n\
|
||||
Content includes, but is not limited to, source code, object code,\n\
|
||||
documentation and other files maintained in the Eclipse Foundation source code\n\
|
||||
repository ("Repository") in software modules ("Modules") and made available\n\
|
||||
as downloadable archives ("Downloads").\n\
|
||||
\n\
|
||||
- Content may be structured and packaged into modules to facilitate delivering,\n\
|
||||
extending, and upgrading the Content. Typical modules may include plug-ins ("Plug-ins"),\n\
|
||||
plug-in fragments ("Fragments"), and features ("Features").\n\
|
||||
- Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java(TM) ARchive)\n\
|
||||
in a directory named "plugins".\n\
|
||||
- A Feature is a bundle of one or more Plug-ins and/or Fragments and associated material.\n\
|
||||
Each Feature may be packaged as a sub-directory in a directory named "features".\n\
|
||||
Within a Feature, files named "feature.xml" may contain a list of the names and version\n\
|
||||
numbers of the Plug-ins and/or Fragments associated with that Feature.\n\
|
||||
- Features may also include other Features ("Included Features"). Within a Feature, files\n\
|
||||
named "feature.xml" may contain a list of the names and version numbers of Included Features.\n\
|
||||
\n\
|
||||
The terms and conditions governing Plug-ins and Fragments should be\n\
|
||||
contained in files named "about.html" ("Abouts"). The terms and\n\
|
||||
conditions governing Features and Included Features should be contained\n\
|
||||
in files named "license.html" ("Feature Licenses"). Abouts and Feature\n\
|
||||
Licenses may be located in any directory of a Download or Module\n\
|
||||
including, but not limited to the following locations:\n\
|
||||
\n\
|
||||
- The top-level (root) directory\n\
|
||||
- Plug-in and Fragment directories\n\
|
||||
- Inside Plug-ins and Fragments packaged as JARs\n\
|
||||
- Sub-directories of the directory named "src" of certain Plug-ins\n\
|
||||
- Feature directories\n\
|
||||
\n\
|
||||
Note: if a Feature made available by the Eclipse Foundation is installed using the\n\
|
||||
Provisioning Technology (as defined below), you must agree to a license ("Feature \n\
|
||||
Update License") during the installation process. If the Feature contains\n\
|
||||
Included Features, the Feature Update License should either provide you\n\
|
||||
with the terms and conditions governing the Included Features or inform\n\
|
||||
you where you can locate them. Feature Update Licenses may be found in\n\
|
||||
the "license" property of files named "feature.properties" found within a Feature.\n\
|
||||
Such Abouts, Feature Licenses, and Feature Update Licenses contain the\n\
|
||||
terms and conditions (or references to such terms and conditions) that\n\
|
||||
govern your use of the associated Content in that directory.\n\
|
||||
\n\
|
||||
THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER\n\
|
||||
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.\n\
|
||||
SOME OF THESE OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):\n\
|
||||
\n\
|
||||
- Eclipse Distribution License Version 1.0 (available at http://www.eclipse.org/licenses/edl-v1.0.html)\n\
|
||||
- Common Public License Version 1.0 (available at http://www.eclipse.org/legal/cpl-v10.html)\n\
|
||||
- Apache Software License 1.1 (available at http://www.apache.org/licenses/LICENSE)\n\
|
||||
- Apache Software License 2.0 (available at http://www.apache.org/licenses/LICENSE-2.0)\n\
|
||||
- Metro Link Public License 1.00 (available at http://www.opengroup.org/openmotif/supporters/metrolink/license.html)\n\
|
||||
- Mozilla Public License Version 1.1 (available at http://www.mozilla.org/MPL/MPL-1.1.html)\n\
|
||||
\n\
|
||||
IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND CONDITIONS PRIOR\n\
|
||||
TO USE OF THE CONTENT. If no About, Feature License, or Feature Update License\n\
|
||||
is provided, please contact the Eclipse Foundation to determine what terms and conditions\n\
|
||||
govern that particular Content.\n\
|
||||
\n\
|
||||
\n\Use of Provisioning Technology\n\
|
||||
\n\
|
||||
The Eclipse Foundation makes available provisioning software, examples of which include,\n\
|
||||
but are not limited to, p2 and the Eclipse Update Manager ("Provisioning Technology") for\n\
|
||||
the purpose of allowing users to install software, documentation, information and/or\n\
|
||||
other materials (collectively "Installable Software"). This capability is provided with\n\
|
||||
the intent of allowing such users to install, extend and update Eclipse-based products.\n\
|
||||
Information about packaging Installable Software is available at\n\
|
||||
http://eclipse.org/equinox/p2/repository_packaging.html ("Specification").\n\
|
||||
\n\
|
||||
You may use Provisioning Technology to allow other parties to install Installable Software.\n\
|
||||
You shall be responsible for enabling the applicable license agreements relating to the\n\
|
||||
Installable Software to be presented to, and accepted by, the users of the Provisioning Technology\n\
|
||||
in accordance with the Specification. By using Provisioning Technology in such a manner and\n\
|
||||
making it available in accordance with the Specification, you further acknowledge your\n\
|
||||
agreement to, and the acquisition of all necessary rights to permit the following:\n\
|
||||
\n\
|
||||
1. A series of actions may occur ("Provisioning Process") in which a user may execute\n\
|
||||
the Provisioning Technology on a machine ("Target Machine") with the intent of installing,\n\
|
||||
extending or updating the functionality of an Eclipse-based product.\n\
|
||||
2. During the Provisioning Process, the Provisioning Technology may cause third party\n\
|
||||
Installable Software or a portion thereof to be accessed and copied to the Target Machine.\n\
|
||||
3. Pursuant to the Specification, you will provide to the user the terms and conditions that\n\
|
||||
govern the use of the Installable Software ("Installable Software Agreement") and such\n\
|
||||
Installable Software Agreement shall be accessed from the Target Machine in accordance\n\
|
||||
with the Specification. Such Installable Software Agreement must inform the user of the\n\
|
||||
terms and conditions that govern the Installable Software and must solicit acceptance by\n\
|
||||
the end user in the manner prescribed in such Installable Software Agreement. Upon such\n\
|
||||
indication of agreement by the user, the provisioning Technology will complete installation\n\
|
||||
of the Installable Software.\n\
|
||||
\n\
|
||||
Cryptography\n\
|
||||
\n\
|
||||
Content may contain encryption software. The country in which you are\n\
|
||||
currently may have restrictions on the import, possession, and use,\n\
|
||||
and/or re-export to another country, of encryption software. BEFORE\n\
|
||||
using any encryption software, please check the country's laws,\n\
|
||||
regulations and policies concerning the import, possession, or use, and\n\
|
||||
re-export of encryption software, to see if this is permitted.\n\
|
||||
\n\
|
||||
Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.\n
|
67
build/org.eclipse.cdt.autotools-feature/feature.xml
Normal file
|
@ -0,0 +1,67 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<feature
|
||||
id="org.eclipse.cdt.autotools"
|
||||
label="%featureName"
|
||||
version="3.0.1.qualifier"
|
||||
provider-name="%provider">
|
||||
|
||||
<description>
|
||||
%description
|
||||
</description>
|
||||
|
||||
<copyright>
|
||||
%copyright
|
||||
</copyright>
|
||||
|
||||
<license url="%licenseURL">
|
||||
%license
|
||||
</license>
|
||||
|
||||
<url>
|
||||
<update label="%updateSiteName" url="http://download.eclipse.org/tools/cdt/releases/indigo"/>
|
||||
</url>
|
||||
|
||||
<requires>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.core" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.core" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.ui" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.managedbuilder.gnu.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.cheatsheets"/>
|
||||
<import plugin="org.eclipse.ui" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.runtime" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.jface.text" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.editors" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.workbench.texteditor" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.resources" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.ide" version="3.4.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.make.core" version="5.1.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.cdt.make.ui" version="5.0.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.console" version="3.3.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.help" version="3.3.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.variables" version="3.2.100" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.ui.views" version="3.3.0" match="greaterOrEqual"/>
|
||||
<import plugin="org.eclipse.core.filesystem" version="1.2.0" match="greaterOrEqual"/>
|
||||
</requires>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.core"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.ui"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"
|
||||
unpack="false"/>
|
||||
|
||||
<plugin
|
||||
id="org.eclipse.cdt.autotools.docs"
|
||||
download-size="0"
|
||||
install-size="0"
|
||||
version="0.0.0"/>
|
||||
|
||||
</feature>
|
164
build/org.eclipse.cdt.autotools-feature/license.html
Normal file
|
@ -0,0 +1,164 @@
|
|||
<!--?xml version="1.0" encoding="ISO-8859-1" ?-->
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml"><head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
||||
<title>Eclipse Foundation Software User Agreement</title>
|
||||
</head>
|
||||
|
||||
<body lang="EN-US">
|
||||
<h2>Eclipse Foundation Software User Agreement</h2>
|
||||
<p>February 1, 2011</p>
|
||||
|
||||
<h3>Usage Of Content</h3>
|
||||
|
||||
<p>THE ECLIPSE FOUNDATION MAKES AVAILABLE SOFTWARE, DOCUMENTATION, INFORMATION AND/OR OTHER MATERIALS FOR OPEN SOURCE PROJECTS
|
||||
(COLLECTIVELY "CONTENT"). USE OF THE CONTENT IS GOVERNED BY THE TERMS AND CONDITIONS OF THIS AGREEMENT AND/OR THE TERMS AND
|
||||
CONDITIONS OF LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW. BY USING THE CONTENT, YOU AGREE THAT YOUR USE
|
||||
OF THE CONTENT IS GOVERNED BY THIS AGREEMENT AND/OR THE TERMS AND CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR
|
||||
NOTICES INDICATED OR REFERENCED BELOW. IF YOU DO NOT AGREE TO THE TERMS AND CONDITIONS OF THIS AGREEMENT AND THE TERMS AND
|
||||
CONDITIONS OF ANY APPLICABLE LICENSE AGREEMENTS OR NOTICES INDICATED OR REFERENCED BELOW, THEN YOU MAY NOT USE THE CONTENT.</p>
|
||||
|
||||
<h3>Applicable Licenses</h3>
|
||||
|
||||
<p>Unless otherwise indicated, all Content made available by the Eclipse
|
||||
Foundation is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0
|
||||
("EPL"). A copy of the EPL is provided with this Content and is also
|
||||
available at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>Content includes, but is not limited to, source code, object code,
|
||||
documentation and other files maintained in the Eclipse Foundation
|
||||
source code
|
||||
repository ("Repository") in software modules ("Modules") and made
|
||||
available as downloadable archives ("Downloads").</p>
|
||||
|
||||
<ul>
|
||||
<li>Content may be structured and packaged into modules to
|
||||
facilitate delivering, extending, and upgrading the Content. Typical
|
||||
modules may include plug-ins ("Plug-ins"), plug-in fragments
|
||||
("Fragments"), and features ("Features").</li>
|
||||
<li>Each Plug-in or Fragment may be packaged as a sub-directory or JAR (Java™ ARchive) in a directory named "plugins".</li>
|
||||
<li>A Feature is a bundle of one or more Plug-ins and/or
|
||||
Fragments and associated material. Each Feature may be packaged as a
|
||||
sub-directory in a directory named "features". Within a Feature, files
|
||||
named "feature.xml" may contain a list of the names and version numbers
|
||||
of the Plug-ins
|
||||
and/or Fragments associated with that Feature.</li>
|
||||
<li>Features may also include other Features ("Included
|
||||
Features"). Within a Feature, files named "feature.xml" may contain a
|
||||
list of the names and version numbers of Included Features.</li>
|
||||
</ul>
|
||||
|
||||
<p>The terms and conditions governing Plug-ins and Fragments should be
|
||||
contained in files named "about.html" ("Abouts"). The terms and
|
||||
conditions governing Features and
|
||||
Included Features should be contained in files named "license.html"
|
||||
("Feature Licenses"). Abouts and Feature Licenses may be located in any
|
||||
directory of a Download or Module
|
||||
including, but not limited to the following locations:</p>
|
||||
|
||||
<ul>
|
||||
<li>The top-level (root) directory</li>
|
||||
<li>Plug-in and Fragment directories</li>
|
||||
<li>Inside Plug-ins and Fragments packaged as JARs</li>
|
||||
<li>Sub-directories of the directory named "src" of certain Plug-ins</li>
|
||||
<li>Feature directories</li>
|
||||
</ul>
|
||||
|
||||
<p>Note: if a Feature made available by the Eclipse Foundation is
|
||||
installed using the Provisioning Technology (as defined below), you must
|
||||
agree to a license ("Feature Update License") during the
|
||||
installation process. If the Feature contains Included Features, the
|
||||
Feature Update License should either provide you with the terms and
|
||||
conditions governing the Included Features or
|
||||
inform you where you can locate them. Feature Update Licenses may be
|
||||
found in the "license" property of files named "feature.properties"
|
||||
found within a Feature.
|
||||
Such Abouts, Feature Licenses, and Feature Update Licenses contain the
|
||||
terms and conditions (or references to such terms and conditions) that
|
||||
govern your use of the associated Content in
|
||||
that directory.</p>
|
||||
|
||||
<p>THE ABOUTS, FEATURE LICENSES, AND FEATURE UPDATE LICENSES MAY REFER
|
||||
TO THE EPL OR OTHER LICENSE AGREEMENTS, NOTICES OR TERMS AND CONDITIONS.
|
||||
SOME OF THESE
|
||||
OTHER LICENSE AGREEMENTS MAY INCLUDE (BUT ARE NOT LIMITED TO):</p>
|
||||
|
||||
<ul>
|
||||
<li>Eclipse Distribution License Version 1.0 (available at <a href="http://www.eclipse.org/licenses/edl-v10.html">http://www.eclipse.org/licenses/edl-v1.0.html</a>)</li>
|
||||
<li>Common Public License Version 1.0 (available at <a href="http://www.eclipse.org/legal/cpl-v10.html">http://www.eclipse.org/legal/cpl-v10.html</a>)</li>
|
||||
<li>Apache Software License 1.1 (available at <a href="http://www.apache.org/licenses/LICENSE">http://www.apache.org/licenses/LICENSE</a>)</li>
|
||||
<li>Apache Software License 2.0 (available at <a href="http://www.apache.org/licenses/LICENSE-2.0">http://www.apache.org/licenses/LICENSE-2.0</a>)</li>
|
||||
<li>Metro Link Public License 1.00 (available at <a href="http://www.opengroup.org/openmotif/supporters/metrolink/license.html">http://www.opengroup.org/openmotif/supporters/metrolink/license.html</a>)</li>
|
||||
<li>Mozilla Public License Version 1.1 (available at <a href="http://www.mozilla.org/MPL/MPL-1.1.html">http://www.mozilla.org/MPL/MPL-1.1.html</a>)</li>
|
||||
</ul>
|
||||
|
||||
<p>IT IS YOUR OBLIGATION TO READ AND ACCEPT ALL SUCH TERMS AND
|
||||
CONDITIONS PRIOR TO USE OF THE CONTENT. If no About, Feature License,
|
||||
or Feature Update License is provided, please
|
||||
contact the Eclipse Foundation to determine what terms and conditions
|
||||
govern that particular Content.</p>
|
||||
|
||||
|
||||
<h3>Use of Provisioning Technology</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available provisioning software,
|
||||
examples of which include, but are not limited to, p2 and the Eclipse
|
||||
Update Manager ("Provisioning Technology") for the purpose of
|
||||
allowing users to install software, documentation, information and/or
|
||||
other materials (collectively "Installable Software"). This
|
||||
capability is provided with the intent of allowing such users to
|
||||
install, extend and update Eclipse-based products. Information about
|
||||
packaging Installable Software is available at <a href="http://eclipse.org/equinox/p2/repository_packaging.html">http://eclipse.org/equinox/p2/repository_packaging.html</a>
|
||||
("Specification").</p>
|
||||
|
||||
<p>You may use Provisioning Technology to allow other parties to install
|
||||
Installable Software. You shall be responsible for enabling the
|
||||
applicable license agreements relating to the Installable Software to
|
||||
be presented to, and accepted by, the users of the Provisioning
|
||||
Technology
|
||||
in accordance with the Specification. By using Provisioning
|
||||
Technology in such a manner and making it available in accordance with
|
||||
the
|
||||
Specification, you further acknowledge your agreement to, and the
|
||||
acquisition of all necessary rights to permit the following:</p>
|
||||
|
||||
<ol>
|
||||
<li>A series of actions may occur ("Provisioning Process") in
|
||||
which a user may execute the Provisioning Technology
|
||||
on a machine ("Target Machine") with the intent of installing,
|
||||
extending or updating the functionality of an Eclipse-based
|
||||
product.</li>
|
||||
<li>During the Provisioning Process, the Provisioning Technology
|
||||
may cause third party Installable Software or a portion thereof to be
|
||||
accessed and copied to the Target Machine.</li>
|
||||
<li>Pursuant to the Specification, you will provide to the user
|
||||
the terms and conditions that govern the use of the Installable
|
||||
Software ("Installable Software Agreement") and such Installable
|
||||
Software Agreement shall be accessed from the Target
|
||||
Machine in accordance with the Specification. Such Installable
|
||||
Software Agreement must inform the user of the terms and conditions that
|
||||
govern
|
||||
the Installable Software and must solicit acceptance by the end
|
||||
user in the manner prescribed in such Installable Software Agreement.
|
||||
Upon such
|
||||
indication of agreement by the user, the provisioning Technology
|
||||
will complete installation of the Installable Software.</li>
|
||||
</ol>
|
||||
|
||||
<h3>Cryptography</h3>
|
||||
|
||||
<p>Content may contain encryption software. The country in which you are
|
||||
currently may have restrictions on the import, possession, and use,
|
||||
and/or re-export to
|
||||
another country, of encryption software. BEFORE using any encryption
|
||||
software, please check the country's laws, regulations and policies
|
||||
concerning the import,
|
||||
possession, or use, and re-export of encryption software, to see if
|
||||
this is permitted.</p>
|
||||
|
||||
<p><small>Java and all Java-based trademarks are trademarks of Oracle Corporation in the United States, other countries, or both.</small></p>
|
||||
|
||||
|
||||
</body></html>
|
8
build/org.eclipse.cdt.autotools-feature/p2.inf
Normal file
|
@ -0,0 +1,8 @@
|
|||
update.id=org.eclipse.linuxtools.cdt.autotools.feature.group
|
||||
update.range=(0,$version$)
|
||||
provides.99.namespace=org.eclipse.equinox.p2.iu
|
||||
provides.99.name=org.eclipse.linuxtools.cdt.autotools.feature.group
|
||||
provides.99.version=$version$
|
||||
instructions.configure=\
|
||||
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/tools/cdt/releases/indigo,type:0,name:CDT,enabled:false); \
|
||||
org.eclipse.equinox.p2.touchpoint.eclipse.addRepository(location:http${#58}//download.eclipse.org/tools/cdt/releases/indigo,type:1,name:CDT,enabled:false);
|
18
build/org.eclipse.cdt.autotools-feature/pom.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.cdt</groupId>
|
||||
<artifactId>cdt-parent</artifactId>
|
||||
<version>8.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<groupId>org.eclipse.cdt.features</groupId>
|
||||
<version>3.0.1-SNAPSHOT</version>
|
||||
<artifactId>org.eclipse.cdt.autotools</artifactId>
|
||||
<packaging>eclipse-feature</packaging>
|
||||
</project>
|
7
build/org.eclipse.cdt.autotools.core/.classpath
Normal file
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
5
build/org.eclipse.cdt.autotools.core/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
34
build/org.eclipse.cdt.autotools.core/.project
Normal file
|
@ -0,0 +1,34 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools.core</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.api.tools.apiAnalysisBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
<nature>org.eclipse.pde.api.tools.apiAnalysisNature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.6
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.6
|
|
@ -0,0 +1,3 @@
|
|||
#Tue Jan 02 14:11:13 EST 2007
|
||||
eclipse.preferences.version=1
|
||||
internal.default.compliance=default
|
4354
build/org.eclipse.cdt.autotools.core/ChangeLog
Normal file
33
build/org.eclipse.cdt.autotools.core/META-INF/MANIFEST.MF
Normal file
|
@ -0,0 +1,33 @@
|
|||
Manifest-Version: 1.0
|
||||
Bundle-ManifestVersion: 2
|
||||
Bundle-Name: %Bundle-Name.0
|
||||
Bundle-SymbolicName: org.eclipse.cdt.autotools.core;singleton:=true
|
||||
Bundle-Version: 1.0.2.qualifier
|
||||
Bundle-Activator: org.eclipse.cdt.autotools.core.AutotoolsPlugin
|
||||
Bundle-Localization: plugin
|
||||
Require-Bundle: org.eclipse.ui;bundle-version="3.4.0",
|
||||
org.eclipse.core.runtime;bundle-version="3.4.0",
|
||||
org.eclipse.jface.text;bundle-version="3.4.0",
|
||||
org.eclipse.ui.editors;bundle-version="3.4.0",
|
||||
org.eclipse.ui.workbench.texteditor;bundle-version="3.4.0",
|
||||
org.eclipse.core.resources;bundle-version="3.4.0",
|
||||
org.eclipse.ui.ide;bundle-version="3.4.0",
|
||||
org.eclipse.cdt.managedbuilder.core;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.core;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.ui;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.managedbuilder.ui;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.managedbuilder.gnu.ui;bundle-version="5.0.100",
|
||||
org.eclipse.cdt.make.core;bundle-version="5.1.0",
|
||||
org.eclipse.cdt.make.ui;bundle-version="5.0.100",
|
||||
org.eclipse.ui.console;bundle-version="3.3.0",
|
||||
org.eclipse.help;bundle-version="3.3.100",
|
||||
org.eclipse.core.variables;bundle-version="3.2.100",
|
||||
org.eclipse.ui.views;bundle-version="3.3.0",
|
||||
org.eclipse.core.filesystem;bundle-version="1.2.0"
|
||||
Bundle-ActivationPolicy: lazy
|
||||
Bundle-Vendor: %provider
|
||||
Export-Package: org.eclipse.cdt.autotools.core,
|
||||
org.eclipse.cdt.internal.autotools.core,
|
||||
org.eclipse.cdt.internal.autotools.core.configure
|
||||
nt: J2SE-1.5
|
||||
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
|
28
build/org.eclipse.cdt.autotools.core/about.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
||||
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"/>
|
||||
<title>About</title>
|
||||
</head>
|
||||
<body lang="EN-US">
|
||||
<h2>About This Content</h2>
|
||||
|
||||
<p>June 5, 2006</p>
|
||||
<h3>License</h3>
|
||||
|
||||
<p>The Eclipse Foundation makes available all content in this plug-in ("Content"). Unless otherwise
|
||||
indicated below, the Content is provided to you under the terms and conditions of the
|
||||
Eclipse Public License Version 1.0 ("EPL"). A copy of the EPL is available
|
||||
at <a href="http://www.eclipse.org/legal/epl-v10.html">http://www.eclipse.org/legal/epl-v10.html</a>.
|
||||
For purposes of the EPL, "Program" will mean the Content.</p>
|
||||
|
||||
<p>If you did not receive this Content directly from the Eclipse Foundation, the Content is
|
||||
being redistributed by another party ("Redistributor") and different terms and conditions may
|
||||
apply to your use of any object code in the Content. Check the Redistributor's license that was
|
||||
provided with the Content. If no such license exists, contact the Redistributor. Unless otherwise
|
||||
indicated below, the terms and conditions of the EPL still apply to any source code in the Content
|
||||
and such source code may be obtained at <a href="http://www.eclipse.org/">http://www.eclipse.org</a>.</p>
|
||||
|
||||
</body>
|
||||
</html>
|
9
build/org.eclipse.cdt.autotools.core/build.properties
Normal file
|
@ -0,0 +1,9 @@
|
|||
source.. = src/
|
||||
output.. = bin/
|
||||
bin.includes = plugin.xml,\
|
||||
META-INF/,\
|
||||
.,\
|
||||
html/,\
|
||||
about.html,\
|
||||
plugin.properties
|
||||
src.includes = about.html
|
13
build/org.eclipse.cdt.autotools.core/html/maintopic.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Main Topic</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Main Topic</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
13
build/org.eclipse.cdt.autotools.core/html/subtopic.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Sub Topic</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Sub Topic</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
13
build/org.eclipse.cdt.autotools.core/html/toc.html
Normal file
|
@ -0,0 +1,13 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<title>Table of Contents</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Table of Contents</h1>
|
||||
Please enter your text here.
|
||||
</body>
|
||||
</html>
|
180
build/org.eclipse.cdt.autotools.core/plugin.properties
Normal file
|
@ -0,0 +1,180 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2006, 2008, 2009 Red Hat, Inc.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
#################################################################################
|
||||
ConvertWizard.description=Convert to C/C++ Autotools Project
|
||||
NewCProject.description=GNU C Autotools Project
|
||||
NewCProjectV2.description=GNU C Autootols Project V2
|
||||
NewCCProject.description=GNU C++ Autotools Project
|
||||
NewCWizard.name=GNU C Autotools Project
|
||||
NewCWizardV2.name=GNU C Autotools Project V2
|
||||
NewCCWizard.name=GNU C++ Autotools Project
|
||||
|
||||
Autotools.wizard.name=GNU Autotools Build Wizard
|
||||
|
||||
Autoconf.editor.name=Autoconf Editor
|
||||
|
||||
BuildProperty.value.name.default=Default;
|
||||
BuildProperty.type.name.autotools=GNU Autotools
|
||||
|
||||
PreferenceAutotools.name=Autotools
|
||||
PreferenceAutomakeEditor.name=Automake Editor
|
||||
PreferenceAutoconfEditor.name=Autoconf Editor
|
||||
|
||||
PropertyAutotools.name=Autotools
|
||||
PropertyAutotools.general.name=General
|
||||
PropertyAutotools.configure.name=Configure Settings
|
||||
PropertyTabEditor.name=Editors
|
||||
AutotoolsBuildPropertyTab.name=Behaviour
|
||||
AutotoolsEditorsPropertyTab.name=Editors
|
||||
AutotoolsToolsPropertyTab.name=Tools Settings
|
||||
AutotoolsConfigurePropertyTab.name=Configure Settings
|
||||
|
||||
PropertyTabEditor.tooltip=Set options for Autotools-specific editors
|
||||
PropertyTabBuild.tooltip=Set additional Autotools build options
|
||||
|
||||
Makefile.builder.name=Autotools Makefile Generator
|
||||
Autotools.projecttype.name=GNU Autotools
|
||||
AutotoolsNature.name=Autotools Project Nature
|
||||
AutotoolsNewNature.name=Autotools Project Nature V2
|
||||
Configuration.build.name=Build (GNU)
|
||||
Autotools.targetplatform.name=GNU Autotools Target Platform
|
||||
Autotools.gnu.toolchain.name=GNU Autotools Toolchain
|
||||
Configure.outputType=Configure Output (config.status)
|
||||
Autogen.outputType=Autogen Output (configure)
|
||||
|
||||
CommandCategorySource.name=Source
|
||||
CommandCategorySource.description=Source commands
|
||||
CommandCategoryTools.name=Tools
|
||||
CommandCategoryTools.description=Autotool tools
|
||||
ShowTooltip.name=Show Tooltip Description
|
||||
ShowTooltip.description=Shows the tooltip description for the element at the cursor
|
||||
|
||||
# Scope and Key Commands
|
||||
ACeditor.scope.name=Autoconf Editor
|
||||
ACeditor.scope.description=Editor for Autoconf Configuration Source Files
|
||||
|
||||
Tool.configure=configure
|
||||
|
||||
OptionCategory.configure.general=General
|
||||
Option.configure.name=Name
|
||||
Option.configure.builddir=Build directory
|
||||
Option.configure.builddir.tip=Subdirectory off of project where build will occur
|
||||
Option.configure.configdir=Configure tool directory
|
||||
Option.configure.configdir.tip=Subdirectory off of project containing configure scripts
|
||||
Option.configure.cache_file=Name of configuration cache file (--cache-file)
|
||||
Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
|
||||
Option.configure.no_create=Turn off file creation <not advised> (--no-create)
|
||||
Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
|
||||
Option.configure.quiet=Turn off checking messages (--quiet)
|
||||
Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
|
||||
Option.configure.help=Display help contents of top-level configuration (--help)
|
||||
Option.configure.help.tip=Ask configuration file to display its help documentation
|
||||
Option.configure.version=Display version of autotools used to create configuration (--version)
|
||||
Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
|
||||
|
||||
OptionCategory.configure.platform=Platform Specifiers
|
||||
Option.configure.host=Host platform (--host)
|
||||
Option.configure.host.tip=Platform that project will run on
|
||||
Option.configure.target=Target platform (--target)
|
||||
Option.configure.target.tip=Platform that project will target output for
|
||||
Option.configure.build=Build platform (--build)
|
||||
Option.configure.build.tip=Platform where project is being built
|
||||
|
||||
OptionCategory.configure.directories=Directory specifiers
|
||||
Option.configure.prefix=Arch-independent install directory (--prefix)
|
||||
Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
|
||||
Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
|
||||
Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
|
||||
Option.configure.libdir=Object code library directory (--libdir)
|
||||
Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
|
||||
Option.configure.bindir=User executable directory (--bindir)
|
||||
Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
|
||||
Option.configure.sbindir=System admin executable directory (--sbindir)
|
||||
Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
|
||||
Option.configure.includedir=C Header file directory (--includdir)
|
||||
Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
|
||||
Option.configure.datadir=Read-only architecture-independent data (--datadir)
|
||||
Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
|
||||
Option.configure.sysconfdir=Read-only single-machine data directory (--syconfdir)
|
||||
Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
|
||||
Option.configure.infodir=Info file documentation directory (--infodir)
|
||||
Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
|
||||
Option.configure.mandir=Man file documentation directory (--mandir)
|
||||
Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
|
||||
Option.configure.srcdir=Sources directory (--srcdir)
|
||||
Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
|
||||
Option.configure.localstatedir=Modifiable single-machine data directory (--localstatedir)
|
||||
Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
|
||||
Option.configure.sharedstatedir=Modifiable architecture-independent data directory (--sharedstatedir)
|
||||
Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
|
||||
Option.configure.libexecdir=Program executable directory (--libexecdir)
|
||||
Option.configure.libexecdir=Place where program executables will be installed [EPREFIX/libexec]
|
||||
Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
|
||||
Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
|
||||
|
||||
OptionCategory.configure.filenames=File-name transformations
|
||||
Option.configure.program_prefix=Installed program prefix (--program-prefix)
|
||||
Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
|
||||
Option.configure.program_suffix=Installed program suffix (--program-suffix)
|
||||
Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
|
||||
Option.configure.program_transform_name=Installed program name transform (--program-transform-name)
|
||||
Option.configure.program_transform_name.tip=A sed string used to transform installed program names
|
||||
|
||||
OptionCategory.configure.features=Features and packages
|
||||
Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
|
||||
Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
|
||||
Option.configure.user=User-specified configuration options
|
||||
Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
|
||||
|
||||
Tool.autogen = autogen.sh
|
||||
|
||||
OptionCategory.autogen.general=Options
|
||||
Option.autogen.user=Command line options
|
||||
Option.autogen.user.tip=Specify options to pass to the top-level autogen.sh script
|
||||
|
||||
RedHatVendor.name = Red Hat
|
||||
Bundle-Name.0 = Autotools Plug-in
|
||||
provider=Eclipse CDT
|
||||
ConvertWizard.name = Convert to a C/C++ Autotools Project
|
||||
InvokeAutotools.label = Invoke Autotools
|
||||
InvokeAutotools.mnemonic = I
|
||||
InvokeAutoconf.label = Invoke Autoconf
|
||||
InvokeAutoconf.mnemonic = c
|
||||
InvokeAutoconf.description = Run autoconf in the selected directory
|
||||
InvokeAutoheader.label = Invoke Autoheader
|
||||
InvokeAutoheader.mnemonic = h
|
||||
InvokeAutoheader.description = Run autoheader from the selected directory
|
||||
InvokeAutomake.label = Invoke Automake
|
||||
InvokeAutomake.mnemonic = m
|
||||
InvokeAutomake.description = Run automake from the selected directory
|
||||
InvokeAutoreconf.label = Invoke Autoreconf
|
||||
InvokeAutoreconf.mnemonic = r
|
||||
InvokeAutoreconf.description = Run autoreconf from the selected directory
|
||||
InvokeAclocal.label = Invoke Aclocal
|
||||
InvokeAclocal.mnemonic = l
|
||||
InvokeAclocal.description = Run aclocal from the selected directory
|
||||
InvokeLibtoolize.label = Invoke Libtoolize
|
||||
InvokeLibtoolize.mnemonic = t
|
||||
InvokeLibtoolize.description = Run libtoolize in the selected directory
|
||||
Reconfigure.label = Reconfigure Project
|
||||
Reconfigure.mnemonic = f
|
||||
Reconfigure.description = Run configuration scripts for project
|
||||
DynamicBuild.label = Dynamic Build Info
|
||||
GetIncludePath.label = Get Include Path
|
||||
GetDefinedSymbols.label = Get Defined Symbols
|
||||
IncludesOption.name = includes
|
||||
SymbolsOption.name = symbols
|
||||
AutomakeEditor.name = AutomakeEditor
|
||||
Automake.name = automake
|
||||
ConfigureScript.name=Configure Script
|
||||
AutogenScript.name=Autogen Script
|
||||
|
||||
AutotoolsProblemMarker.name=Configure Problem
|
||||
AutotoolsErrorParser.name=Autotools Error Parser
|
568
build/org.eclipse.cdt.autotools.core/plugin.xml
Normal file
|
@ -0,0 +1,568 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<?eclipse version="3.0"?>
|
||||
<plugin>
|
||||
|
||||
<extension
|
||||
id="autotoolsProperties"
|
||||
name="Autotools Build Properties"
|
||||
point="org.eclipse.cdt.managedbuilder.core.buildProperties">
|
||||
<propertyValue
|
||||
property="org.eclipse.cdt.build.core.buildType"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
|
||||
name="%BuildProperty.value.name.default"/>
|
||||
<propertyValue
|
||||
property="org.eclipse.cdt.build.core.buildArtefactType"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
|
||||
name="%BuildProperty.type.name.autotools"/>
|
||||
</extension>
|
||||
<extension
|
||||
id="cdt.autotools.core.managed.build.info"
|
||||
name="Autotools Managed Build Info"
|
||||
point="org.eclipse.cdt.managedbuilder.core.buildDefinitions">
|
||||
<managedBuildRevision fileVersion="4.0.0"/>
|
||||
<tool
|
||||
command="configure"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"
|
||||
isAbstract="false"
|
||||
name="%Tool.configure"
|
||||
natureFilter="both"
|
||||
supportsManagedBuild="false">
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
name="%OptionCategory.configure.general"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.name"
|
||||
resourceFilter="all"
|
||||
valueHandler="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
valueType="string">
|
||||
</option>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
defaultValue="build"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.builddir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.builddir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.builddir.tip"
|
||||
valueHandler="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
valueType="string"/>
|
||||
<option
|
||||
applicabilityCalculator="org.eclipse.cdt.internal.autotools.core.configure.AutotoolsOptionValueHandler"
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.configdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.configdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.configdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--cache-file="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.cache_file"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.cache_file"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.cache_file.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--help"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.help"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.help"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.help.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--no-create"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.no_create"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.no_create"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.no_create.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--quiet"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.quiet"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.quiet"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.quiet.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.general"
|
||||
command="--version"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.version"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.version"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.version.tip"
|
||||
valueType="boolean"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
name="%OptionCategory.configure.platform"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--host="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.host"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.host"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.host.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--target="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.target"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.target"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.target.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.configure.optionCategory.configure.platform"
|
||||
command="--build="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.build"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.build"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.build.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
name="%OptionCategory.configure.directories"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--exec-prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.exec_prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.exec_prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.exec_prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--libdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.libdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.libdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--bindir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.bindir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.bindir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.bindir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sbindir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sbindir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sbindir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sbindir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--includedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.includedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.includedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.includedir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--datadir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.datadir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.datadir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.datadir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sysconfdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sysconfdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sysconfdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sysconfdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--infodir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.infodir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.infodir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.infodir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--mandir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.mandir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.mandir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.mandir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--srcdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.srcdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.srcdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.srcdir.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--localstatedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.localstatedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.localstatedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.localstatedir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--sharedstatedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.sharedstatedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.sharedstatedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.sharedstatedir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--libexecdir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.libexecdir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.libexecdir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.libexecdir"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.directories"
|
||||
command="--oldincludedir="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.oldincludedir"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.oldincludedir"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.oldincludedir.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
name="%OptionCategory.configure.filenames"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-prefix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_prefix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_prefix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_prefix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-suffix="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.program_suffix"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_suffix"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_suffix.tip"
|
||||
valueType="string"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.filenames"
|
||||
command="--program-transform-name="
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.program_transform_name"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.program_transform_name"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.program_transform_name.tip"
|
||||
valueType="string"/>
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
name="%OptionCategory.configure.features"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
command="--enable-maintainer-mode"
|
||||
defaultValue="false"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.enable_maintainer_mode"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.enable_maintainer_mode"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.enable_maintainer_mode.tip"
|
||||
valueType="boolean"/>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.configure.features"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.configure.user"
|
||||
isAbstract="false"
|
||||
name="%Option.configure.user"
|
||||
resourceFilter="all"
|
||||
tip="%Option.configure.user.tip"
|
||||
valueType="string"/>
|
||||
<outputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.outputType.configure"
|
||||
name="%Configure.outputType"
|
||||
outputs="status"
|
||||
primaryOutput="true"/>
|
||||
<inputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.inputType.configure"
|
||||
multipleOfType="false"
|
||||
sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.configureScript">
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool
|
||||
command="autogen.sh"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen"
|
||||
isAbstract="false"
|
||||
name="%Tool.autogen"
|
||||
natureFilter="both"
|
||||
supportsManagedBuild="false">
|
||||
<optionCategory
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
|
||||
name="%OptionCategory.autogen.general"
|
||||
owner="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
|
||||
</optionCategory>
|
||||
<option
|
||||
category="org.eclipse.linuxtools.cdt.autotools.core.optionCategory.autogen.general"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.option.autogen.user"
|
||||
isAbstract="false"
|
||||
name="%Option.autogen.user"
|
||||
resourceFilter="all"
|
||||
tip="%Option.autogen.user.tip"
|
||||
valueType="string">
|
||||
</option>
|
||||
<outputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.outputType.autogen"
|
||||
name="%Autogen.outputType"
|
||||
outputNames="configure"
|
||||
primaryOutput="true">
|
||||
</outputType>
|
||||
<inputType
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.inputType.autogen"
|
||||
multipleOfType="false"
|
||||
sourceContentType="org.eclipse.linuxtools.cdt.autotools.core.autogenScript">
|
||||
</inputType>
|
||||
</tool>
|
||||
<targetPlatform
|
||||
archList="all"
|
||||
binaryParser="org.eclipse.cdt.core.ELF;org.eclipse.cdt.core.GNU_ELF"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform"
|
||||
isAbstract="false"
|
||||
name="%Autotools.targetplatform.name"/>
|
||||
<projectType
|
||||
buildArtefactType="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.projectType"
|
||||
isAbstract="false">
|
||||
<configuration
|
||||
buildProperties="org.eclipse.linuxtools.cdt.autotools.core.buildType.default"
|
||||
cleanCommand="rm -rf"
|
||||
errorParsers="org.eclipse.cdt.core.MakeErrorParser;org.eclipse.cdt.core.GCCErrorParser;org.eclipse.cdt.core.GLDErrorParser;org.eclipse.cdt.core.GASErrorParser"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.configuration.build"
|
||||
name="%Configuration.build.name">
|
||||
<toolChain
|
||||
archList="all"
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolChain"
|
||||
name="%Autotools.gnu.toolchain.name"
|
||||
scannerConfigDiscoveryProfileId="org.eclipse.cdt.make.core.GCCStandardMakePerFileProfile"
|
||||
supportsManagedBuild="false"
|
||||
targetTool="org.eclipse.linuxtools.cdt.autotools.core.tool.configure">
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.configure"/>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.autogen"
|
||||
isAbstract="false"
|
||||
natureFilter="both"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.tool.autogen">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gcc"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.c.compiler">
|
||||
</tool>
|
||||
<tool
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.tool.gpp"
|
||||
isAbstract="false"
|
||||
superClass="cdt.managedbuild.tool.gnu.cpp.compiler">
|
||||
</tool>
|
||||
<targetPlatform
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.targetPlatform"
|
||||
isAbstract="false"
|
||||
name="%Autotools.targetplatform.name"
|
||||
superClass="org.eclipse.linuxtools.cdt.autotools.core.targetPlatform">
|
||||
</targetPlatform>
|
||||
<builder
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.toolchain.builder"
|
||||
isAbstract="false"
|
||||
isVariableCaseSensitive="false">
|
||||
</builder>
|
||||
<supportedProperties>
|
||||
<property
|
||||
id="org.eclipse.cdt.build.core.buildArtefactType">
|
||||
<value
|
||||
id="org.eclipse.linuxtools.cdt.autotools.core.buildArtefactType.autotools">
|
||||
</value>
|
||||
</property>
|
||||
</supportedProperties>
|
||||
</toolChain>
|
||||
</configuration>
|
||||
</projectType>
|
||||
</extension>
|
||||
<extension
|
||||
id="autotoolsNatureV2"
|
||||
name="%AutotoolsNewNature.name"
|
||||
point="org.eclipse.core.resources.natures">
|
||||
<requires-nature
|
||||
id="org.eclipse.cdt.managedbuilder.core.managedBuildNature">
|
||||
</requires-nature>
|
||||
<runtime>
|
||||
<run
|
||||
class="org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature">
|
||||
</run>
|
||||
</runtime>
|
||||
<builder
|
||||
id="org.eclipse.cdt.autotools.core.genmakebuilderV2">
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
id="genmakebuilderV2"
|
||||
name="%Makefile.builder.name"
|
||||
point="org.eclipse.core.resources.builders">
|
||||
<builder
|
||||
callOnEmptyDelta="true"
|
||||
hasNature="true"
|
||||
isConfigurable="true">
|
||||
<run
|
||||
class="org.eclipse.cdt.internal.autotools.core.AutotoolsConfigurationBuilder">
|
||||
</run>
|
||||
</builder>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.cdt.core.templateProcessTypes">
|
||||
<processType
|
||||
name="NewAutotoolsProject"
|
||||
processRunner="org.eclipse.cdt.internal.autotools.core.wizards.NewAutotoolsProject">
|
||||
<simple
|
||||
name="name">
|
||||
</simple>
|
||||
<simple
|
||||
external="true"
|
||||
name="location"
|
||||
nullable="true">
|
||||
</simple>
|
||||
<simple
|
||||
name="artifactExtension">
|
||||
</simple>
|
||||
<simple
|
||||
external="true"
|
||||
name="isCProject">
|
||||
</simple>
|
||||
</processType>
|
||||
<processType
|
||||
name="SetAutotoolsStringOptionValue"
|
||||
processRunner="org.eclipse.cdt.internal.autotools.core.wizards.SetAutotoolsStringOptionValue">
|
||||
<simple
|
||||
name="name">
|
||||
</simple>
|
||||
<complexArray
|
||||
name="resourcePaths">
|
||||
<baseType>
|
||||
<simple
|
||||
name="id">
|
||||
</simple>
|
||||
<simple
|
||||
name="value">
|
||||
</simple>
|
||||
</baseType>
|
||||
</complexArray>
|
||||
</processType>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.core.contenttype.contentTypes">
|
||||
<content-type
|
||||
id="org.eclipse.cdt.autotools.core.configureScript"
|
||||
name="%ConfigureScript.name"
|
||||
priority="high">
|
||||
</content-type>
|
||||
<content-type
|
||||
id="org.eclipse.cdt.autotools.core.autogenScript"
|
||||
name="%AutogenScript.name"
|
||||
priority="high">
|
||||
</content-type>
|
||||
<file-association
|
||||
content-type="org.eclipse.cdt.autotools.core.configureScript"
|
||||
file-names="configure">
|
||||
</file-association>
|
||||
<file-association
|
||||
content-type="org.eclipse.cdt.autotools.core.autogenScript"
|
||||
file-names="autogen.sh">
|
||||
</file-association>
|
||||
</extension>
|
||||
<extension
|
||||
id="problem"
|
||||
name="%AutotoolsProblemMarker.name"
|
||||
point="org.eclipse.core.resources.markers">
|
||||
<super
|
||||
type="org.eclipse.cdt.core.problem">
|
||||
</super>
|
||||
<persistent
|
||||
value="true">
|
||||
</persistent>
|
||||
<attribute
|
||||
name="libraryInfo">
|
||||
</attribute>
|
||||
</extension>
|
||||
<extension
|
||||
point="org.eclipse.ui.ide.markerResolution">
|
||||
<markerResolutionGenerator
|
||||
class="org.eclipse.cdt.internal.autotools.core.MarkerResolutionGenerator"
|
||||
markerType="org.eclipse.cdt.autotools.core.problem">
|
||||
</markerResolutionGenerator>
|
||||
</extension>
|
||||
<extension
|
||||
id="AutoconfErrorParser"
|
||||
name="AutoconfErrorParser"
|
||||
point="org.eclipse.cdt.core.ErrorParser">
|
||||
<errorparser
|
||||
class="org.eclipse.cdt.internal.autotools.core.ErrorParser"
|
||||
id="org.eclipse.cdt.autotools.core.ErrorParser"
|
||||
name="Autoconf Error Parser">
|
||||
</errorparser>
|
||||
</extension>
|
||||
</plugin>
|
17
build/org.eclipse.cdt.autotools.core/pom.xml
Normal file
|
@ -0,0 +1,17 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project
|
||||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"
|
||||
xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<parent>
|
||||
<groupId>org.eclipse.cdt</groupId>
|
||||
<artifactId>cdt-parent</artifactId>
|
||||
<version>8.1.0-SNAPSHOT</version>
|
||||
<relativePath>../../pom.xml</relativePath>
|
||||
</parent>
|
||||
|
||||
<version>1.0.2-SNAPSHOT</version>
|
||||
<artifactId>org.eclipse.cdt.autotools.core</artifactId>
|
||||
<packaging>eclipse-plugin</packaging>
|
||||
</project>
|
|
@ -0,0 +1,237 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2008, 2009 Red Hat Inc.. and others
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial implementation
|
||||
* IBM Rational Software - add and remove nature static methods
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.internal.autotools.core.AutotoolsConfigurationBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuilderCorePlugin;
|
||||
import org.eclipse.core.resources.ICommand;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IProjectDescription;
|
||||
import org.eclipse.core.resources.IProjectNature;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.IWorkspaceRunnable;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.core.runtime.jobs.ISchedulingRule;
|
||||
import org.eclipse.core.runtime.jobs.Job;
|
||||
|
||||
public class AutotoolsNewProjectNature implements IProjectNature {
|
||||
|
||||
public static final String AUTOTOOLS_NATURE_ID = "org.eclipse.cdt.autotools.core.autotoolsNatureV2"; //$NON-NLS-1$
|
||||
public static final String OLD_AUTOTOOLS_NATURE_ID = "org.eclipse.linuxtools.cdt.autotools.autotoolsNatureV2"; //$NON-NLS-1$
|
||||
public final static String BUILDER_ID = ManagedBuilderCorePlugin.getUniqueIdentifier() + ".genmakebuilder"; //$NON-NLS-1$
|
||||
public final static String OLD_AUTOTOOLS_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.genmakebuilder"; //$NON-NLS-1$
|
||||
|
||||
private IProject project;
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.resources.IProjectNature#configure()
|
||||
*/
|
||||
public void configure() throws CoreException {
|
||||
addAutotoolsBuilder(project, new NullProgressMonitor());
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.resources.IProjectNature#deconfigure()
|
||||
*/
|
||||
public void deconfigure() throws CoreException {
|
||||
// TODO remove builder from here
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.resources.IProjectNature#getProject()
|
||||
*/
|
||||
public IProject getProject() {
|
||||
return project;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.resources.IProjectNature#setProject(org.eclipse.core.resources.IProject)
|
||||
*/
|
||||
public void setProject(IProject project) {
|
||||
this.project = project;
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the Autotools builder to the project
|
||||
* @param project
|
||||
* @param monitor
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void addAutotoolsBuilder(IProject project, IProgressMonitor monitor) throws CoreException {
|
||||
// Add the builder to the project
|
||||
IProjectDescription description = project.getDescription();
|
||||
ICommand[] commands = description.getBuildSpec();
|
||||
ArrayList<ICommand> commandList = new ArrayList<ICommand>();
|
||||
|
||||
// Make sure the Autotools Configuration builder just precedes the Common Builder
|
||||
for (int i = 0; i < commands.length; i++) {
|
||||
ICommand command = commands[i];
|
||||
if (command.getBuilderName().equals(AutotoolsConfigurationBuilder.BUILDER_ID)) {
|
||||
// ignore it
|
||||
} else {
|
||||
if (command.getBuilderName().equals(OLD_AUTOTOOLS_BUILDER_ID)) {
|
||||
ICommand newCommand = description.newCommand();
|
||||
newCommand.setBuilderName(BUILDER_ID);
|
||||
command = newCommand;
|
||||
}
|
||||
if (command.getBuilderName().equals(BUILDER_ID)) {
|
||||
// add Autotools Configuration builder just before builder
|
||||
ICommand newCommand = description.newCommand();
|
||||
newCommand.setBuilderName(AutotoolsConfigurationBuilder.BUILDER_ID);
|
||||
commandList.add(newCommand);
|
||||
}
|
||||
commandList.add(command);
|
||||
}
|
||||
}
|
||||
final ICommand[] newCommands = commandList.toArray(new ICommand[commandList.size()]);
|
||||
if (newCommands.length == commands.length) {
|
||||
boolean hasCorrectBuilderCommands = true;
|
||||
for (int j = 0; j < commands.length; ++j) {
|
||||
if (!commands[j].getBuilderName().equals(newCommands[j].getBuilderName())) {
|
||||
hasCorrectBuilderCommands = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (hasCorrectBuilderCommands)
|
||||
return;
|
||||
}
|
||||
final ISchedulingRule rule = ResourcesPlugin.getWorkspace().getRoot();
|
||||
final IProject proj = project;
|
||||
|
||||
Job backgroundJob = new Job("Autotools Set Project Description") {
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)
|
||||
*/
|
||||
protected IStatus run(IProgressMonitor monitor) {
|
||||
try {
|
||||
ResourcesPlugin.getWorkspace().run(new IWorkspaceRunnable() {
|
||||
protected boolean savedAutoBuildingValue;
|
||||
|
||||
public void run(IProgressMonitor monitor) throws CoreException {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
turnOffAutoBuild(workspace);
|
||||
IProjectDescription description = proj.getDescription();
|
||||
description.setBuildSpec(newCommands);
|
||||
proj.setDescription(description, new NullProgressMonitor());
|
||||
restoreAutoBuild(workspace);
|
||||
}
|
||||
|
||||
protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
savedAutoBuildingValue = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
protected final void restoreAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
workspaceDesc.setAutoBuilding(savedAutoBuildingValue);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
}, rule, IWorkspace.AVOID_UPDATE, monitor);
|
||||
} catch (CoreException e) {
|
||||
return e.getStatus();
|
||||
}
|
||||
IStatus returnStatus = Status.OK_STATUS;
|
||||
return returnStatus;
|
||||
}
|
||||
};
|
||||
backgroundJob.setRule(rule);
|
||||
backgroundJob.schedule();
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding an autotools nature to a project.
|
||||
*
|
||||
* @param proj the project to add the autotools nature to.
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void addAutotoolsNature(IProject project, IProgressMonitor monitor) throws CoreException {
|
||||
addNature(project, AUTOTOOLS_NATURE_ID, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for adding a nature to a project.
|
||||
*
|
||||
* @param proj the project to add the nature to.
|
||||
* @param natureId the id of the nature to assign to the project
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void addNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
||||
IProjectDescription description = project.getDescription();
|
||||
String[] prevNatures = description.getNatureIds();
|
||||
for (int i = 0; i < prevNatures.length; i++) {
|
||||
if (natureId.equals(prevNatures[i]))
|
||||
return;
|
||||
}
|
||||
String[] newNatures = new String[prevNatures.length + 1];
|
||||
System.arraycopy(prevNatures, 0, newNatures, 0, prevNatures.length);
|
||||
newNatures[prevNatures.length] = natureId;
|
||||
description.setNatureIds(newNatures);
|
||||
project.setDescription(description, monitor);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to remove the autotools nature from a project.
|
||||
*
|
||||
* @param project to remove the autotools nature from
|
||||
* @param mon progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void removeAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
|
||||
removeNature(project, AUTOTOOLS_NATURE_ID, mon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method to remove the old autotools nature from a project.
|
||||
*
|
||||
* @param project to remove the old autotools nature from
|
||||
* @param mon progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
* @throws CoreException
|
||||
*/
|
||||
public static void removeOldAutotoolsNature(IProject project, IProgressMonitor mon) throws CoreException {
|
||||
removeNature(project, OLD_AUTOTOOLS_NATURE_ID, mon);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method for removing a project nature from a project.
|
||||
*
|
||||
* @param proj the project to remove the nature from
|
||||
* @param natureId the nature id to remove
|
||||
* @param monitor a progress monitor to indicate the duration of the operation, or
|
||||
* <code>null</code> if progress reporting is not required.
|
||||
*/
|
||||
public static void removeNature(IProject project, String natureId, IProgressMonitor monitor) throws CoreException {
|
||||
IProjectDescription description = project.getDescription();
|
||||
String[] prevNatures = description.getNatureIds();
|
||||
List<String> newNatures = new ArrayList<String>(Arrays.asList(prevNatures));
|
||||
newNatures.remove(natureId);
|
||||
description.setNatureIds((String[])newNatures.toArray(new String[newNatures.size()]));
|
||||
project.setDescription(description, monitor);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,293 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007 Red Hat Inc..
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.autotools.core;
|
||||
|
||||
import java.lang.reflect.InvocationTargetException;
|
||||
import java.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedProject;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedCProjectNature;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.Assert;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Status;
|
||||
import org.eclipse.jface.dialogs.ErrorDialog;
|
||||
import org.eclipse.jface.resource.ImageDescriptor;
|
||||
import org.eclipse.swt.widgets.Display;
|
||||
import org.eclipse.swt.widgets.Shell;
|
||||
import org.eclipse.ui.IWorkbenchPage;
|
||||
import org.eclipse.ui.IWorkbenchWindow;
|
||||
import org.eclipse.ui.plugin.AbstractUIPlugin;
|
||||
import org.osgi.framework.BundleContext;
|
||||
|
||||
/**
|
||||
* The main plugin class to be used in the desktop.
|
||||
*/
|
||||
|
||||
public class AutotoolsPlugin extends AbstractUIPlugin {
|
||||
|
||||
//The shared instance.
|
||||
private static AutotoolsPlugin plugin;
|
||||
private ResourceBundle resourceBundle;
|
||||
|
||||
public static final String PLUGIN_ID = "org.eclipse.cdt.autotools.core"; //$NON-NLS-1$
|
||||
public static final String AUTOTOOLS_PROJECT_TYPE_ID = "org.eclipse.linuxtools.cdt.autotools.core.projectType"; //$NON-NLS-1$
|
||||
|
||||
/**
|
||||
* The constructor.
|
||||
*/
|
||||
public AutotoolsPlugin() {
|
||||
Assert.isTrue(plugin == null);
|
||||
plugin = this;
|
||||
try {
|
||||
resourceBundle = ResourceBundle.getBundle(PLUGIN_ID + ".Resources"); //$NON-NLS-1$
|
||||
} catch (MissingResourceException x) {
|
||||
resourceBundle = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public static String getPluginId() {
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
|
||||
public static String getUniqueIdentifier() {
|
||||
if (getDefault() == null) {
|
||||
// If the default instance is not yet initialized,
|
||||
// return a static identifier. This identifier must
|
||||
// match the plugin id defined in plugin.xml
|
||||
return PLUGIN_ID;
|
||||
}
|
||||
return getDefault().getBundle().getSymbolicName();
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called upon plug-in activation
|
||||
*/
|
||||
public void start(BundleContext context) throws Exception {
|
||||
super.start(context);
|
||||
}
|
||||
|
||||
/**
|
||||
* This method is called when the plug-in is stopped
|
||||
*/
|
||||
public void stop(BundleContext context) throws Exception {
|
||||
super.stop(context);
|
||||
plugin = null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the shared instance.
|
||||
*/
|
||||
public static AutotoolsPlugin getDefault() {
|
||||
return plugin;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns active shell.
|
||||
*/
|
||||
public static Shell getActiveWorkbenchShell() {
|
||||
IWorkbenchWindow window = getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
return window.getShell();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string from the plugin's resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getResourceString(String key) {
|
||||
ResourceBundle bundle = AutotoolsPlugin.getDefault().getResourceBundle();
|
||||
try {
|
||||
return bundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return key;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the string from the plugin's resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @param args an array of substituition strings
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getFormattedString(String key, String[] args) {
|
||||
return MessageFormat.format(getResourceString(key), (Object[])args);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the plugin's resource bundle,
|
||||
*/
|
||||
public ResourceBundle getResourceBundle() {
|
||||
return resourceBundle;
|
||||
}
|
||||
|
||||
public static boolean hasTargetBuilder(IProject project) {
|
||||
try {
|
||||
// When a project is converted to an Autotools project, we
|
||||
// replace the ManagedMake builder with a special one that
|
||||
// handles MakeTargets. If a project is brought into Eclipse and
|
||||
// uses the New Project Wizard to create a ManagedMake project that
|
||||
// is of type: Autotools, this added step is not done. If we know
|
||||
// we have an Autotools project from the configuration id, then
|
||||
// we should add the builder now. We also should replace the
|
||||
// default ManagedMake scanner provider with the Autotools one,
|
||||
// then return true.
|
||||
if (project.getNature(ManagedCProjectNature.MNG_NATURE_ID) != null) {
|
||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||
IManagedProject m = info.getManagedProject();
|
||||
if (m != null && m.getProjectType().getId().equals(AUTOTOOLS_PROJECT_TYPE_ID)) {
|
||||
AutotoolsNewProjectNature.addAutotoolsBuilder(project, new NullProgressMonitor());
|
||||
return true;
|
||||
}
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
// Don't care...fall through to not found.
|
||||
} catch (Exception f) {
|
||||
// Don't care...fall through to not found.
|
||||
}
|
||||
// Otherwise not found.
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an image descriptor for the image file at the given
|
||||
* plug-in relative path.
|
||||
*
|
||||
* @param path the path
|
||||
* @return the image descriptor
|
||||
*/
|
||||
public static ImageDescriptor getImageDescriptor(String path) {
|
||||
return AbstractUIPlugin.imageDescriptorFromPlugin(PLUGIN_ID, path);
|
||||
}
|
||||
|
||||
public static void log(IStatus status) {
|
||||
ResourcesPlugin.getPlugin().getLog().log(status);
|
||||
}
|
||||
|
||||
public static void logErrorMessage(String message) {
|
||||
log(new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.ERROR, message, null));
|
||||
}
|
||||
|
||||
public static void logException(Throwable e, final String title, String message) {
|
||||
if (e instanceof InvocationTargetException) {
|
||||
e = ((InvocationTargetException) e).getTargetException();
|
||||
}
|
||||
IStatus status = null;
|
||||
if (e instanceof CoreException)
|
||||
status = ((CoreException) e).getStatus();
|
||||
else {
|
||||
if (message == null)
|
||||
message = e.getMessage();
|
||||
if (message == null)
|
||||
message = e.toString();
|
||||
status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, message, e);
|
||||
}
|
||||
ResourcesPlugin.getPlugin().getLog().log(status);
|
||||
Display display;
|
||||
display = Display.getCurrent();
|
||||
if (display == null)
|
||||
display = Display.getDefault();
|
||||
final IStatus fstatus = status;
|
||||
display.asyncExec(new Runnable() {
|
||||
public void run() {
|
||||
ErrorDialog.openError(null, title, null, fstatus);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
public static void logException(Throwable e) {
|
||||
logException(e, null, null);
|
||||
}
|
||||
|
||||
public static void log(Throwable e) {
|
||||
if (e instanceof InvocationTargetException)
|
||||
e = ((InvocationTargetException) e).getTargetException();
|
||||
IStatus status = null;
|
||||
if (e instanceof CoreException)
|
||||
status = ((CoreException) e).getStatus();
|
||||
else
|
||||
status = new Status(IStatus.ERROR, getUniqueIdentifier(), IStatus.OK, e.getMessage(), e);
|
||||
log(status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method with conventions
|
||||
*/
|
||||
public static void errorDialog(Shell shell, String title, String message, IStatus s) {
|
||||
log(s);
|
||||
// if the 'message' resource string and the IStatus' message are the same,
|
||||
// don't show both in the dialog
|
||||
if (s != null && message.equals(s.getMessage())) {
|
||||
message = null;
|
||||
}
|
||||
ErrorDialog.openError(shell, title, message, s);
|
||||
}
|
||||
|
||||
/**
|
||||
* Utility method with conventions
|
||||
*/
|
||||
public static void errorDialog(Shell shell, String title, String message, Throwable t) {
|
||||
log(t);
|
||||
IStatus status;
|
||||
if (t instanceof CoreException) {
|
||||
status = ((CoreException) t).getStatus();
|
||||
// if the 'message' resource string and the IStatus' message are the same,
|
||||
// don't show both in the dialog
|
||||
if (status != null && message.equals(status.getMessage())) {
|
||||
message = null;
|
||||
}
|
||||
} else {
|
||||
status = new Status(IStatus.ERROR, AutotoolsPlugin.getUniqueIdentifier(), -1, "Internal Error: ", t); //$NON-NLS-1$
|
||||
}
|
||||
ErrorDialog.openError(shell, title, message, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the workspace instance.
|
||||
*/
|
||||
public static IWorkspace getWorkspace() {
|
||||
return ResourcesPlugin.getWorkspace();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the active workbench window or <code>null</code> if none
|
||||
*/
|
||||
public static IWorkbenchWindow getActiveWorkbenchWindow() {
|
||||
return getDefault().getWorkbench().getActiveWorkbenchWindow();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the active workbench page or <code>null</code> if none.
|
||||
*/
|
||||
public static IWorkbenchPage getActivePage() {
|
||||
IWorkbenchWindow window= getActiveWorkbenchWindow();
|
||||
if (window != null) {
|
||||
return window.getActivePage();
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,111 @@
|
|||
#################################################################################
|
||||
# Copyright (c) 2006, 2007, 2009 Red Hat, Inc.
|
||||
# All rights reserved. This program and the accompanying materials
|
||||
# are made available under the terms of the Eclipse Public License v1.0
|
||||
# which accompanies this distribution, and is available at
|
||||
# http://www.eclipse.org/legal/epl-v10.html
|
||||
#
|
||||
# Contributors:
|
||||
# Red Hat Incorporated - initial API and implementation
|
||||
# IBM Rational Software - ManagedMakeMessages copied to AutotoolsMakefileBuilder
|
||||
#################################################################################
|
||||
MakeCWizard.title=C/Make Project
|
||||
MakeCWizard.description=Create a New C Project using 'make' to build it
|
||||
|
||||
WARNING_UNSUPPORTED_CONFIGURATION=Warning: unsupported configuration
|
||||
|
||||
AutotoolsMakefileBuilder.message.finished=Build complete for project {0}
|
||||
AutotoolsMakefileBuilder.message.stopped=Build stopped
|
||||
AutotoolsMakefileBuilder.type.clean=Clean-only build
|
||||
AutotoolsMakefileBuilder.message.clean.deleting.output=Removing build artifacts from {0}
|
||||
AutotoolsMakefileBuilder.message.console.header=**** {0} of configuration {1} for project {2} ****
|
||||
|
||||
MakeGenerator.makefile.built=Makefile built
|
||||
MakeGenerator.refresh=Refresh
|
||||
MakeGenerator.refresh.error=Refresh error
|
||||
MakeGenerator.generation.error=Configuration failed with error
|
||||
MakeGenerator.configuring=Configuring
|
||||
MakeGenerator.make.message=Invoking {0} for project {1}
|
||||
MakeGenerator.config.error=Error {0} occurred while running {1}
|
||||
MakeGenerator.createdir.error=Error creating build directory: {0}
|
||||
MakeGenerator.run.config.status=Running config.status in build directory: {0}
|
||||
MakeGenerator.makefile.cvs=Invoking Makefile.cvs in build directory: {0}
|
||||
MakeGenerator.autogen.sh=Invoking autogen.sh in build directory: {0}
|
||||
MakeGenerator.autoreconf=Invoking autoreconf in build directory: {0}
|
||||
MakeGenerator.gen.makefile=Generating Makefile in build directory: {0}
|
||||
MakeGenerator.clean.builddir=Cleaning build directory: {0}
|
||||
MakeGenerator.clean.topdir=Cleaning top-level source directory to allow other configuration to run
|
||||
MakeGenerator.gen.configure=Generating configure
|
||||
MakeGenerator.unsupportedConfig=Warning: unsupported configuration {0}
|
||||
MakeGenerator.success=[Operation successful]
|
||||
MakeGenerator.didnt.generate=No Makefile generated
|
||||
MakeGenerator.refresh.MakeTargets=Refreshing Make Targets
|
||||
MakeGenerator.commandline.envvars=Command-line environment variables:
|
||||
|
||||
BuildDir.apply=Build directory already in use
|
||||
BuildDir.default=Default build directory to unused value?
|
||||
BuildDir.yes=Yes
|
||||
BuildDir.no=No
|
||||
|
||||
WizardAutotoolsProjectConversion.title=Convert to CVS C/C++ Autotools Project
|
||||
WizardAutotoolsProjectConversion.description=Convert a CVS source repository to C/C++ Autotools Project
|
||||
WizardAutotoolsProjectConversion.message.add_nature=Adding C/C++ Autotools Managed Project Nature
|
||||
WizardAutotoolsProjectConversion.message.add_builder=Adding C/C++ Autotools Managed Project Builder
|
||||
WizardMakeProjectConversion.monitor.convertingToMakeProject=Converting Project...
|
||||
WizardAutotoolsConversion=CVS C/C++ Autotools Conversion
|
||||
WizardAutotoolsConversion.windowTitle=Conversion to CVS C/C++ Autotools Project
|
||||
WizardAutotoolsConversion.config.title=Select a configuration
|
||||
WizardAutotoolsConversion.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsConversion.options.title=Additional Project Settings
|
||||
WizardAutotoolsConversion.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsConversion.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCProject.title=Autotools C Project
|
||||
WizardAutotoolsNewCProject.description=Create a new C Autotools project
|
||||
WizardAutotoolsNewCProject.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCProject.windowTitle=GNU Autotools C Project
|
||||
WizardAutotoolsNewCProject.config.title=Select a configuration
|
||||
WizardAutotoolsNewCProject.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCProject.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCProject.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCProject.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCProjectV2.title=Autotools C Project V2
|
||||
WizardAutotoolsNewCProjectV2.description=Create a new C Autotools project
|
||||
WizardAutotoolsNewCProjectV2.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCProjectV2.windowTitle=GNU Autotools C Project V2
|
||||
WizardAutotoolsNewCProjectV2.config.title=Select a configuration
|
||||
WizardAutotoolsNewCProjectV2.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCProjectV2.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCProjectV2.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCProjectV2.message.save=Saving new build options
|
||||
|
||||
WizardAutotoolsNewCCProject.title=Autotools C++ Project
|
||||
WizardAutotoolsNewCCProject.description=Create a new C++ Autotools project
|
||||
WizardAutotoolsNewCCProject.monitor.creatingProject=Creating Project...
|
||||
WizardAutotoolsNewCCProject.windowTitle=GNU Autotools C++ Project
|
||||
WizardAutotoolsNewCCProject.config.title=Select a configuration
|
||||
WizardAutotoolsNewCCProject.config.desc=Select the configuration you wish to deploy on
|
||||
WizardAutotoolsNewCCProject.options.title=Additional Project Settings
|
||||
WizardAutotoolsNewCCProject.options.desc=Define the inter-project dependencies, if any.
|
||||
WizardAutotoolsNewCCProject.message.save=Saving new build options
|
||||
|
||||
|
||||
BuildTargetDialog.title.buildTarget=Build Special Targets
|
||||
BuildTargetDialog.title.makeTargetsFor=Make targets for
|
||||
BuildTargetDialog.button.build=Build
|
||||
|
||||
TargetListViewer.button.add=Add...
|
||||
TargetListViewer.button.remove=Remove
|
||||
TargetListViewer.button.edit=Edit...
|
||||
TargetListViewer.label.target=Target
|
||||
TargetListViewer.label.location=Location
|
||||
TargetListViewer.exception.error=Error
|
||||
TargetListViewer.exception.message=An error occurred performing the selected action
|
||||
|
||||
AutotoolsPreferencePage.useAutotoolsFileScanner.label=Use make -w for includepath scanning
|
||||
MakeTargetPreferencePage.buildTargetInBackground.label=Build target in background
|
||||
|
||||
SetAutotoolsStringOptionValue.error=SetAutotoolsStringOptionValue failure: {0}
|
||||
|
||||
UpdatePackage.msg=Update package: {0}
|
|
@ -0,0 +1,168 @@
|
|||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.Map;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.resources.ACBuilder;
|
||||
import org.eclipse.cdt.core.resources.IConsole;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.IAConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IMultiConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.resources.IncrementalProjectBuilder;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.IStatus;
|
||||
import org.eclipse.core.runtime.MultiStatus;
|
||||
import org.eclipse.core.runtime.OperationCanceledException;
|
||||
|
||||
public class AutotoolsConfigurationBuilder extends ACBuilder {
|
||||
|
||||
public static final String BUILDER_NAME = "genmakebuilderV2"; //$NON-NLS-1$
|
||||
public static final String BUILDER_ID = AutotoolsPlugin.getPluginId() + "." + BUILDER_NAME; //$NON-NLS-1$
|
||||
public static final String OLD_BUILDER_ID = "org.eclipse.linuxtools.cdt.autotools.core.genmakebuilderV2"; //$NON-NLS-1$
|
||||
|
||||
private static final String BUILD_STOPPED="AutotoolsMakefileBuilder.message.stopped"; //$NON-NLS-1$
|
||||
private AutotoolsNewMakeGenerator generator;
|
||||
|
||||
public AutotoolsConfigurationBuilder() {
|
||||
super();
|
||||
generator = new AutotoolsNewMakeGenerator();
|
||||
}
|
||||
|
||||
protected boolean isCdtProjectCreated(IProject project){
|
||||
ICProjectDescription des = CoreModel.getDefault().getProjectDescription(project, false);
|
||||
return des != null && !des.isCdtProjectCreating();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected IProject[] build(int kind, @SuppressWarnings("rawtypes") Map args, IProgressMonitor monitor)
|
||||
throws CoreException {
|
||||
IProject project = getProject();
|
||||
if(!isCdtProjectCreated(project))
|
||||
return project.getReferencedProjects();
|
||||
|
||||
boolean bPerformBuild = true;
|
||||
IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(project);
|
||||
if (!shouldBuild(kind, info)) {
|
||||
return new IProject[0];
|
||||
}
|
||||
if (kind == IncrementalProjectBuilder.AUTO_BUILD) {
|
||||
IResourceDelta delta = getDelta(getProject());
|
||||
if (delta != null) {
|
||||
IResource res = delta.getResource();
|
||||
if (res != null) {
|
||||
bPerformBuild = res.getProject().equals(getProject());
|
||||
}
|
||||
} else {
|
||||
bPerformBuild = false;
|
||||
}
|
||||
IConfiguration cfg = info.getDefaultConfiguration();
|
||||
if (cfg != null) {
|
||||
IAConfiguration acfg = AutotoolsConfigurationManager.getInstance().findCfg(project, cfg.getName());
|
||||
if (acfg == null || acfg.isDirty())
|
||||
bPerformBuild = true;
|
||||
}
|
||||
}
|
||||
if (bPerformBuild) {
|
||||
MultiStatus result = performMakefileGeneration(project, info, monitor);
|
||||
if (result.getSeverity() == IStatus.ERROR) {
|
||||
// Failure to create Makefile, output error message to console.
|
||||
IConsole console = CCorePlugin.getDefault().getConsole();
|
||||
console.start(project);
|
||||
|
||||
OutputStream cos = console.getOutputStream();
|
||||
String errormsg = AutotoolsPlugin.getResourceString(BUILD_STOPPED);
|
||||
StringBuffer buf = new StringBuffer(errormsg);
|
||||
buf.append(System.getProperty("line.separator", "\n")); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
buf.append("(").append(result.getMessage()).append(")"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
|
||||
try {
|
||||
cos.write(buf.toString().getBytes());
|
||||
cos.flush();
|
||||
cos.close();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
}
|
||||
checkCancel(monitor);
|
||||
return getProject().getReferencedProjects();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void clean(IProgressMonitor monitor) throws CoreException {
|
||||
IProject project = getProject();
|
||||
final IManagedBuildInfo info = ManagedBuildManager.getBuildInfo(getProject());
|
||||
if (shouldBuild(CLEAN_BUILD, info)) {
|
||||
IConfiguration icfg = info.getDefaultConfiguration();
|
||||
if (icfg instanceof IMultiConfiguration) {
|
||||
IMultiConfiguration mcfg = (IMultiConfiguration)icfg;
|
||||
IConfiguration[] cfgs = (IConfiguration[])mcfg.getItems();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project, icfg.getName());
|
||||
cfg.setDirty(true);
|
||||
}
|
||||
} else {
|
||||
IAConfiguration cfg = AutotoolsConfigurationManager.getInstance().getConfiguration(project, icfg.getName());
|
||||
cfg.setDirty(true); // Mark Configuration dirty so next build will do full reconfigure
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected MultiStatus performMakefileGeneration(IProject project, IManagedBuildInfo info,
|
||||
IProgressMonitor monitor) throws CoreException {
|
||||
MultiStatus result;
|
||||
|
||||
try {
|
||||
generator.initialize(project, info, monitor);
|
||||
result = generator.regenerateMakefiles(false);
|
||||
} catch (CoreException e) {
|
||||
String errMsg = AutotoolsPlugin.getResourceString("MakeGenerator.didnt.generate"); //$NON-NLS-1$
|
||||
result = new MultiStatus(AutotoolsPlugin.getUniqueIdentifier(), IStatus.ERROR,
|
||||
errMsg, e);
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check whether the build has been canceled.
|
||||
*/
|
||||
public void checkCancel(IProgressMonitor monitor) {
|
||||
if (monitor != null && monitor.isCanceled())
|
||||
throw new OperationCanceledException();
|
||||
}
|
||||
|
||||
protected boolean shouldBuild(int kind, IManagedBuildInfo info) {
|
||||
IConfiguration cfg = info.getDefaultConfiguration();
|
||||
IBuilder builder = null;
|
||||
if (cfg != null) {
|
||||
builder = cfg.getEditableBuilder();
|
||||
switch (kind) {
|
||||
case IncrementalProjectBuilder.AUTO_BUILD :
|
||||
return builder.isAutoBuildEnable();
|
||||
case IncrementalProjectBuilder.INCREMENTAL_BUILD : // now treated as the same!
|
||||
case IncrementalProjectBuilder.FULL_BUILD :
|
||||
return builder.isFullBuildEnabled() | builder.isIncrementalBuildEnabled() ;
|
||||
case IncrementalProjectBuilder.CLEAN_BUILD :
|
||||
return builder.isCleanBuildEnabled();
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,58 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2010 Siemens AG.
|
||||
* All rights reserved. This content and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Norbert Ploett - Initial implementation
|
||||
* Red Hat Inc. - Modified for use with autotools plug-in
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
|
||||
/**
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
public class AutotoolsProblemMarkerInfo {
|
||||
|
||||
public static enum Type{PACKAGE, HEADER, PROG, FILE, GENERIC}
|
||||
|
||||
private ProblemMarkerInfo marker;
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, String description, int severity, String name, Type type) {
|
||||
this(file, -1, description, severity, null, null, name, type);
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, int lineNumber, String description, int severity, String variableName, Type type) {
|
||||
this(file, lineNumber, description, severity, variableName, null, null, type);
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo(IResource file, int lineNumber, String description, int severity, String variableName,
|
||||
IPath externalPath, String libraryInfo, Type type) {
|
||||
this.marker = new ProblemMarkerInfo(file, lineNumber, description, severity, variableName, externalPath);
|
||||
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_PROBLEM_TYPE, type.name());
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, libraryInfo);
|
||||
|
||||
marker.setType (IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
}
|
||||
|
||||
public ProblemMarkerInfo getMarker() {
|
||||
return marker;
|
||||
}
|
||||
|
||||
public String getProblemType() {
|
||||
return marker.getAttribute(IAutotoolsMarker.MARKER_PROBLEM_TYPE);
|
||||
}
|
||||
|
||||
public String getLibraryInfo(){
|
||||
return marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.core.runtime.QualifiedName;
|
||||
|
||||
|
||||
public class AutotoolsPropertyConstants {
|
||||
|
||||
static final String PREFIX = AutotoolsPlugin.getUniqueIdentifier() + "."; // $NON-NLS-1$
|
||||
static final String PREFIX_COMPAT = "org.eclipse.linuxtools.cdt.autotools."; // $NON-NLS-1$
|
||||
public static final String AUTOMAKE_VERSION_STRING = "AutoconfEditorAutomakeVersion"; // $NON-NLS-1$
|
||||
public static final QualifiedName AUTOMAKE_VERSION = new QualifiedName(PREFIX, AUTOMAKE_VERSION_STRING);
|
||||
public static final QualifiedName AUTOMAKE_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOMAKE_VERSION_STRING);
|
||||
public static final String AUTOCONF_VERSION_STRING = "AutoconfEditorAutoconfVersion"; // $NON-NLS-1$
|
||||
public static final QualifiedName AUTOCONF_VERSION = new QualifiedName(PREFIX, AUTOCONF_VERSION_STRING);
|
||||
public static final QualifiedName AUTOCONF_VERSION_COMPAT = new QualifiedName(PREFIX_COMPAT, AUTOCONF_VERSION_STRING);
|
||||
public static final String AUTOCONF_MACRO_VERSIONING = "AutoconfEditorMacroVersioning"; // $NON-NLS-1$
|
||||
public static final QualifiedName AUTOCONF_TOOL = new QualifiedName(PREFIX, "AutoconfToolPath"); // $NON-NLS-1$
|
||||
public static final QualifiedName AUTOMAKE_TOOL = new QualifiedName(PREFIX, "AutomakeToolPath"); // $NON-NLS-1$
|
||||
public static final QualifiedName ACLOCAL_TOOL = new QualifiedName(PREFIX, "AclocalToolPath"); // $NON-NLS-1$
|
||||
public static final QualifiedName AUTOHEADER_TOOL = new QualifiedName(PREFIX, "AutoheaderToolPath"); // $NON-NLS-1$
|
||||
public static final QualifiedName AUTORECONF_TOOL = new QualifiedName(PREFIX, "AutoreconfToolPath"); // $NON-NLS-1$
|
||||
public static final QualifiedName LIBTOOLIZE_TOOL = new QualifiedName(PREFIX, "LibtoolizePath"); // $NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_DELETE = new QualifiedName(PREFIX, "CleanDelete"); // $NON-NLS-1$
|
||||
public static final QualifiedName CLEAN_MAKE_TARGET = new QualifiedName(PREFIX, "CleanMakeTarget"); // $NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_USE_MAKE_W = new QualifiedName(PREFIX, "ScannerUseMakeW");
|
||||
public static final QualifiedName AUTO_BUILD_NAME = new QualifiedName(PREFIX, "AutoBuildName"); // $NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE = new QualifiedName(PREFIX, "IncludeResourceMapping"); // $NON-NLS-1$
|
||||
public static final QualifiedName OPEN_INCLUDE_P = new QualifiedName(PREFIX, "PersistentIncludeResourceMapping"); //$NON-NLS-1$
|
||||
public static final QualifiedName SCANNER_INFO_DIRTY = new QualifiedName(PREFIX, "ScannerInfoDirty"); // $NON-NLSp-1$
|
||||
|
||||
public static final String[] fACVersions = {"2.13", "2.59", "2.61", "2.68"}; // $NON-NLS-1$
|
||||
public static final String AC_VERSION_2_13 = fACVersions[0];
|
||||
public static final String AC_VERSION_2_59 = fACVersions[1];
|
||||
public static final String AC_VERSION_2_61 = fACVersions[2];
|
||||
public static final String AC_VERSION_2_68 = fACVersions[3];
|
||||
public static final String LATEST_AC_VERSION = fACVersions[fACVersions.length - 1];
|
||||
|
||||
public static final String[] fAMVersions = {"1.4-p6", "1.9.5", "1.9.6", "1.11.1"}; // $NON-NLS-1$
|
||||
public static final String LATEST_AM_VERSION = fAMVersions[fAMVersions.length - 1];
|
||||
|
||||
public static final String CLEAN_MAKE_TARGET_DEFAULT = "distclean"; // $NON-NLS-1$
|
||||
|
||||
public static final String TRUE = "true"; // $NON-NLS-1$
|
||||
public static final String FALSE = "false"; // $NON-NLS-1$
|
||||
}
|
|
@ -0,0 +1,51 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2004, 2006 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.makegen.IManagedDependencyGenerator;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
|
||||
/**
|
||||
* This is the dependency calculator used by the makefile generation system when
|
||||
* nothing is defined for a tool.
|
||||
*
|
||||
* @since 2.0
|
||||
*/
|
||||
@SuppressWarnings("deprecation")
|
||||
public class DefaultNoDependencyCalculator implements IManagedDependencyGenerator {
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#findDependencies(org.eclipse.core.resources.IResource, org.eclipse.core.resources.IProject)
|
||||
*/
|
||||
public IResource[] findDependencies(IResource resource, IProject project) {
|
||||
// Never answers any dependencies
|
||||
return null;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getCalculatorType()
|
||||
*/
|
||||
public int getCalculatorType() {
|
||||
return TYPE_NODEPS;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.makegen.IManagedBuilderDependencyCalculator#getDependencyCommand(org.eclipse.core.resources.IResource)
|
||||
*/
|
||||
public String getDependencyCommand(IResource resource, IManagedBuildInfo info) {
|
||||
// Never answers this call with an actual value
|
||||
return null;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,233 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.File;
|
||||
import java.io.FileReader;
|
||||
import java.io.LineNumberReader;
|
||||
import java.lang.reflect.Method;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
// This class would normally extend IErrorParser and use the CDT error parser
|
||||
// extension. However, we want an extended IMarker that contains library info and
|
||||
// possibly other data in the future. The standard CDT ErrorParserManager doesn't allow
|
||||
// us to pass an extended ProblemMarkerInfo, so we are forced to have our own mechanism
|
||||
// which is similar to the CDT one.
|
||||
public class ErrorParser extends MarkerGenerator implements IErrorParser{
|
||||
|
||||
public static final String ID = AutotoolsPlugin.PLUGIN_ID + ".errorParser"; //$NON-NLS-1$
|
||||
private Pattern pkgconfigError =
|
||||
Pattern.compile(".*?(configure:\\s+error:\\s+Package requirements\\s+\\((.*?)\\)\\s+were not met).*"); //$NON-NLS-1$
|
||||
private Pattern genconfigError =
|
||||
Pattern.compile(".*?configure:\\s+error:\\s+(.*)"); //$NON-NLS-1$
|
||||
private Pattern checkingFail =
|
||||
Pattern.compile("checking for (.*)\\.\\.\\. no"); //$NON-NLS-1$
|
||||
|
||||
private Pattern changingConfigDirectory =
|
||||
Pattern.compile("Configuring in (.*)"); //$NON-NLS-1$
|
||||
|
||||
private IPath buildDir;
|
||||
private IPath sourcePath;
|
||||
private IProject project;
|
||||
|
||||
public ErrorParser(){
|
||||
}
|
||||
|
||||
public ErrorParser(IPath sourcePath, IPath buildPath) {
|
||||
this.buildDir = buildPath;
|
||||
this.sourcePath = sourcePath;
|
||||
}
|
||||
|
||||
public boolean processLine(String line,
|
||||
org.eclipse.cdt.core.ErrorParserManager eoParser) {
|
||||
|
||||
if (this.project == null)
|
||||
this.project = eoParser.getProject();
|
||||
|
||||
if (this.buildDir == null)
|
||||
this.buildDir = new Path(eoParser.getWorkingDirectoryURI().getPath());
|
||||
|
||||
if (this.sourcePath == null)
|
||||
this.sourcePath = eoParser.getProject().getLocation();
|
||||
|
||||
AutotoolsProblemMarkerInfo marker = processLine(line);
|
||||
if ( marker != null){
|
||||
// Check to see if addProblemMarker exists.
|
||||
try {
|
||||
Method method = eoParser.getClass().getMethod("addProblemMarker", ProblemMarkerInfo.class);
|
||||
try {
|
||||
method.invoke(eoParser, marker);
|
||||
return true;
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
} catch (SecurityException e) {
|
||||
return false;
|
||||
} catch (NoSuchMethodException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean processLine(String line, ErrorParserManager eoParser) {
|
||||
if (this.project == null)
|
||||
this.project = eoParser.getProject();
|
||||
|
||||
AutotoolsProblemMarkerInfo marker = processLine(line);
|
||||
if ( marker != null){
|
||||
eoParser.addProblemMarker(marker);
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public AutotoolsProblemMarkerInfo processLine(String line) {
|
||||
Matcher m;
|
||||
|
||||
m = changingConfigDirectory.matcher(line);
|
||||
if(m.matches()){
|
||||
// set configuration directory.
|
||||
this.buildDir = this.buildDir.append(m.group(1));
|
||||
this.sourcePath = this.sourcePath.append(m.group(1));
|
||||
return null;
|
||||
}
|
||||
|
||||
m = pkgconfigError.matcher(line);
|
||||
if (m.matches()) {
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), -1, m.group(1), SEVERITY_ERROR_BUILD, null, null, m.group(2), AutotoolsProblemMarkerInfo.Type.PACKAGE);
|
||||
}
|
||||
|
||||
m = genconfigError.matcher(line);
|
||||
if (m.matches()) {
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), -1, m.group(1), SEVERITY_ERROR_BUILD, null,
|
||||
AutotoolsProblemMarkerInfo.Type.GENERIC);
|
||||
}
|
||||
|
||||
m = checkingFail.matcher(line);
|
||||
if (m.matches()) {
|
||||
// We know that there is a 'checking for ...' fail.
|
||||
// Find the log file containing this check
|
||||
AutotoolsProblemMarkerInfo.Type type = getCheckType(m.group(1));
|
||||
if (type != null)
|
||||
return new AutotoolsProblemMarkerInfo(getProject(), "Missing " + type + " " + m.group(1), SEVERITY_INFO, m.group(1), type);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Given the name of the filed check object, look for it in the log file
|
||||
* file and then examine the configure script to figure out what the type of
|
||||
* the check was.
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private AutotoolsProblemMarkerInfo.Type getCheckType(String name) {
|
||||
int lineNumber = getErrorConfigLineNumber(name);
|
||||
|
||||
// now open configure file.
|
||||
File file = new File(sourcePath + "/configure");
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return null;
|
||||
|
||||
FileReader stream;
|
||||
try {
|
||||
stream = new FileReader(file);
|
||||
LineNumberReader reader = new LineNumberReader(stream);
|
||||
|
||||
// look for something like:
|
||||
// if test "${ac_cv_prog_WINDRES+set}" = set; then :
|
||||
Pattern errorPattern = Pattern.compile(".*ac_cv_([a-z]*)_.*"); //$NON-NLS-1$
|
||||
|
||||
// skip to the line
|
||||
String line = reader.readLine();
|
||||
for (int i = 0; i < lineNumber + 10 && line != null; i++) {
|
||||
if (i < lineNumber) {
|
||||
line = reader.readLine();
|
||||
continue;
|
||||
}
|
||||
Matcher m = errorPattern.matcher(line);
|
||||
if (m.matches()) {
|
||||
String typeString = m.group(1);
|
||||
if (typeString.equals("prog"))
|
||||
return AutotoolsProblemMarkerInfo.Type.PROG;
|
||||
if (typeString.equals("header"))
|
||||
return AutotoolsProblemMarkerInfo.Type.HEADER;
|
||||
if (typeString.equals("file"))
|
||||
return AutotoolsProblemMarkerInfo.Type.FILE;
|
||||
|
||||
return null;
|
||||
}
|
||||
line = reader.readLine();
|
||||
}
|
||||
stream.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* Check the log file for the check for the given name and return the line
|
||||
* number in configure where the check occurs.
|
||||
*
|
||||
* @param name
|
||||
* @return
|
||||
*/
|
||||
private int getErrorConfigLineNumber(String name) {
|
||||
try {
|
||||
File file = new File(buildDir + "/config.log");
|
||||
// If the log file is not present there is nothing we can do.
|
||||
if (!file.exists())
|
||||
return -1;
|
||||
|
||||
FileReader stream = new FileReader(file);
|
||||
LineNumberReader reader = new LineNumberReader(stream);
|
||||
|
||||
Pattern errorPattern = Pattern
|
||||
.compile("configure:(\\d+): checking for " + name); //$NON-NLS-1$
|
||||
String line = reader.readLine();
|
||||
while (line != null) {
|
||||
Matcher m = errorPattern.matcher(line);
|
||||
|
||||
if (m.matches()) {
|
||||
return Integer.parseInt(m.group(1));
|
||||
}
|
||||
|
||||
line = reader.readLine();
|
||||
}
|
||||
stream.close();
|
||||
|
||||
} catch (Exception e) {
|
||||
return -1;
|
||||
}
|
||||
return -1;
|
||||
}
|
||||
|
||||
@Override
|
||||
public IProject getProject() {
|
||||
return this.project;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,475 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2005, 2010 IBM Corporation and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* IBM Corporation - initial API and implementation
|
||||
* Sergey Prigogin (Google)
|
||||
* James Blackburn (Broadcom) - Bug 247838
|
||||
* Andrew Gvozdev (Quoin Inc)
|
||||
* Dmitry Kozlov (CodeSourcery) - Build error highlighting and navigation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.net.URI;
|
||||
import java.util.ArrayList;
|
||||
import java.util.LinkedHashMap;
|
||||
import java.util.Map;
|
||||
import java.util.Vector;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IErrorParser;
|
||||
import org.eclipse.cdt.core.IErrorParser2;
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.cdt.internal.core.IErrorMarkeredOutputStream;
|
||||
import org.eclipse.cdt.utils.EFSExtensionManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.URIUtil;
|
||||
|
||||
/**
|
||||
* The purpose of ErrorParserManager is to delegate the work of error parsing
|
||||
* build output to {@link IErrorParser}s, assist in finding {@link IResource}s, and
|
||||
* help create appropriate error/warning/info markers to be displayed
|
||||
* by the Problems view.
|
||||
*
|
||||
* @noextend This class is not intended to be subclassed by clients.
|
||||
*/
|
||||
@SuppressWarnings("restriction")
|
||||
public class ErrorParserManager extends OutputStream {
|
||||
/**
|
||||
* The list of error parsers stored in .project for 3.X projects
|
||||
* as key/value pair with key="org.eclipse.cdt.core.errorOutputParser"
|
||||
* @deprecated since CDT 4.0.
|
||||
*/
|
||||
|
||||
/**
|
||||
* Delimiter for error parsers presented in one string.
|
||||
* @since 5.2
|
||||
*/
|
||||
public final static char ERROR_PARSER_DELIMITER = ';';
|
||||
|
||||
private int nOpens;
|
||||
private int lineCounter=0;
|
||||
|
||||
private final IProject fProject;
|
||||
private final MarkerGenerator fMarkerGenerator;
|
||||
|
||||
private Map<String, ErrorParser> fErrorParsers;
|
||||
private ArrayList<ProblemMarkerInfo> fErrors;
|
||||
|
||||
private Vector<URI> fDirectoryStack;
|
||||
private final URI fBaseDirectoryURI;
|
||||
|
||||
private String previousLine;
|
||||
private OutputStream outputStream;
|
||||
private final StringBuilder currentLine = new StringBuilder();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param project - project being built.
|
||||
* @param markerGenerator - marker generator able to create markers.
|
||||
*/
|
||||
public ErrorParserManager(IProject project, MarkerGenerator markerGenerator) {
|
||||
this(project, markerGenerator, null);
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor.
|
||||
*
|
||||
* @param project - project being built.
|
||||
* @param markerGenerator - marker generator able to create markers.
|
||||
* @param parsersIDs - array of error parsers' IDs.
|
||||
*/
|
||||
public ErrorParserManager(IProject project, MarkerGenerator markerGenerator, String[] parsersIDs) {
|
||||
this(project, project.getLocationURI(), markerGenerator, parsersIDs);
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* URI based constructor.
|
||||
*
|
||||
* @param project - project being built.
|
||||
* @param baseDirectoryURI - absolute location URI of working directory of where the build is performed.
|
||||
* @param markerGenerator - marker generator able to create markers.
|
||||
* @param parsersIDs - array of error parsers' IDs.
|
||||
* @since 5.1
|
||||
*/
|
||||
public ErrorParserManager(IProject project, URI baseDirectoryURI, MarkerGenerator markerGenerator, String[] parsersIDs) {
|
||||
fProject = project;
|
||||
fMarkerGenerator = markerGenerator;
|
||||
fDirectoryStack = new Vector<URI>();
|
||||
fErrors = new ArrayList<ProblemMarkerInfo>();
|
||||
fErrorParsers = new LinkedHashMap<String, ErrorParser>();
|
||||
|
||||
if (baseDirectoryURI != null)
|
||||
fBaseDirectoryURI = baseDirectoryURI;
|
||||
else
|
||||
fBaseDirectoryURI = project.getLocationURI();
|
||||
}
|
||||
|
||||
public void addErrorParser(String id, ErrorParser parser) {
|
||||
fErrorParsers.put(id, parser);
|
||||
}
|
||||
|
||||
/**
|
||||
* @return current project.
|
||||
*/
|
||||
public IProject getProject() {
|
||||
return fProject;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return the current URI location where the build is being performed
|
||||
* @since 5.1
|
||||
*/
|
||||
public URI getWorkingDirectoryURI() {
|
||||
if (!fDirectoryStack.isEmpty())
|
||||
return fDirectoryStack.lastElement();
|
||||
|
||||
// Fall back to the Project Location / Build directory
|
||||
return fBaseDirectoryURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectory} and {@link #popDirectory} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace}).
|
||||
* The intention is to handle make output of commands "pushd dir" and "popd".
|
||||
*
|
||||
* @param dir - another directory level to keep in stack -- corresponding to 'pushd'.
|
||||
*/
|
||||
public void pushDirectory(IPath dir) {
|
||||
if (dir != null) {
|
||||
URI uri;
|
||||
URI workingDirectoryURI = getWorkingDirectoryURI();
|
||||
if (!dir.isAbsolute())
|
||||
uri = URIUtil.append(workingDirectoryURI, dir.toString());
|
||||
else {
|
||||
uri = toURI(dir);
|
||||
if (uri == null) // Shouldn't happen; error logged
|
||||
return;
|
||||
}
|
||||
pushDirectoryURI(uri);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectoryURI} and {@link #popDirectoryURI} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace}).
|
||||
* The intention is to handle make output of commands "pushd dir" and "popd".
|
||||
*
|
||||
* @param dir - another directory level to keep in stack -- corresponding to 'pushd'.
|
||||
* @since 5.1
|
||||
*/
|
||||
public void pushDirectoryURI(URI dir) {
|
||||
if (dir != null) {
|
||||
if (dir.isAbsolute())
|
||||
fDirectoryStack.addElement(dir);
|
||||
else
|
||||
fDirectoryStack.addElement(URIUtil.makeAbsolute(dir, getWorkingDirectoryURI()));
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* {@link #pushDirectoryURI(URI)} and {@link #popDirectoryURI()} are used to change working directory
|
||||
* from where file name is searched (see {@link #findFileInWorkspace(IPath)}).
|
||||
* The intention is to handle make output of commands "pushd" and "popd".
|
||||
*
|
||||
* @return previous build directory location corresponding 'popd' command.
|
||||
* @since 5.1
|
||||
*/
|
||||
public URI popDirectoryURI() {
|
||||
int i = fDirectoryStack.size();
|
||||
if (i != 0) {
|
||||
URI dir = fDirectoryStack.lastElement();
|
||||
fDirectoryStack.removeElementAt(i - 1);
|
||||
return dir;
|
||||
}
|
||||
return fBaseDirectoryURI;
|
||||
}
|
||||
|
||||
/**
|
||||
* @return number of directories in the stack.
|
||||
*/
|
||||
public int getDirectoryLevel() {
|
||||
return fDirectoryStack.size();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Parses the input and tries to generate error or warning markers
|
||||
*/
|
||||
private void processLine(String line) {
|
||||
String lineTrimmed = line.trim();
|
||||
lineCounter++;
|
||||
|
||||
ProblemMarkerInfo marker=null;
|
||||
|
||||
for (ErrorParser parser : fErrorParsers.values()) {
|
||||
ErrorParser curr = parser;
|
||||
int types = IErrorParser2.NONE;
|
||||
if (curr instanceof IErrorParser2) {
|
||||
types = ((IErrorParser2) curr).getProcessLineBehaviour();
|
||||
}
|
||||
if ((types & IErrorParser2.KEEP_LONGLINES) == 0) {
|
||||
// long lines are not given to parsers, unless it wants it
|
||||
if (lineTrimmed.length() > 1000)
|
||||
continue;
|
||||
}
|
||||
// standard behavior (pre 5.1) is to trim the line
|
||||
String lineToParse = lineTrimmed;
|
||||
if ((types & IErrorParser2.KEEP_UNTRIMMED) !=0 ) {
|
||||
// untrimmed lines
|
||||
lineToParse = line;
|
||||
}
|
||||
|
||||
boolean consume = false;
|
||||
// Protect against rough parsers who may accidentally
|
||||
// throw an exception on a line they can't handle.
|
||||
// It should not stop parsing of the rest of output.
|
||||
try {
|
||||
consume = curr.processLine(lineToParse, this);
|
||||
} catch (Exception e){
|
||||
AutotoolsPlugin.log(e);
|
||||
} finally {
|
||||
if (fErrors.size() > 0) {
|
||||
if (marker==null)
|
||||
marker = fErrors.get(0);
|
||||
fErrors.clear();
|
||||
}
|
||||
}
|
||||
|
||||
if (consume)
|
||||
break;
|
||||
}
|
||||
outputLine(line, marker);
|
||||
}
|
||||
|
||||
/**
|
||||
* Conditionally output line to outputStream. If stream
|
||||
* supports error markers, use it, otherwise use conventional stream
|
||||
*/
|
||||
private void outputLine(String line, ProblemMarkerInfo marker) {
|
||||
String l = line + "\n"; //$NON-NLS-1$
|
||||
if ( outputStream == null ) return;
|
||||
try {
|
||||
if (marker != null) {
|
||||
if (outputStream instanceof IErrorMarkeredOutputStream) {
|
||||
IErrorMarkeredOutputStream mos = (IErrorMarkeredOutputStream)outputStream;
|
||||
mos.write(l, marker);
|
||||
}
|
||||
}
|
||||
byte[] b = l.getBytes();
|
||||
outputStream.write(b, 0, b.length);
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @return counter counting processed lines of output
|
||||
* @since 5.2
|
||||
*/
|
||||
public int getLineCounter() {
|
||||
return lineCounter;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Add marker to the list of error markers.
|
||||
*
|
||||
* @param file - resource to add the new marker.
|
||||
* @param lineNumber - line number of the error.
|
||||
* @param desc - description of the error.
|
||||
* @param severity - severity of the error.
|
||||
* @param varName - variable name.
|
||||
*/
|
||||
public void generateMarker(IResource file, int lineNumber, String desc, int severity, String varName,
|
||||
AutotoolsProblemMarkerInfo.Type type) {
|
||||
generateExternalMarker(file, lineNumber, desc, severity, varName, null, null, type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add marker to the list of error markers.
|
||||
*
|
||||
* @param file - resource to add the new marker.
|
||||
* @param lineNumber - line number of the error.
|
||||
* @param desc - description of the error.
|
||||
* @param severity - severity of the error, one of
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_INFO},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_WARNING},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_ERROR_RESOURCE},
|
||||
* <br>{@link IMarkerGenerator#SEVERITY_ERROR_BUILD}
|
||||
* @param varName - variable name.
|
||||
* @param externalPath - external path pointing to a file outside the workspace.
|
||||
*/
|
||||
public void generateExternalMarker(IResource file, int lineNumber, String desc, int severity,
|
||||
String varName, IPath externalPath, String libraryInfo, AutotoolsProblemMarkerInfo.Type type) {
|
||||
AutotoolsProblemMarkerInfo problemMarkerInfo =
|
||||
new AutotoolsProblemMarkerInfo(file, lineNumber, desc, severity, varName, externalPath, libraryInfo, type);
|
||||
addProblemMarker(problemMarkerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Add the given marker to the list of error markers.
|
||||
*
|
||||
* @param problemMarkerInfo - The marker to be added
|
||||
*/
|
||||
public void addProblemMarker(AutotoolsProblemMarkerInfo problemMarkerInfo){
|
||||
fErrors.add(problemMarkerInfo.getMarker());
|
||||
fMarkerGenerator.addMarker(problemMarkerInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* Called by the error parsers.
|
||||
* @return the previous line, save in the working buffer.
|
||||
*/
|
||||
public String getPreviousLine() {
|
||||
return new String((previousLine) == null ? "" : previousLine); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
/**
|
||||
* Method setOutputStream.
|
||||
* Note: you have to close this stream explicitly
|
||||
* don't rely on ErrorParserManager.close().
|
||||
* @param os - output stream
|
||||
*/
|
||||
public void setOutputStream(OutputStream os) {
|
||||
outputStream = os;
|
||||
}
|
||||
|
||||
/**
|
||||
* Method getOutputStream.
|
||||
* Note: you have to close this stream explicitly
|
||||
* don't rely on ErrorParserManager.close().
|
||||
* @return OutputStream
|
||||
*/
|
||||
public OutputStream getOutputStream() {
|
||||
nOpens++;
|
||||
return this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.io.OutputStream#close()
|
||||
* Note: don't rely on this method to close underlying OutputStream,
|
||||
* close it explicitly
|
||||
*/
|
||||
@Override
|
||||
public synchronized void close() throws IOException {
|
||||
if (nOpens > 0 && --nOpens == 0) {
|
||||
checkLine(true);
|
||||
fDirectoryStack.removeAllElements();
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.io.OutputStream#flush()
|
||||
*/
|
||||
@Override
|
||||
public void flush() throws IOException {
|
||||
if (outputStream != null)
|
||||
outputStream.flush();
|
||||
}
|
||||
|
||||
/**
|
||||
* @see java.io.OutputStream#write(int)
|
||||
*/
|
||||
@Override
|
||||
public synchronized void write(int b) throws IOException {
|
||||
currentLine.append((char) b);
|
||||
checkLine(false);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(byte[] b, int off, int len) throws IOException {
|
||||
if (b == null) {
|
||||
throw new NullPointerException();
|
||||
} else if (off != 0 || (len < 0) || (len > b.length)) {
|
||||
throw new IndexOutOfBoundsException();
|
||||
} else if (len == 0) {
|
||||
return;
|
||||
}
|
||||
currentLine.append(new String(b, 0, len));
|
||||
checkLine(false);
|
||||
}
|
||||
|
||||
// This method examines contents of currentLine buffer
|
||||
// if it contains whole line this line is checked by error
|
||||
// parsers (processLine method).
|
||||
// If flush is true rest of line is checked by error parsers.
|
||||
private void checkLine(boolean flush) {
|
||||
String buffer = currentLine.toString();
|
||||
int i = 0;
|
||||
while ((i = buffer.indexOf('\n')) != -1) {
|
||||
String line = buffer.substring(0, i);
|
||||
// get rid of any trailing '\r'
|
||||
if (line.endsWith("\r")) //$NON-NLS-1$
|
||||
line=line.substring(0,line.length()-1);
|
||||
processLine(line);
|
||||
previousLine = line;
|
||||
buffer = buffer.substring(i + 1); // skip the \n and advance
|
||||
}
|
||||
currentLine.setLength(0);
|
||||
if (flush) {
|
||||
if (buffer.length() > 0) {
|
||||
processLine(buffer);
|
||||
previousLine = buffer;
|
||||
}
|
||||
} else {
|
||||
currentLine.append(buffer);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Converts a location {@link IPath} to an {@link URI}. Contrary to
|
||||
* {@link URIUtil#toURI(IPath)} this method does not assume that the path belongs
|
||||
* to local file system.
|
||||
*
|
||||
* The returned URI uses the scheme and authority of the current working directory
|
||||
* as returned by {@link #getWorkingDirectoryURI()}
|
||||
*
|
||||
* @param path - the path to convert to URI.
|
||||
* @return URI
|
||||
* @since 5.1
|
||||
*/
|
||||
private URI toURI(IPath path) {
|
||||
// try {
|
||||
URI baseURI = getWorkingDirectoryURI();
|
||||
String uriString = path.toString();
|
||||
|
||||
// On Windows "C:/folder/" -> "/C:/folder/"
|
||||
if (path.isAbsolute() && uriString.charAt(0) != IPath.SEPARATOR)
|
||||
uriString = IPath.SEPARATOR + uriString;
|
||||
|
||||
return EFSExtensionManager.getDefault().createNewURIFromPath(baseURI, uriString);
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param ids - array of error parser IDs
|
||||
* @return error parser IDs delimited with error parser delimiter ";"
|
||||
* @since 5.2
|
||||
*/
|
||||
public static String toDelimitedString(String[] ids) {
|
||||
String result=""; //$NON-NLS-1$
|
||||
for (String id : ids) {
|
||||
if (result.length()==0) {
|
||||
result = id;
|
||||
} else {
|
||||
result += ERROR_PARSER_DELIMITER + id;
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,21 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
|
||||
public interface IAutotoolsMarker {
|
||||
public static String AUTOTOOLS_PROBLEM_MARKER = AutotoolsPlugin.PLUGIN_ID + ".problem"; //$NON-NLS-1$
|
||||
public static final String MARKER_VARIABLE = "problem.variable"; //$NON-NLS-1$
|
||||
public static final String MARKER_EXTERNAL_LOCATION = "problem.externalLocation"; //$NON-NLS-1$
|
||||
public static final String MARKER_LIBRARY_INFO="problem.libraryInfo"; //$NON-NLS-1$
|
||||
public static final String MARKER_PROBLEM_TYPE="problem.type"; //$NON-NLS-1$
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
|
||||
public interface IConfigurationCloneListener {
|
||||
/**
|
||||
* Notified when a configuration gets cloned.
|
||||
* @param cloneName - name of the cloned configuration
|
||||
* @param c - the clone
|
||||
*/
|
||||
public void cloneCfg(String cloneName, IConfiguration c);
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2002, 2004 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class MakeMessages {
|
||||
|
||||
private static final String RESOURCE_BUNDLE= MakeMessages.class.getName();
|
||||
private static ResourceBundle fgResourceBundle;
|
||||
static {
|
||||
try {
|
||||
fgResourceBundle = ResourceBundle.getBundle(RESOURCE_BUNDLE);
|
||||
} catch (MissingResourceException x) {
|
||||
fgResourceBundle = null;
|
||||
}
|
||||
}
|
||||
|
||||
private MakeMessages() {
|
||||
}
|
||||
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return fgResourceBundle.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
} catch (NullPointerException e) {
|
||||
return "#" + key + "#"; //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a string from the resource bundle and formats it with the argument
|
||||
*
|
||||
* @param key the string used to get the bundle value, must not be null
|
||||
*/
|
||||
public static String getFormattedString(String key, Object arg) {
|
||||
return MessageFormat.format(getString(key), new Object[] { arg });
|
||||
}
|
||||
|
||||
/**
|
||||
* Gets a string from the resource bundle and formats it with arguments
|
||||
*/
|
||||
public static String getFormattedString(String key, Object[] args) {
|
||||
return MessageFormat.format(getString(key), args);
|
||||
}
|
||||
}
|
|
@ -0,0 +1,188 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2000, 2006, 2010 QNX Software Systems and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* QNX Software Systems - Initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.util.Map;
|
||||
import java.util.Map.Entry;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.IMarkerGenerator;
|
||||
import org.eclipse.cdt.core.ProblemMarkerInfo;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public abstract class MarkerGenerator {
|
||||
|
||||
static final int SEVERITY_INFO = IMarkerGenerator.SEVERITY_INFO;
|
||||
static final int SEVERITY_WARNING = IMarkerGenerator.SEVERITY_WARNING;
|
||||
static final int SEVERITY_ERROR_RESOURCE = IMarkerGenerator.SEVERITY_ERROR_RESOURCE;
|
||||
static final int SEVERITY_ERROR_BUILD = IMarkerGenerator.SEVERITY_ERROR_BUILD;
|
||||
|
||||
/**
|
||||
* Constructor for MarkerGenerator
|
||||
*/
|
||||
public MarkerGenerator() {
|
||||
super();
|
||||
}
|
||||
|
||||
/*
|
||||
* callback from Output Parser
|
||||
*/
|
||||
public void addMarker(IResource file, int lineNumber, String errorDesc, int severity, String errorVar) {
|
||||
|
||||
try {
|
||||
IMarker[] cur = file.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
|
||||
/*
|
||||
* Try to find matching markers and don't put in duplicates
|
||||
*/
|
||||
if ((cur != null) && (cur.length > 0)) {
|
||||
for (int i = 0; i < cur.length; i++) {
|
||||
int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
|
||||
int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
|
||||
String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
|
||||
if (line == lineNumber && sev == mapMarkerSeverity(severity) && mesg.equals(errorDesc)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IMarker marker = file.createMarker(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
marker.setAttribute(IMarker.LOCATION, lineNumber);
|
||||
marker.setAttribute(IMarker.MESSAGE, errorDesc);
|
||||
marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(severity));
|
||||
marker.setAttribute(IMarker.LINE_NUMBER, lineNumber);
|
||||
marker.setAttribute(IMarker.CHAR_START, -1);
|
||||
marker.setAttribute(IMarker.CHAR_END, -1);
|
||||
if (errorVar != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_VARIABLE, errorVar);
|
||||
}
|
||||
}
|
||||
catch (CoreException e) {
|
||||
AutotoolsPlugin.log(e.getStatus());
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
public abstract IProject getProject();
|
||||
|
||||
public boolean hasMarkers(IResource file) {
|
||||
IMarker[] markers;
|
||||
try {
|
||||
markers = file.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, false, IResource.DEPTH_ONE);
|
||||
} catch (CoreException e) {
|
||||
return false;
|
||||
}
|
||||
return markers.length > 0;
|
||||
}
|
||||
|
||||
/*
|
||||
* callback from Output Parser
|
||||
*/
|
||||
public void addMarker(AutotoolsProblemMarkerInfo autotoolsMarker) {
|
||||
|
||||
ProblemMarkerInfo info = autotoolsMarker.getMarker();
|
||||
|
||||
try {
|
||||
IResource markerResource = info.file ;
|
||||
if (markerResource==null) {
|
||||
markerResource = getProject();
|
||||
}
|
||||
IMarker[] cur = markerResource.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
|
||||
// IMarker[] cur = markerResource.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_ONE);
|
||||
/*
|
||||
* Try to find matching markers and don't put in duplicates
|
||||
*/
|
||||
if ((cur != null) && (cur.length > 0)) {
|
||||
for (int i = 0; i < cur.length; i++) {
|
||||
int line = ((Integer) cur[i].getAttribute(IMarker.LOCATION)).intValue();
|
||||
int sev = ((Integer) cur[i].getAttribute(IMarker.SEVERITY)).intValue();
|
||||
String mesg = (String) cur[i].getAttribute(IMarker.MESSAGE);
|
||||
if (line == info.lineNumber && sev == mapMarkerSeverity(info.severity) && mesg.equals(info.description)) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
IMarker marker = markerResource.createMarker(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER);
|
||||
// IMarker marker = markerResource.createMarker(ICModelMarker.C_MODEL_PROBLEM_MARKER);
|
||||
marker.setAttribute(IMarker.LOCATION, info.lineNumber);
|
||||
marker.setAttribute(IMarker.MESSAGE, info.description);
|
||||
marker.setAttribute(IMarker.SEVERITY, mapMarkerSeverity(info.severity));
|
||||
marker.setAttribute(IMarker.LINE_NUMBER, info.lineNumber);
|
||||
marker.setAttribute(IMarker.CHAR_START, -1);
|
||||
marker.setAttribute(IMarker.CHAR_END, -1);
|
||||
if (info.variableName != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_VARIABLE, info.variableName);
|
||||
}
|
||||
if (info.externalPath != null) {
|
||||
marker.setAttribute(IAutotoolsMarker.MARKER_EXTERNAL_LOCATION, info.externalPath.toOSString());
|
||||
}
|
||||
|
||||
// Add all other client defined attributes.
|
||||
Map<String, String> attributes = info.getAttributes();
|
||||
if (attributes != null){
|
||||
for (Entry<String, String> entry : attributes.entrySet()) {
|
||||
marker.setAttribute(entry.getKey(), entry.getValue());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
catch (CoreException e) {
|
||||
AutotoolsPlugin.log(e.getStatus());
|
||||
}
|
||||
}
|
||||
|
||||
private int mapMarkerSeverity(int severity) {
|
||||
switch (severity) {
|
||||
case SEVERITY_ERROR_BUILD :
|
||||
case SEVERITY_ERROR_RESOURCE :
|
||||
return IMarker.SEVERITY_ERROR;
|
||||
case SEVERITY_INFO :
|
||||
return IMarker.SEVERITY_INFO;
|
||||
case SEVERITY_WARNING :
|
||||
return IMarker.SEVERITY_WARNING;
|
||||
}
|
||||
return IMarker.SEVERITY_ERROR;
|
||||
}
|
||||
|
||||
/* (non-Javadoc)
|
||||
* Removes the IMarkers for the project specified in the argument if the
|
||||
* project exists, and is open.
|
||||
*
|
||||
* @param project
|
||||
*/
|
||||
public void removeAllMarkers(IProject project) {
|
||||
if (project == null || !project.isAccessible()) return;
|
||||
|
||||
// Clear out the problem markers
|
||||
IWorkspace workspace = project.getWorkspace();
|
||||
IMarker[] markers;
|
||||
try {
|
||||
markers = project.findMarkers(IAutotoolsMarker.AUTOTOOLS_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
|
||||
// markers = project.findMarkers(ICModelMarker.C_MODEL_PROBLEM_MARKER, true, IResource.DEPTH_INFINITE);
|
||||
} catch (CoreException e) {
|
||||
// Handled just about every case in the sanity check
|
||||
return;
|
||||
}
|
||||
if (markers != null) {
|
||||
try {
|
||||
workspace.deleteMarkers(markers);
|
||||
} catch (CoreException e) {
|
||||
// The only situation that might cause this is some sort of resource change event
|
||||
return;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
|
@ -0,0 +1,28 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.ui.IMarkerResolution;
|
||||
import org.eclipse.ui.IMarkerResolutionGenerator;
|
||||
|
||||
public class MarkerResolutionGenerator implements IMarkerResolutionGenerator {
|
||||
|
||||
public IMarkerResolution[] getResolutions(IMarker marker) {
|
||||
// System.out.println("in marker resolution, library info is " + marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, ""));
|
||||
// String libraryInfo = marker.getAttribute(IAutotoolsMarker.MARKER_LIBRARY_INFO, null);
|
||||
// if (libraryInfo != null) {
|
||||
// return new IMarkerResolution[] {new PkgconfigErrorResolution(libraryInfo)};
|
||||
// };
|
||||
return new IMarkerResolution[0];
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2010 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.OutputStream;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.CommandLauncher;
|
||||
import org.eclipse.core.resources.IMarker;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.NullProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
import org.eclipse.ui.IMarkerResolution;
|
||||
|
||||
public class PkgconfigErrorResolution implements IMarkerResolution {
|
||||
|
||||
private class ConsoleOutputStream extends OutputStream {
|
||||
|
||||
protected StringBuffer fBuffer;
|
||||
|
||||
public ConsoleOutputStream() {
|
||||
fBuffer= new StringBuffer();
|
||||
}
|
||||
|
||||
public synchronized String readBuffer() {
|
||||
String buf = fBuffer.toString();
|
||||
fBuffer.setLength(0);
|
||||
return buf;
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(int c) throws IOException {
|
||||
byte ascii[] = new byte[1];
|
||||
ascii[0] = (byte) c;
|
||||
fBuffer.append(new String(ascii));
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void write(byte[] b, int off, int len) throws IOException {
|
||||
fBuffer.append(new String(b, off, len));
|
||||
}
|
||||
}
|
||||
|
||||
private final static String PKG_UPDATE_MSG = "UpdatePackage.msg"; //$NON-NLS-1$
|
||||
private String pkgName;
|
||||
|
||||
public PkgconfigErrorResolution(String pkgconfigRequirement) {
|
||||
// Get the pkgconfig package name from the requirement message.
|
||||
Pattern p = Pattern.compile("(.*?)[\\s,>,<,=].*");
|
||||
Matcher m = p.matcher(pkgconfigRequirement);
|
||||
if (m.matches()) {
|
||||
pkgName = m.group(1);
|
||||
}
|
||||
}
|
||||
|
||||
public String getLabel() {
|
||||
// TODO Auto-generated method stub
|
||||
return AutotoolsPlugin.getFormattedString(PKG_UPDATE_MSG, new String[] {pkgName});
|
||||
}
|
||||
|
||||
public void run(IMarker marker) {
|
||||
// We have a pkgconfig library missing requirement for "pkg". Now, "pkg" does
|
||||
// not necessarily match the actual system package needed to be updated (e.g.
|
||||
// gtk+-2.0 is the name of the pkgconfig file for gtk2).
|
||||
// We can try and find the "pkg.pc" file and look at what real package provides
|
||||
// it. Updating that package will update the actual package in question as well
|
||||
// as updating the pkgconfig info for "pkg".
|
||||
// Note, that we won't have any pkgconfig path settings from the configure call
|
||||
// so we can't handle the situation where the user doesn't have pkgconfig files
|
||||
// stored in the usual place.
|
||||
IPath pkgconfigPath =
|
||||
new Path("/usr/lib/pkgconfig").append(pkgName+".pc"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
// Get a launcher for the config command
|
||||
CommandLauncher launcher = new CommandLauncher();
|
||||
IPath commandPath = new Path("rpm"); //$NON-NLS-1$
|
||||
String[] commandArgs =
|
||||
new String[] {"-q", //$NON-NLS-1$
|
||||
"--queryformat", //$NON-NLS-1$
|
||||
"%{NAME}", //$NON-NLS-1$
|
||||
"--whatprovides", //$NON-NLS-1$
|
||||
pkgconfigPath.toOSString()};
|
||||
try {
|
||||
// Use CDT launcher to run rpm to query the package that provides
|
||||
// the pkgconfig .pc file for the package in question.
|
||||
ConsoleOutputStream output = new ConsoleOutputStream();
|
||||
Process proc = launcher.execute(commandPath, commandArgs, null,
|
||||
new Path("."), new NullProgressMonitor());
|
||||
if (proc != null) {
|
||||
try {
|
||||
// Close the input of the process since we will never write to
|
||||
// it
|
||||
proc.getOutputStream().close();
|
||||
} catch (IOException e) {
|
||||
}
|
||||
if (launcher.waitAndRead(output, output, new NullProgressMonitor())
|
||||
!= CommandLauncher.OK) {
|
||||
AutotoolsPlugin.logErrorMessage(launcher.getErrorMessage());
|
||||
} else {
|
||||
String result = output.readBuffer();
|
||||
if (!result.startsWith("error:")) //$NON-NLS-1$
|
||||
System.out.println("need to execute update of " + result);
|
||||
}
|
||||
}
|
||||
|
||||
} catch (CoreException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} //$NON-NLS-1$
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,57 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 Red Hat, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core;
|
||||
|
||||
public class VersionComparator {
|
||||
|
||||
/**
|
||||
* Compare two version numbers if
|
||||
* return -1 if v1 is older than v2 0 if they are the same and +1
|
||||
* if v1 is newer than v2
|
||||
*
|
||||
* Version numbers are expected to be in the format x.y.z...
|
||||
*
|
||||
* So:
|
||||
* VersionComparator.compare("1.0", "1.2") return -1
|
||||
* VersionComparator.compare("1.5", "1.2") returns 1
|
||||
* VersionComparator.compare("1.5.1", "1.5.5") returns -1
|
||||
* VersionComparator.compare("1.5", "1.5.1") returns 1
|
||||
* VersionComparator.compare("1.5.1", "1.5.1") returns 0
|
||||
*/
|
||||
public static int compare(String v1, String v2) {
|
||||
String[] v1digits = v1.split("\\.");
|
||||
String[] v2digits = v2.split("\\.");
|
||||
|
||||
for (int i = 0; i < v1digits.length && i < v2digits.length; i++) {
|
||||
int d1 = Integer.valueOf(v1digits[i]);
|
||||
int d2 = Integer.valueOf(v2digits[i]);
|
||||
|
||||
if (d1 < d2)
|
||||
return -1;
|
||||
|
||||
if (d1 > d2)
|
||||
return 1;
|
||||
}
|
||||
|
||||
// At this point all digits have the same value
|
||||
// so the version with the longer string wins
|
||||
|
||||
if (v1digits.length < v2digits.length)
|
||||
return -1;
|
||||
|
||||
if (v1digits.length > v2digits.length)
|
||||
return 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,77 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public abstract class AbstractConfigurationOption implements IConfigureOption {
|
||||
|
||||
protected String name;
|
||||
private String msgName;
|
||||
protected AutotoolsConfiguration cfg;
|
||||
|
||||
public AbstractConfigurationOption(String name, AutotoolsConfiguration cfg) {
|
||||
this(name, name, cfg);
|
||||
}
|
||||
|
||||
public AbstractConfigurationOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
this.name = name;
|
||||
this.msgName = msgName;
|
||||
this.cfg = cfg;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(msgName);
|
||||
}
|
||||
|
||||
public String getToolTip() {
|
||||
return ConfigureMessages.getConfigureTip(msgName);
|
||||
}
|
||||
|
||||
public String getMsgName() {
|
||||
return msgName;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public AutotoolsConfiguration getCfg() {
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public ArrayList<String> getParameters() {
|
||||
ArrayList<String> parameters = new ArrayList<String>();
|
||||
if (isParmSet())
|
||||
parameters.add(getParameter());
|
||||
return parameters;
|
||||
}
|
||||
|
||||
public String getParameterName() {
|
||||
return "--" + getName();
|
||||
}
|
||||
|
||||
public boolean isCategory() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFlag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFlagValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isMultiArg() {
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,342 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.HashMap;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
|
||||
public class AutotoolsConfiguration implements IAConfiguration {
|
||||
|
||||
public static class Option {
|
||||
private String name;
|
||||
private String transformedName;
|
||||
private int type;
|
||||
private String defaultValue;
|
||||
|
||||
public Option(String name, int type) {
|
||||
this(name, name, type);
|
||||
}
|
||||
|
||||
public Option(String name, String transformedName, int type) {
|
||||
this.name = name;
|
||||
this.transformedName = transformedName;
|
||||
this.type = type;
|
||||
}
|
||||
|
||||
public Option(String name, String transformedName, String defaultValue, int type) {
|
||||
this.name = name;
|
||||
this.transformedName = transformedName;
|
||||
this.type = type;
|
||||
this.defaultValue = defaultValue;
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return type;
|
||||
}
|
||||
|
||||
public String getDefaultValue() {
|
||||
return defaultValue;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(transformedName);
|
||||
}
|
||||
|
||||
public String getToolTip() {
|
||||
return ConfigureMessages.getConfigureTip(transformedName);
|
||||
}
|
||||
}
|
||||
|
||||
// Configure options and categories. List below is ordered.
|
||||
// All options following a category are children of that category
|
||||
// in a tree view, up to the next category.
|
||||
private static Option[] configOpts = new Option[] {
|
||||
new Option("configure", IConfigureOption.TOOL), // $NON-NLS-1$
|
||||
new Option("general", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("configdir", IConfigureOption.INTERNAL), // $NON-NLS-1$
|
||||
new Option("cache-file", "cache_file", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("help", IConfigureOption.BIN), // $NON-NLS-1$
|
||||
new Option("no-create", "no_create", IConfigureOption.BIN), // $NON-NLS-1$
|
||||
new Option("quiet", IConfigureOption.BIN), // $NON-NLS-1$
|
||||
new Option("version", IConfigureOption.BIN), // $NON-NLS-1$
|
||||
new Option("platform", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("host", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("build", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("target", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("directories", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("prefix", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("exec-prefix", "exec_prefix", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("libdir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("bindir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("sbindir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("includedir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("datadir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("sysconfdir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("infodir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("mandir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("srcdir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("localstatedir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("sharedstatedir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("libexecdir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("oldincludedir", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("filenames", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("program-prefix", "program_prefix", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("program-suffix", "program_suffix", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("program-transform-name", "program_transform_name", IConfigureOption.STRING), // $NON-NLS-1$
|
||||
new Option("features", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("enable-maintainer-mode", "enable_maintainer_mode", IConfigureOption.BIN), // $NON-NLS-1$
|
||||
new Option("CFLAGS", IConfigureOption.FLAG), // $NON-NLS-1$
|
||||
new Option("cflags-debug", "cflags_debug", IConfigureOption.FLAGVALUE), // $NON-NLS-1$ // $NON-NLS-2$
|
||||
new Option("cflags-gprof", "cflags_gprof", IConfigureOption.FLAGVALUE), // $NON-NLS-1$ // $NON-NLS-2$
|
||||
new Option("cflags-gcov", "cflags_gcov", IConfigureOption.FLAGVALUE), // $NON-NLS-1$ // $NON-NLS-2$
|
||||
new Option("user", IConfigureOption.MULTIARG), // $NON-NLS-1$
|
||||
new Option("autogen", "autogen", "autogen.sh", IConfigureOption.TOOL), // $NON-NLS-1$
|
||||
new Option("options", IConfigureOption.CATEGORY), // $NON-NLS-1$
|
||||
new Option("autogenOpts", IConfigureOption.MULTIARG), // $NON-NLS-1$
|
||||
};
|
||||
|
||||
private static Option[] toolList;
|
||||
|
||||
private String id;
|
||||
private boolean isDirty;
|
||||
private boolean isParmsDirty;
|
||||
private Map<String, IConfigureOption> configOptions;
|
||||
private ArrayList<String> configParms = new ArrayList<String>();
|
||||
|
||||
public AutotoolsConfiguration(String name) {
|
||||
this(name, true);
|
||||
}
|
||||
|
||||
private AutotoolsConfiguration(String name, boolean initialize) {
|
||||
this.id = name;
|
||||
configOptions = new HashMap<String, IConfigureOption>();
|
||||
if (initialize)
|
||||
initConfigOptions();
|
||||
isParmsDirty = true;
|
||||
}
|
||||
|
||||
private void initConfigOptions() {
|
||||
// Put configure options in hash map. Ignore categories.
|
||||
ArrayList<Option> tools = new ArrayList<Option>();
|
||||
FlagConfigureOption lastFlag = null;
|
||||
for (int i = 0; i < configOpts.length; ++i) {
|
||||
Option opt = configOpts[i];
|
||||
String defaultValue = opt.getDefaultValue();
|
||||
int type = opt.type;
|
||||
switch (type) {
|
||||
case IConfigureOption.BIN:
|
||||
BinConfigureOption b = new BinConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
b.setValue(defaultValue);
|
||||
configOptions.put(opt.name, b);
|
||||
break;
|
||||
case IConfigureOption.STRING:
|
||||
StringConfigureOption s = new StringConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
s.setValue(defaultValue);
|
||||
configOptions.put(opt.name, s);
|
||||
break;
|
||||
case IConfigureOption.INTERNAL:
|
||||
InternalConfigureOption io = new InternalConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
io.setValue(defaultValue);
|
||||
configOptions.put(opt.name, io);
|
||||
break;
|
||||
case IConfigureOption.MULTIARG:
|
||||
MultiArgConfigureOption m = new MultiArgConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
m.setValue(defaultValue);
|
||||
configOptions.put(opt.name, m);
|
||||
break;
|
||||
case IConfigureOption.TOOL:
|
||||
tools.add(opt);
|
||||
ConfigureTool t = new ConfigureTool(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
t.setValue(defaultValue);
|
||||
configOptions.put(opt.name, t);
|
||||
break;
|
||||
case IConfigureOption.CATEGORY:
|
||||
configOptions.put(opt.name, new ConfigureOptionCategory(opt.name));
|
||||
break;
|
||||
case IConfigureOption.FLAG:
|
||||
FlagConfigureOption f = new FlagConfigureOption(opt.name, opt.transformedName, this);
|
||||
if (defaultValue != null)
|
||||
f.setValue(defaultValue);
|
||||
lastFlag = f;
|
||||
configOptions.put(opt.name, f);
|
||||
break;
|
||||
case IConfigureOption.FLAGVALUE:
|
||||
FlagValueConfigureOption fv
|
||||
= new FlagValueConfigureOption(opt.name, opt.transformedName,
|
||||
this, ConfigureMessages.getParameter(opt.transformedName));
|
||||
if (defaultValue != null)
|
||||
fv.setValue(defaultValue);
|
||||
lastFlag.addChild(opt.name);
|
||||
configOptions.put(opt.name, fv);
|
||||
break;
|
||||
}
|
||||
}
|
||||
toolList = tools.toArray(new Option[tools.size()]);
|
||||
}
|
||||
|
||||
public static Option[] getOptionList() {
|
||||
return configOpts.clone();
|
||||
}
|
||||
|
||||
public static Option[] getChildOptions(String name) {
|
||||
ArrayList<Option> options = new ArrayList<Option>();
|
||||
for (int i = 0; i < configOpts.length; ++i) {
|
||||
Option opt = configOpts[i];
|
||||
if (opt.getName().equals(name)) {
|
||||
if (opt.getType() == IConfigureOption.CATEGORY) {
|
||||
for (int j = i + 1; j < configOpts.length; ++j) {
|
||||
Option o = configOpts[j];
|
||||
int type = o.getType();
|
||||
if (type != IConfigureOption.CATEGORY &&
|
||||
type != IConfigureOption.TOOL)
|
||||
options.add(o);
|
||||
else
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
} else if (opt.getType() == IConfigureOption.TOOL) {
|
||||
for (int j = i + 1; j < configOpts.length; ++j) {
|
||||
Option o = configOpts[j];
|
||||
int type = o.getType();
|
||||
if (type == IConfigureOption.CATEGORY)
|
||||
options.add(o);
|
||||
else if (type == IConfigureOption.TOOL)
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return options.toArray(new Option[options.size()]);
|
||||
}
|
||||
|
||||
public static Option[] getTools() {
|
||||
return toolList.clone();
|
||||
}
|
||||
|
||||
public IConfigureOption getOption(String name) {
|
||||
return configOptions.get(name);
|
||||
}
|
||||
|
||||
public IAConfiguration copy() {
|
||||
return copy(id);
|
||||
}
|
||||
|
||||
public IAConfiguration copy(String newId) {
|
||||
AutotoolsConfiguration cfg = new AutotoolsConfiguration(newId, false);
|
||||
Collection<IConfigureOption> oldValues = configOptions.values();
|
||||
for (Iterator<IConfigureOption> i = oldValues.iterator(); i.hasNext();) {
|
||||
IConfigureOption opt = i.next();
|
||||
cfg.configOptions.put(opt.getName(), opt.copy(cfg));
|
||||
}
|
||||
if (getId().equals(newId))
|
||||
cfg.setDirty(isDirty()); // copying with same id, do not change dirty attribute
|
||||
else
|
||||
cfg.setDirty(true); // we are cloning with a new id, treat it as never built/dirty
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public String getId() {
|
||||
return id;
|
||||
}
|
||||
|
||||
public boolean isDirty() {
|
||||
return isDirty;
|
||||
}
|
||||
|
||||
public void setDirty(boolean value) {
|
||||
isDirty = value;
|
||||
if (isDirty)
|
||||
isParmsDirty = true;
|
||||
}
|
||||
|
||||
public Map<String, IConfigureOption> getOptions() {
|
||||
return configOptions;
|
||||
}
|
||||
|
||||
public String getToolParameters(String name) {
|
||||
StringBuffer buf = new StringBuffer();
|
||||
Option[] options = getChildOptions(name);
|
||||
for (int i = 0; i < options.length; ++i) {
|
||||
IConfigureOption option = getOption(options[i].getName());
|
||||
if (option.getType() == IConfigureOption.CATEGORY) {
|
||||
Option[] childOptions = getChildOptions(option.getName());
|
||||
for (int j = 0; j < childOptions.length; ++j) {
|
||||
IConfigureOption childOption = getOption(childOptions[j].getName());
|
||||
String parameter = childOption.getParameter();
|
||||
if (!parameter.equals(""))
|
||||
buf.append(" " + parameter);
|
||||
}
|
||||
} else {
|
||||
String parameter = option.getParameter();
|
||||
if (!parameter.equals(""))
|
||||
buf.append(" " + parameter);
|
||||
}
|
||||
}
|
||||
return buf.toString();
|
||||
}
|
||||
|
||||
public ArrayList<String> getToolArgs(String name) {
|
||||
if (isParmsDirty) {
|
||||
configParms = new ArrayList<String>();
|
||||
Option[] options = getChildOptions(name);
|
||||
for (int i = 0; i < options.length; ++i) {
|
||||
IConfigureOption option = getOption(options[i].getName());
|
||||
if (option.getType() == IConfigureOption.CATEGORY) {
|
||||
Option[] childOptions = getChildOptions(option.getName());
|
||||
for (int j = 0; j < childOptions.length; ++j) {
|
||||
IConfigureOption childOption = getOption(childOptions[j].getName());
|
||||
ArrayList<String> parameters = childOption.getParameters();
|
||||
configParms.addAll(parameters);
|
||||
}
|
||||
} else {
|
||||
ArrayList<String> parameters = option.getParameters();
|
||||
configParms.addAll(parameters);
|
||||
}
|
||||
}
|
||||
}
|
||||
return configParms;
|
||||
}
|
||||
|
||||
public void setOption(String name, String value) {
|
||||
IConfigureOption option = configOptions.get(name);
|
||||
if (option != null) {
|
||||
if (!option.getValue().equals(value)) {
|
||||
option.setValue(value);
|
||||
setDirty(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void setConfigToolDirectory(String configToolDirectory) {
|
||||
setOption("configdir", configToolDirectory);
|
||||
}
|
||||
|
||||
public String getConfigToolDirectory() {
|
||||
IConfigureOption option = configOptions.get("configdir");
|
||||
return option.getValue();
|
||||
}
|
||||
|
||||
public void setDefaultOptions() {
|
||||
initConfigOptions();
|
||||
}
|
||||
}
|
|
@ -0,0 +1,530 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2010, 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.io.BufferedWriter;
|
||||
import java.io.File;
|
||||
import java.io.FileWriter;
|
||||
import java.io.IOException;
|
||||
import java.io.PrintWriter;
|
||||
import java.util.ArrayList;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.Iterator;
|
||||
import java.util.Map;
|
||||
|
||||
import javax.xml.parsers.DocumentBuilder;
|
||||
import javax.xml.parsers.DocumentBuilderFactory;
|
||||
import javax.xml.parsers.ParserConfigurationException;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.settings.model.ICProjectDescription;
|
||||
import org.eclipse.cdt.core.settings.model.extension.CConfigurationData;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfiguration.Option;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.ITool;
|
||||
import org.eclipse.cdt.managedbuilder.core.IToolChain;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IResource;
|
||||
import org.eclipse.core.resources.IResourceChangeEvent;
|
||||
import org.eclipse.core.resources.IResourceChangeListener;
|
||||
import org.eclipse.core.resources.IResourceDelta;
|
||||
import org.eclipse.core.resources.IWorkspaceRoot;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.w3c.dom.Document;
|
||||
import org.w3c.dom.Element;
|
||||
import org.w3c.dom.NamedNodeMap;
|
||||
import org.w3c.dom.Node;
|
||||
import org.w3c.dom.NodeList;
|
||||
import org.xml.sax.SAXException;
|
||||
|
||||
public class AutotoolsConfigurationManager implements IResourceChangeListener {
|
||||
|
||||
public final static String CFG_FILE_NAME = ".autotools"; //$NON-NLS-1$
|
||||
private final static String CFG_CANT_SAVE = "Configure.Error.NoProjectToSave"; //$NON-NLS-1$
|
||||
|
||||
|
||||
private static AutotoolsConfigurationManager instance;
|
||||
|
||||
private boolean isSyncing;
|
||||
|
||||
private static Map<String, Map<String, IAConfiguration>> configs;
|
||||
private static Map<String, Map<String, IAConfiguration>> tmpConfigs;
|
||||
|
||||
private AutotoolsConfigurationManager() {
|
||||
configs = new HashMap<String, Map<String, IAConfiguration>>();
|
||||
tmpConfigs = new HashMap<String, Map<String, IAConfiguration>>();
|
||||
AutotoolsPlugin.getWorkspace().addResourceChangeListener(this);
|
||||
}
|
||||
|
||||
public static AutotoolsConfigurationManager getInstance() {
|
||||
if (instance == null) {
|
||||
instance = new AutotoolsConfigurationManager();
|
||||
}
|
||||
return instance;
|
||||
}
|
||||
|
||||
public IAConfiguration createDefaultConfiguration(IProject project, String id) {
|
||||
IAConfiguration cfg = new AutotoolsConfiguration(id);
|
||||
return cfg;
|
||||
}
|
||||
|
||||
public IAConfiguration findCfg(IProject p, String id) {
|
||||
Map<String, IAConfiguration> cfgs = getConfigurations(p);
|
||||
return cfgs.get(id);
|
||||
}
|
||||
|
||||
public IAConfiguration getConfiguration(IProject p, String cfgId) {
|
||||
return getConfiguration(p, cfgId, true);
|
||||
}
|
||||
|
||||
public IAConfiguration getConfiguration(IProject p, String cfgId, boolean persist) {
|
||||
IAConfiguration cfg = findCfg(p, cfgId);
|
||||
if (cfg == null) {
|
||||
cfg = createDefaultConfiguration(p, cfgId);
|
||||
if (persist) {
|
||||
addConfiguration(p, cfg);
|
||||
}
|
||||
} else {
|
||||
if (!persist) {
|
||||
cfg = cfg.copy();
|
||||
}
|
||||
}
|
||||
return cfg;
|
||||
}
|
||||
|
||||
|
||||
public boolean isConfigurationAlreadySaved(IProject project, ICConfigurationDescription cfgd) {
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs != null)
|
||||
return cfgs.get(cfgd.getId()) != null;
|
||||
return false;
|
||||
}
|
||||
|
||||
public void addConfiguration(IProject project, IAConfiguration cfg) {
|
||||
String projectName = project.getName();
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs == null) {
|
||||
cfgs = new HashMap<String, IAConfiguration>();
|
||||
configs.put(projectName, cfgs);
|
||||
}
|
||||
cfgs.put(cfg.getId(), cfg);
|
||||
saveConfigs(project);
|
||||
}
|
||||
|
||||
public boolean isSyncing() {
|
||||
return isSyncing;
|
||||
}
|
||||
|
||||
private void setSyncing(boolean value) {
|
||||
isSyncing = value;
|
||||
}
|
||||
|
||||
/**
|
||||
* Synchronize the current set of configurations for the project with the
|
||||
* Autotools saved configuration data. This is required when configuration
|
||||
* management occurs outside of the Autotools Configure Settings page in the
|
||||
* Property menu.
|
||||
*
|
||||
* @param project to synchronize configurations for
|
||||
*
|
||||
*/
|
||||
public void syncConfigurations(IProject project) {
|
||||
setSyncing(true);
|
||||
clearTmpConfigurations(project);
|
||||
ICProjectDescription pd = CoreModel.getDefault().getProjectDescription(project);
|
||||
ICConfigurationDescription[] cfgs = pd.getConfigurations();
|
||||
Map <String, IAConfiguration> newCfgList = new HashMap<String, IAConfiguration>();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
cfgs[i].getConfigurationData();
|
||||
IAConfiguration acfg = getTmpConfiguration(project, cfgs[i]);
|
||||
newCfgList.put(cfgs[i].getId(), acfg);
|
||||
}
|
||||
setSyncing(false);
|
||||
clearTmpConfigurations(project);
|
||||
replaceProjectConfigurations(project, newCfgList);
|
||||
}
|
||||
|
||||
public void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs) {
|
||||
String projectName = project.getName();
|
||||
configs.put(projectName, cfgs);
|
||||
saveConfigs(project);
|
||||
}
|
||||
|
||||
public void replaceProjectConfigurations(IProject project, Map<String, IAConfiguration> cfgs, ICConfigurationDescription[] cfgds) {
|
||||
String projectName = project.getName();
|
||||
configs.put(projectName, cfgs);
|
||||
saveConfigs(project, cfgds);
|
||||
}
|
||||
|
||||
private Map<String, IAConfiguration> getSavedConfigs(IProject project) {
|
||||
String projectName = project.getName();
|
||||
Map<String, IAConfiguration> list = configs.get(projectName);
|
||||
if (list == null) {
|
||||
try {
|
||||
IPath fileLocation = project.getLocation().append(CFG_FILE_NAME);
|
||||
File dirFile = fileLocation.toFile();
|
||||
Map<String, IAConfiguration> cfgList = new HashMap<String, IAConfiguration>();
|
||||
DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
|
||||
DocumentBuilder db = dbf.newDocumentBuilder();
|
||||
if (dirFile.exists()) {
|
||||
Document d = db.parse(dirFile);
|
||||
Element e = d.getDocumentElement();
|
||||
// Get the stored configuration data
|
||||
NodeList cfgs = e.getElementsByTagName("configuration"); // $NON-NLS-1$
|
||||
for (int x = 0; x < cfgs.getLength(); ++x) {
|
||||
Node n = cfgs.item(x);
|
||||
NamedNodeMap attrs = n.getAttributes();
|
||||
// Originally we used the configuration name, but now we use
|
||||
// the ConfigurationDescription id which is unique. Check for
|
||||
// id first, but fall back to name for older .autotools files.
|
||||
Node nameNode = attrs.getNamedItem("name"); // $NON-NLS-1$
|
||||
Node cfgIdNode = attrs.getNamedItem("id"); // $NON-NLS-1$
|
||||
String cfgId = null;
|
||||
if (cfgIdNode != null)
|
||||
cfgId = cfgIdNode.getNodeValue();
|
||||
else if (nameNode != null) {
|
||||
String cfgName = nameNode.getNodeValue();
|
||||
ICConfigurationDescription cfgd =
|
||||
CoreModel.getDefault().getProjectDescription(project).getConfigurationByName(cfgName);
|
||||
if (cfgd != null)
|
||||
cfgId = cfgd.getId();
|
||||
else
|
||||
continue; // have to punt, this doesn't map to real cfg
|
||||
}
|
||||
IAConfiguration cfg = new AutotoolsConfiguration(cfgId);
|
||||
NodeList l = n.getChildNodes();
|
||||
for (int y = 0; y < l.getLength(); ++y) {
|
||||
Node child = l.item(y);
|
||||
if (child.getNodeName().equals("option")) { // $NON-NLS-1$
|
||||
NamedNodeMap optionAttrs = child.getAttributes();
|
||||
Node id = optionAttrs.getNamedItem("id"); // $NON-NLS-1$
|
||||
Node value = optionAttrs.getNamedItem("value"); // $NON-NLS-1$
|
||||
if (id != null && value != null)
|
||||
cfg.setOption(id.getNodeValue(), value.getNodeValue());
|
||||
} else if (child.getNodeName().equals("flag")) { //$NON-NLS-1$
|
||||
// read in flag values
|
||||
NamedNodeMap optionAttrs = child.getAttributes();
|
||||
Node id = optionAttrs.getNamedItem("id"); // $NON-NLS-1$
|
||||
IConfigureOption opt = cfg.getOption(id.getNodeValue());
|
||||
if (opt instanceof FlagConfigureOption) {
|
||||
NodeList l2 = child.getChildNodes();
|
||||
for (int z = 0; z < l2.getLength(); ++z) {
|
||||
Node flagChild = l2.item(z);
|
||||
if (flagChild.getNodeName().equals("flagvalue")) { //$NON-NLS-1$
|
||||
NamedNodeMap optionAttrs2 = flagChild.getAttributes();
|
||||
Node id2 = optionAttrs2.getNamedItem("id"); // $NON-NLS-1$
|
||||
Node value = optionAttrs2.getNamedItem("value"); // $NON-NLS-1$
|
||||
cfg.setOption(id2.getNodeValue(), value.getNodeValue());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
cfg.setDirty(false);
|
||||
cfgList.put(cfg.getId(), cfg);
|
||||
}
|
||||
if (cfgList.size() > 0) {
|
||||
configs.put(projectName, cfgList);
|
||||
list = cfgList;
|
||||
}
|
||||
}
|
||||
} catch (ParserConfigurationException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (SAXException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
} catch (IOException e) {
|
||||
// TODO Auto-generated catch block
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public IAConfiguration getTmpConfiguration(IProject p, ICConfigurationDescription cfgd) {
|
||||
Map <String, IAConfiguration> list = getTmpConfigs(p);
|
||||
IAConfiguration acfg = list.get(cfgd.getId());
|
||||
if (acfg != null) {
|
||||
return acfg;
|
||||
}
|
||||
IAConfiguration oldCfg = getConfiguration(p, cfgd.getId(), false);
|
||||
list.put(cfgd.getId(), oldCfg);
|
||||
return oldCfg;
|
||||
}
|
||||
|
||||
/**
|
||||
* Clone a configuration and put it on the tmp list if it is not already a saved configuration
|
||||
* and not already on the tmp list.
|
||||
*
|
||||
* @param p project
|
||||
* @param oldId the id of the old configuration to clone
|
||||
* @param cfgd the configuration descriptor for the clone
|
||||
* @return true if the configuration is already saved, false otherwise
|
||||
*/
|
||||
public boolean cloneCfg(IProject p, String oldId, ICConfigurationDescription cfgd) {
|
||||
if (isConfigurationAlreadySaved(p, cfgd))
|
||||
return true;
|
||||
Map <String, IAConfiguration> tmpList = getTmpConfigs(p);
|
||||
String newId = cfgd.getId();
|
||||
// Don't bother if the new configuration is already on the tmp list
|
||||
IAConfiguration cfg = tmpList.get(newId);
|
||||
if (cfg != null)
|
||||
return false;
|
||||
// Otherwise, try and find the old id to copy the configuration from
|
||||
// or punt if not found
|
||||
IAConfiguration oldCfg = null;
|
||||
Map <String, IAConfiguration> savedList = getSavedConfigs(p);
|
||||
if (savedList != null)
|
||||
oldCfg = savedList.get(oldId);
|
||||
if (oldCfg != null) {
|
||||
IAConfiguration newCfg = oldCfg.copy(cfgd.getId());
|
||||
tmpList.put(cfgd.getId(), newCfg);
|
||||
// Check to see if the new configuration is already stored as part of the project description.
|
||||
// If yes, it should already be saved. This can occur if the configuration was added as part of
|
||||
// another CDT Property page and the Autotools Property page was never opened.
|
||||
if (CoreModel.getDefault().getProjectDescription(p).getConfigurationById(newId) != null) {
|
||||
addConfiguration(p, newCfg);
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
private Map<String, IAConfiguration> getTmpConfigs(IProject p) {
|
||||
Map <String, IAConfiguration> tmpList = tmpConfigs.get(p.getName());
|
||||
if (tmpList == null) {
|
||||
tmpList = new HashMap<String, IAConfiguration>();
|
||||
tmpConfigs.put(p.getName(), tmpList);
|
||||
}
|
||||
return tmpList;
|
||||
}
|
||||
|
||||
public void clearTmpConfigurations(IProject p) {
|
||||
tmpConfigs.remove(p.getName());
|
||||
}
|
||||
|
||||
public void saveConfigs(IProject project) {
|
||||
ICConfigurationDescription[] cfgds = CoreModel.getDefault().getProjectDescription(project).getConfigurations();
|
||||
saveConfigs(project, cfgds);
|
||||
}
|
||||
|
||||
private void syncNameField(ICConfigurationDescription cfgd) {
|
||||
IConfiguration icfg = ManagedBuildManager.getConfigurationForDescription(cfgd);
|
||||
String id = cfgd.getId();
|
||||
if (icfg != null) {
|
||||
IToolChain toolchain = icfg.getToolChain();
|
||||
ITool[] tools = toolchain.getTools();
|
||||
for (int j = 0; j < tools.length; ++j) {
|
||||
ITool tool = tools[j];
|
||||
if (tool.getName().equals("configure")) { //$NON-NLS-1$
|
||||
IOption option =
|
||||
tool.getOptionBySuperClassId("org.eclipse.linuxtools.cdt.autotools.core.option.configure.name"); // $NON-NLS-1$
|
||||
IHoldsOptions h = (IHoldsOptions)tool;
|
||||
try {
|
||||
IOption optionToSet = h.getOptionToSet(option, false);
|
||||
optionToSet.setValue(id);
|
||||
} catch (BuildException e) {
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private String xmlEscape(String value) {
|
||||
value = value.replaceAll("\\&", "&"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\\"", """); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\\'", "'"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\<", "<"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
value = value.replaceAll("\\>", ">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
return value;
|
||||
}
|
||||
|
||||
private void saveConfigs(IProject project, ICConfigurationDescription[] cfgds) {
|
||||
try {
|
||||
String projectName = project.getName();
|
||||
IPath output = project.getLocation().append(CFG_FILE_NAME);
|
||||
File f = output.toFile();
|
||||
if (!f.exists())
|
||||
f.createNewFile();
|
||||
if (f.exists()) {
|
||||
PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)));
|
||||
Map<String, IAConfiguration> cfgs = configs.get(projectName);
|
||||
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
|
||||
p.println("<configurations>"); // $NON-NLS-1$
|
||||
Option[] optionList = AutotoolsConfiguration.getOptionList();
|
||||
// Before saving, force any cloning to occur via the option value handler.
|
||||
setSyncing(true);
|
||||
for (int i = 0; i < cfgds.length; ++i) {
|
||||
@SuppressWarnings("unused")
|
||||
CConfigurationData data = cfgds[i].getConfigurationData();
|
||||
}
|
||||
setSyncing(false);
|
||||
for (int i = 0; i < cfgds.length; ++i) {
|
||||
ICConfigurationDescription cfgd = cfgds[i];
|
||||
String id = cfgd.getId();
|
||||
IAConfiguration cfg = cfgs.get(id);
|
||||
if (cfg == null) {
|
||||
cfg = createDefaultConfiguration(project, id);
|
||||
}
|
||||
p.println("<configuration id=\"" + cfg.getId() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (opt.isFlag()) {
|
||||
p.println("<flag id=\"" + option.getName() + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
FlagConfigureOption fco = (FlagConfigureOption)opt;
|
||||
ArrayList<String> children = fco.getChildren();
|
||||
for (int k = 0; k < children.size(); ++k) {
|
||||
String childName = children.get(k);
|
||||
IConfigureOption childopt = cfg.getOption(childName);
|
||||
p.println("<flagvalue id=\"" + childopt.getName() + "\" value=\"" + xmlEscape(childopt.getValue()) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
|
||||
}
|
||||
p.println("</flag>"); //$NON-NLS-1$
|
||||
}
|
||||
else if (!opt.isCategory() && !opt.isFlagValue())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + xmlEscape(opt.getValue()) + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
// Sync name field as this configuration is now officially saved
|
||||
syncNameField(cfgd);
|
||||
}
|
||||
p.println("</configurations>");
|
||||
p.close();
|
||||
}
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
// Perform apply of configuration changes. This rewrites out the current known list of configurations
|
||||
// with any changes currently that have been made to them. If a configuration has been renamed, but this
|
||||
// has not yet been confirmed by the end-user, then only the changes to the configuration are made. The
|
||||
// name currently remains the same in the output file.
|
||||
public void applyConfigs(String projectName, ICConfigurationDescription[] cfgds) {
|
||||
try {
|
||||
IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
|
||||
IResource res = (IProject)root.findMember(projectName, false);
|
||||
if (res == null || res.getType() != IResource.PROJECT) {
|
||||
AutotoolsPlugin.logErrorMessage(ConfigureMessages.getFormattedString(CFG_CANT_SAVE,
|
||||
new String[]{projectName}));
|
||||
return;
|
||||
}
|
||||
IProject project = (IProject)res;
|
||||
IPath output = project.getLocation().append(CFG_FILE_NAME);
|
||||
File f = output.toFile();
|
||||
if (!f.exists())
|
||||
f.createNewFile();
|
||||
if (f.exists()) {
|
||||
PrintWriter p = new PrintWriter(new BufferedWriter(new FileWriter(f)));
|
||||
try {
|
||||
Map<String, IAConfiguration> cfgs = getSavedConfigs(project);
|
||||
if (cfgs == null)
|
||||
return;
|
||||
p.println("<?xml version=\"1.0\" encoding=\"UTF-8\"?>"); //$NON-NLS-1$
|
||||
p.println("<configurations>"); // $NON-NLS-1$
|
||||
Option[] optionList = AutotoolsConfiguration.getOptionList();
|
||||
HashSet<String> savedIds = new HashSet<String>();
|
||||
setSyncing(true);
|
||||
for (int x = 0; x < cfgds.length; ++x) {
|
||||
ICConfigurationDescription cfgd = cfgds[x];
|
||||
@SuppressWarnings("unused")
|
||||
CConfigurationData data = cfgd.getConfigurationData();
|
||||
String id = cfgd.getId();
|
||||
savedIds.add(id);
|
||||
IAConfiguration cfg = getTmpConfiguration(project, cfgd);
|
||||
cfgs.put(id, cfg); // add to list in case we have a new configuration not yet added to Project Description
|
||||
p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (!opt.isCategory())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
syncNameField(cfgd);
|
||||
}
|
||||
setSyncing(false);
|
||||
|
||||
// Put all the remaining configurations already saved back into the file.
|
||||
// These represent deleted configurations, but confirmation has not occurred.
|
||||
for (Iterator<String> i = cfgs.keySet().iterator(); i.hasNext(); ) {
|
||||
String id = i.next();
|
||||
// A remaining id won't appear in our savedIds list.
|
||||
if (!savedIds.contains(id)) {
|
||||
IAConfiguration cfg = cfgs.get(id);
|
||||
p.println("<configuration id=\"" + id + "\">"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
for (int j = 0; j < optionList.length; ++j) {
|
||||
Option option = optionList[j];
|
||||
IConfigureOption opt = cfg.getOption(option.getName());
|
||||
if (!opt.isCategory())
|
||||
p.println("<option id=\"" + option.getName() + "\" value=\"" + opt.getValue() + "\"/>"); //$NON-NLS-1$ //$NON-NLS-2$ // $NON-NLS-3$
|
||||
}
|
||||
p.println("</configuration>"); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
p.println("</configurations>");
|
||||
} finally {
|
||||
p.close();
|
||||
}
|
||||
}
|
||||
} catch (IOException e) {
|
||||
AutotoolsPlugin.log(e);
|
||||
}
|
||||
}
|
||||
|
||||
public Map<String, IAConfiguration> getConfigurations(IProject project) {
|
||||
Map<String, IAConfiguration> list = getSavedConfigs(project);
|
||||
if (list == null) {
|
||||
list = new HashMap<String, IAConfiguration>();
|
||||
configs.put(project.getName(), list);
|
||||
}
|
||||
return list;
|
||||
}
|
||||
|
||||
public void resourceChanged(IResourceChangeEvent event) {
|
||||
IResource res = event.getResource();
|
||||
if (!(res instanceof IProject))
|
||||
return;
|
||||
String name = res.getName();
|
||||
IResourceDelta delta = event.getDelta();
|
||||
if (delta == null)
|
||||
return;
|
||||
int kind = delta.getKind();
|
||||
if (configs.containsKey(name)) {
|
||||
if (kind == IResourceDelta.REMOVED) {
|
||||
configs.remove(name);
|
||||
tmpConfigs.remove(name);
|
||||
} else if (kind == IResourceDelta.CHANGED) {
|
||||
int flags = delta.getFlags();
|
||||
if ((flags & IResourceDelta.MOVED_TO) != 0) {
|
||||
IPath path = delta.getMovedToPath();
|
||||
Map<String, IAConfiguration> cfgs = configs.get(name);
|
||||
String newName = path.lastSegment();
|
||||
configs.remove(name);
|
||||
configs.put(newName, cfgs);
|
||||
Map<String, IAConfiguration> tmpcfgs = tmpConfigs.get(name);
|
||||
tmpConfigs.remove(name);
|
||||
tmpConfigs.put(newName, tmpcfgs);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,123 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007 Red Hat Inc..
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.internal.autotools.core.AutotoolsPropertyConstants;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuildObject;
|
||||
import org.eclipse.cdt.managedbuilder.core.IBuilder;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IHoldsOptions;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOptionApplicability;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedOptionValueHandler;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
|
||||
public class AutotoolsOptionValueHandler extends ManagedOptionValueHandler
|
||||
implements IOptionApplicability {
|
||||
/* (non-Javadoc)
|
||||
* @see org.eclipse.cdt.managedbuilder.core.IManagedOptionValueHandler#handleValue(IConfiguration,IToolChain,IOption,String,int)
|
||||
*/
|
||||
|
||||
public final static String DEFAULT_BUILD_DIR = "build"; //$NON-NLS-1$
|
||||
public final static String CONFIGURE_TOOL_ID = "org.eclipse.linuxtools.cdt.autotools.core.gnu.toolchain.tool.configure"; //$NON-NLS-1$
|
||||
public final static String BUILD_DIR_OPTION_ID = "org.eclipse.linuxtools.cdt.autotools.core.option.configure.builddir"; //$NON-NLS-1$
|
||||
public final static String BUILD_DIR_APPLY = "BuildDir.apply"; //$NON-NLS-1$
|
||||
public final static String BUILD_DIR_DEFAULT_QUESTION = "BuildDir.default"; //$NON-NLS-1$
|
||||
public final static String BUILD_DIR_YES = "BuildDir.yes"; //$NON-NLS-1$
|
||||
public final static String BUILD_DIR_NO = "BuildDir.no"; //$NON-NLS-1$
|
||||
|
||||
//FIXME: Use holder to set option value, not the "option" parameter
|
||||
public boolean handleValue(IBuildObject buildObject,
|
||||
IHoldsOptions holder,
|
||||
IOption option,
|
||||
String extraArgument, int event)
|
||||
{
|
||||
// Get the current value of the build dir option.
|
||||
String value = (String)option.getValue();
|
||||
|
||||
if (buildObject instanceof IConfiguration &&
|
||||
(event == IManagedOptionValueHandler.EVENT_OPEN)) {
|
||||
// SortedSet<Integer> nums = new TreeSet<Integer>();
|
||||
IConfiguration configuration = (IConfiguration)buildObject;
|
||||
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(configuration);
|
||||
if (option.getName().equals("Name") && cfgd != null) {
|
||||
String cfgId = cfgd.getId();
|
||||
if (!value.equals("") && !value.equals(cfgId)) {
|
||||
// we have a cloned configuration and we know that the
|
||||
// clonee's name is the value of the option
|
||||
IProject project = (IProject)configuration.getManagedProject().getOwner();
|
||||
String autoName = null;
|
||||
String autoNameTemplate = null;
|
||||
// Check if we are supposed to automatically name the build directory for any
|
||||
// new configuration. If yes, generate a build directory under the project using
|
||||
// the configuration name which must be unique.
|
||||
try {
|
||||
autoName = project.getPersistentProperty(AutotoolsPropertyConstants.AUTO_BUILD_NAME);
|
||||
} catch (CoreException e) {
|
||||
// ignore
|
||||
}
|
||||
if (autoName == null || autoName.equals(AutotoolsPropertyConstants.TRUE)) {
|
||||
autoNameTemplate = "${workspace_loc:/" + project.getName() + // $NON-NLS-1$
|
||||
"}/build-" + fixName(configuration.getName()); // $NON-NLS-1$
|
||||
IBuilder cfgBuilder = configuration.getEditableBuilder();
|
||||
cfgBuilder.setBuildPath(autoNameTemplate);
|
||||
}
|
||||
// Clone old configuration to tmp configuration list
|
||||
boolean isSaved = AutotoolsConfigurationManager.getInstance().cloneCfg(project, value, cfgd);
|
||||
// Check to see if we should patch up the name option. If we aren't synchronizing
|
||||
// configurations or the configuration isn't already saved, we leave the name field alone
|
||||
// so we will trigger this again when the clone will get used.
|
||||
if (!isSaved && !AutotoolsConfigurationManager.getInstance().isSyncing()) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
try {
|
||||
IOption optionToSet = holder.getOptionToSet(option, false);
|
||||
optionToSet.setValue(cfgId);
|
||||
} catch (BuildException e) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// The event was not handled, thus return false
|
||||
return true;
|
||||
}
|
||||
|
||||
private String fixName(String cfgName) {
|
||||
// Replace whitespace with underscores.
|
||||
return cfgName.replaceAll("\\s", "_");
|
||||
}
|
||||
|
||||
// IOptionApplicability methods
|
||||
|
||||
public boolean isOptionEnabled(IBuildObject configuration,
|
||||
IHoldsOptions holder, IOption option) {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isOptionUsedInCommandLine(IBuildObject configuration,
|
||||
IHoldsOptions holder, IOption option) {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isOptionVisible(IBuildObject configuration,
|
||||
IHoldsOptions holder, IOption option) {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public class BinConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private boolean value;
|
||||
|
||||
public BinConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
}
|
||||
|
||||
public BinConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
}
|
||||
|
||||
private BinConfigureOption(String name, AutotoolsConfiguration cfg, boolean value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return getParameterName();
|
||||
else
|
||||
return ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return Boolean.toString(value);
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
boolean oldValue = this.value;
|
||||
if (value.equals("true")) // $NON-NLS-1$
|
||||
this.value = true;
|
||||
else
|
||||
this.value = false;
|
||||
if (this.value != oldValue)
|
||||
cfg.setDirty(true);
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new BinConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return BIN;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2006, 2007, 2009, 2011 Red Hat Inc..
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.text.MessageFormat;
|
||||
import java.util.MissingResourceException;
|
||||
import java.util.ResourceBundle;
|
||||
|
||||
public class ConfigureMessages {
|
||||
private static final String BUNDLE_NAME = ConfigureMessages.class.getName();
|
||||
|
||||
private static final ResourceBundle RESOURCE_BUNDLE = ResourceBundle
|
||||
.getBundle(BUNDLE_NAME);
|
||||
|
||||
private ConfigureMessages() {
|
||||
}
|
||||
|
||||
public static String getConfigureDescription(String name) {
|
||||
return getString("Option.configure." + name); //$NON-NLS-11$
|
||||
}
|
||||
|
||||
public static String getConfigureTip(String name) {
|
||||
return getString("Option.configure." + name + ".tip"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
|
||||
public static String getParameter(String name) {
|
||||
return getString("Option.configure." + name + ".parm"); //$NON-NLS-1$ //$NON-NLS-2$
|
||||
}
|
||||
/**
|
||||
* Returns the string from the resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getString(String key) {
|
||||
try {
|
||||
return RESOURCE_BUNDLE.getString(key);
|
||||
} catch (MissingResourceException e) {
|
||||
return '!' + key + '!';
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns the formatted string from the resource bundle,
|
||||
* or 'key' if not found.
|
||||
*
|
||||
* @param key the message key
|
||||
* @param args an array of substituition strings
|
||||
* @return the resource bundle message
|
||||
*/
|
||||
public static String getFormattedString(String key, String[] args) {
|
||||
return MessageFormat.format(getString(key), (Object[])args);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,101 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009, 2011 Red Hat, Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Incorporated - initial API and implementation
|
||||
*******************************************************************************/
|
||||
Option.configure.configure=configure
|
||||
Option.configure.general=General
|
||||
Option.configure.builddir=Build directory
|
||||
Option.configure.builddir.tip=Subdirectory off of project where build will occur
|
||||
Option.configure.configdir=Configure tool directory
|
||||
Option.configure.configdir.tip=Subdirectory off of project where configure script resides
|
||||
Option.configure.cache_file=Name of cache file (--cache-file)
|
||||
Option.configure.cache_file.tip=Specify the name of the configuration cache file [config.cache]
|
||||
Option.configure.no_create=Turn off file creation <not advised> (--no-create)
|
||||
Option.configure.no_create.tip=This tells configuration not to generate the output files as part of configuration
|
||||
Option.configure.quiet=Turn off checking messages (--quiet)
|
||||
Option.configure.quiet.tip=This turns off "checking ..." style messages from the configuration console output
|
||||
Option.configure.help=Display help contents (--help)
|
||||
Option.configure.help.tip=Ask configuration file to display its help documentation
|
||||
Option.configure.version=Display version of autotools used (--version)
|
||||
Option.configure.version.tip=This outputs the version of the Autotools used to create the configuration files
|
||||
|
||||
Option.configure.platform=Platform specifiers
|
||||
Option.configure.host=Host platform (--host)
|
||||
Option.configure.host.tip=Platform that project will run on
|
||||
Option.configure.target=Target platform (--target)
|
||||
Option.configure.target.tip=Platform that project will target output for
|
||||
Option.configure.build=Build platform (--build)
|
||||
Option.configure.build.tip=Platform where project is being built
|
||||
|
||||
Option.configure.directories=Directory specifiers
|
||||
Option.configure.prefix=Arch-independent install directory (--prefix)
|
||||
Option.configure.prefix.tip=Place where architecture-independent files are installed [/usr/local]
|
||||
Option.configure.exec_prefix=Arch-dependent install directory (--exec-prefix)
|
||||
Option.configure.exec_prefix.tip=Place where architecture-dependent files are installed [PREFIX]
|
||||
Option.configure.libdir=Object code library directory (--libdir)
|
||||
Option.configure.libdir.tip=Place where object code libraries are installed [EPREFIX/lib]
|
||||
Option.configure.bindir=User executable directory (--bindir)
|
||||
Option.configure.bindir.tip=Place where binary executables are installed [EPREFIX/bin]
|
||||
Option.configure.sbindir=System admin executable directory (--sbindir)
|
||||
Option.configure.sbindir.tip=Place where system admin executables are installed [EPREFIX/sbin]
|
||||
Option.configure.includedir=C Header file directory (--includdir)
|
||||
Option.configure.includedir.tip=Place where header files will be installed [PREFIX/include]
|
||||
Option.configure.datadir=Read-only arch-independent data (--datadir)
|
||||
Option.configure.datadir.tip=Place where read-only architecture-independent data is installed [PREFIX/share]
|
||||
Option.configure.sysconfdir=Read-only single-machine data directory (--sysconfdir)
|
||||
Option.configure.sysconfdir.tip=Place where read-only single-machine data is stored [PREFIX/etc]
|
||||
Option.configure.infodir=Info file directory (--infodir)
|
||||
Option.configure.infodir.tip=Place where info files are installed [PREFIX/info]
|
||||
Option.configure.mandir=Man file documentation directory (--mandir)
|
||||
Option.configure.mandir.tip=Place where man file documentation is installed [PREFIX/man]
|
||||
Option.configure.srcdir=Sources directory (--srcdir)
|
||||
Option.configure.srcdir.tip=Place where configure can find sources [configure directory or ..]
|
||||
Option.configure.localstatedir=Single-machine data directory (--localstatedir)
|
||||
Option.configure.localstatedir.tip=Place where modifiable single-machine data is installed [PREFIX/var]
|
||||
Option.configure.sharedstatedir=Arch-independent data directory (--sharedstatedir)
|
||||
Option.configure.sharedstatedir.tip=Place where modifiable architecture-independent data is installed [PREFIX/com}
|
||||
Option.configure.libexecdir=Program executable directory (--libexecdir)
|
||||
Option.configure.libexecdir.tip=Place where program executables will be installed [EPREFIX/libexec]
|
||||
Option.configure.oldincludedir=Non-gcc C header file directory (--oldincludedir)
|
||||
Option.configure.oldincludedir.tip=Place where non-gcc C header files are installed [/usr/include]
|
||||
|
||||
Option.configure.filenames=File-name transformations
|
||||
Option.configure.program_prefix=Program prefix (--program-prefix)
|
||||
Option.configure.program_prefix.tip=Prepend PREFIX to the beginning of installed program names
|
||||
Option.configure.program_suffix=Program suffix (--program-suffix)
|
||||
Option.configure.program_suffix.tip=Append SUFFIX to the end of installed program names
|
||||
Option.configure.program_transform_name=Program name transform (--program-transform-name)
|
||||
Option.configure.program_transform_name.tip=A sed string used to transform installed program names
|
||||
|
||||
Option.configure.features=Advanced
|
||||
Option.configure.enable_maintainer_mode=Enable maintainer mode (--enable-maintainer-mode)
|
||||
Option.configure.enable_maintainer_mode.tip=Specify this to have Makefiles generated with checks for Autotool configuration file changes
|
||||
Option.configure.user=Additional command-line options
|
||||
Option.configure.user.tip=Specify one or more configuration options (e.g. --enable-FEATURE, --disable-FEATURE, or --with-PACKAGE)
|
||||
|
||||
Option.configure.cflags_debug=Debug (-g)
|
||||
Option.configure.cflags_debug.tip=Specify this to generate debugging info when building
|
||||
Option.configure.cflags_debug.parm=-g
|
||||
Option.configure.cflags_gprof=Gprof support (-pg)
|
||||
Option.configure.cflags_gprof.tip=Specify this to compile your executable so it will generate gprof data when run
|
||||
Option.configure.cflags_gprof.parm=-pg
|
||||
Option.configure.cflags_gcov=Gcov support (-fprofile-arcs -ftest-coverage)
|
||||
Option.configure.cflags_gcov.tip=Specify this to compile your executable so it will generate gcov coverage data when run
|
||||
Option.configure.cflags_gcov.parm=-fprofile-arcs -ftest-coverage
|
||||
|
||||
Option.configure.autogen=autogen
|
||||
Option.configure.options=Options
|
||||
Option.configure.autogenOpts=Additional command-line options
|
||||
Option.configure.autogenOpts.tip=Specify any additional options required
|
||||
|
||||
Tool.command=Command
|
||||
Tool.allopts=All Options
|
||||
|
||||
Configure.Error.AlreadyExists="A configuration named {0} already exists"
|
||||
Configure.Error.NoProjectToSave="Project: {0} does not exist at time of saving configuration"
|
|
@ -0,0 +1,78 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConfigureOptionCategory implements IConfigureOption {
|
||||
|
||||
private String name;
|
||||
|
||||
public ConfigureOptionCategory(String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new ConfigureOptionCategory(name);
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return ConfigureMessages.getConfigureDescription(name);
|
||||
}
|
||||
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
|
||||
public String getToolTip() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return "null";
|
||||
}
|
||||
|
||||
public boolean isCategory() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
// Do nothing..nothing to set
|
||||
}
|
||||
|
||||
public boolean isMultiArg() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFlag() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public boolean isFlagValue() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return CATEGORY;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,64 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class ConfigureTool extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public ConfigureTool(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
public ConfigureTool(String name, String transformedName, AutotoolsConfiguration cfg) {
|
||||
super(name, transformedName, cfg);
|
||||
this.value = name;
|
||||
}
|
||||
|
||||
private ConfigureTool(String name, AutotoolsConfiguration cfg, String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new ConfigureTool(name, config, value);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return TOOL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,106 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FlagConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
private ArrayList<String> children =
|
||||
new ArrayList<String>();
|
||||
|
||||
public FlagConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public FlagConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
@SuppressWarnings("unchecked")
|
||||
private FlagConfigureOption(String name, AutotoolsConfiguration cfg,
|
||||
String value, ArrayList<String> children) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
this.children = (ArrayList<String>)children.clone();
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
StringBuffer parm = new StringBuffer(getName()+"=\""); //$NON-NLS-1$
|
||||
boolean haveParm = false;
|
||||
if (isParmSet()) {
|
||||
String separator = "";
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
String fvname = children.get(i);
|
||||
IConfigureOption o = cfg.getOption(fvname);
|
||||
if (o.isParmSet()) {
|
||||
if (o instanceof IFlagConfigureValueOption) {
|
||||
parm.append(separator + ((IFlagConfigureValueOption)o).getFlags()); //$NON-NLS-1$
|
||||
separator = " ";
|
||||
haveParm = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
if (haveParm) {
|
||||
parm.append("\""); //$NON-NLS-1$
|
||||
return parm.toString();
|
||||
}
|
||||
}
|
||||
return ""; //$NON-NLS-1$
|
||||
}
|
||||
|
||||
public String getParameterName() {
|
||||
return getName();
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
for (int i = 0; i < children.size(); ++i) {
|
||||
String s = children.get(i);
|
||||
IConfigureOption o = cfg.getOption(s);
|
||||
if (o.isParmSet())
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public void setValue(String value) {
|
||||
// can't occur
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
FlagConfigureOption f = new FlagConfigureOption(name, config, value, children);
|
||||
return f;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return FLAG;
|
||||
}
|
||||
|
||||
public boolean isFlag() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public void addChild(String name) {
|
||||
children.add(name);
|
||||
}
|
||||
|
||||
public ArrayList<String> getChildren() {
|
||||
return children;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,56 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public class FlagValueConfigureOption extends BinConfigureOption implements IFlagConfigureValueOption {
|
||||
|
||||
private String flags;
|
||||
|
||||
public FlagValueConfigureOption(String name, String msgName, AutotoolsConfiguration cfg,
|
||||
String flags) {
|
||||
super(name, msgName, cfg);
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
private FlagValueConfigureOption(String name, AutotoolsConfiguration cfg, String value,
|
||||
String flags) {
|
||||
super(name, cfg);
|
||||
this.setValue(value);
|
||||
this.flags = flags;
|
||||
}
|
||||
|
||||
public ArrayList<String> getParameters() {
|
||||
return new ArrayList<String>();
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration cfg) {
|
||||
return new FlagValueConfigureOption(name, cfg, getValue(), flags);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return FLAGVALUE;
|
||||
}
|
||||
|
||||
public String getFlags() {
|
||||
return flags;
|
||||
}
|
||||
|
||||
public boolean isFlagValue() {
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,30 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Map;
|
||||
|
||||
public interface IAConfiguration {
|
||||
public IConfigureOption getOption(String name);
|
||||
public String getId();
|
||||
public boolean isDirty();
|
||||
public void setDirty(boolean value);
|
||||
public Map<String, IConfigureOption> getOptions();
|
||||
public String getToolParameters(String name);
|
||||
public ArrayList<String> getToolArgs(String name);
|
||||
public void setOption(String name, String value);
|
||||
public void setConfigToolDirectory(String configToolDirectory);
|
||||
public String getConfigToolDirectory();
|
||||
public IAConfiguration copy();
|
||||
public IAConfiguration copy(String id);
|
||||
public void setDefaultOptions();
|
||||
}
|
|
@ -0,0 +1,39 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
public interface IConfigureOption {
|
||||
|
||||
public final static int CATEGORY = 0;
|
||||
public final static int BIN = 1;
|
||||
public final static int STRING = 2;
|
||||
public final static int INTERNAL = 3;
|
||||
public final static int MULTIARG = 4;
|
||||
public final static int TOOL = 5;
|
||||
public final static int FLAG = 6;
|
||||
public final static int FLAGVALUE = 7;
|
||||
public String getName();
|
||||
public String getParameter();
|
||||
public ArrayList<String> getParameters();
|
||||
public boolean isParmSet();
|
||||
public String getDescription();
|
||||
public String getToolTip();
|
||||
public void setValue(String value);
|
||||
public IConfigureOption copy(AutotoolsConfiguration cfg);
|
||||
public String getValue();
|
||||
public boolean isCategory();
|
||||
public boolean isMultiArg();
|
||||
public boolean isFlag();
|
||||
public boolean isFlagValue();
|
||||
public int getType();
|
||||
}
|
|
@ -0,0 +1,17 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2011 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public interface IFlagConfigureValueOption {
|
||||
|
||||
String getFlags();
|
||||
|
||||
}
|
|
@ -0,0 +1,59 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
public class InternalConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public InternalConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public InternalConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
private InternalConfigureOption(String name, AutotoolsConfiguration cfg,
|
||||
String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return false;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return "";
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new InternalConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return INTERNAL;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,119 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
|
||||
public class MultiArgConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
private ArrayList<String> userArgs;
|
||||
private boolean isDirty;
|
||||
|
||||
public MultiArgConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public MultiArgConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
private MultiArgConfigureOption(String name, AutotoolsConfiguration cfg,
|
||||
String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
isDirty = true;
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return value.length() > 0;
|
||||
}
|
||||
|
||||
public boolean isMultiArg() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public ArrayList<String> getParameters() {
|
||||
// May be multiple user-specified options in which case we
|
||||
// need to split them up into individual options
|
||||
if (!isDirty && userArgs != null)
|
||||
return userArgs;
|
||||
// Otherwise, we need to calculate userArgs
|
||||
userArgs = new ArrayList<String>();
|
||||
isDirty = false;
|
||||
int lastArgIndex = -1;
|
||||
int i = 0;
|
||||
while (i < value.length()) {
|
||||
char ch = value.charAt(i);
|
||||
// Skip white-space
|
||||
while (Character.isWhitespace(ch)) {
|
||||
++i;
|
||||
if (i < value.length())
|
||||
ch = value.charAt(i);
|
||||
else // Otherwise we are done
|
||||
return userArgs;
|
||||
}
|
||||
|
||||
// Simplistic parser. We break up into strings delimited
|
||||
// by blanks. If quotes are used, we ignore blanks within.
|
||||
// If a backslash is used, we ignore the next character and
|
||||
// pass it through.
|
||||
lastArgIndex = i;
|
||||
boolean inString = false;
|
||||
while (i < value.length()) {
|
||||
ch = value.charAt(i);
|
||||
if (ch == '\\') // escape character
|
||||
++i; // skip over the next character
|
||||
else if (ch == '\"') { // double quotes
|
||||
inString = !inString;
|
||||
} else if (Character.isWhitespace(ch)) {
|
||||
if (!inString) {
|
||||
userArgs.add(value.substring(lastArgIndex, i));
|
||||
break;
|
||||
}
|
||||
}
|
||||
++i;
|
||||
}
|
||||
// Look for the case where we ran out of chars for the last
|
||||
// token.
|
||||
if (i >= value.length())
|
||||
userArgs.add(value.substring(lastArgIndex));
|
||||
++i;
|
||||
}
|
||||
return userArgs;
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new MultiArgConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return MULTIARG;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,62 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2009 Red Hat Inc.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Red Hat Inc. - initial API and implementation
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.configure;
|
||||
|
||||
|
||||
public class StringConfigureOption extends AbstractConfigurationOption {
|
||||
|
||||
private String value;
|
||||
|
||||
public StringConfigureOption(String name, AutotoolsConfiguration cfg) {
|
||||
super(name, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
public StringConfigureOption(String name, String msgName, AutotoolsConfiguration cfg) {
|
||||
super(name, msgName, cfg);
|
||||
this.value = ""; // $NON-NLS-1$
|
||||
}
|
||||
|
||||
private StringConfigureOption(String name, AutotoolsConfiguration cfg,
|
||||
String value) {
|
||||
super(name, cfg);
|
||||
this.value = value;
|
||||
}
|
||||
|
||||
public String getValue() {
|
||||
return value;
|
||||
}
|
||||
|
||||
public void setValue(String newValue) {
|
||||
if (!newValue.equals(value)) {
|
||||
cfg.setDirty(true);
|
||||
value = newValue;
|
||||
}
|
||||
}
|
||||
|
||||
public boolean isParmSet() {
|
||||
return value.length() > 0;
|
||||
}
|
||||
|
||||
public String getParameter() {
|
||||
if (isParmSet())
|
||||
return getParameterName() + "=" + getValue(); // $NON-NLS-1$
|
||||
return "";
|
||||
}
|
||||
|
||||
public IConfigureOption copy(AutotoolsConfiguration config) {
|
||||
return new StringConfigureOption(name, config, value);
|
||||
}
|
||||
|
||||
public int getType() {
|
||||
return STRING;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,143 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2009 Symbian Software Limited and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Bala Torati (Symbian) - Initial API and implementation
|
||||
* Red Hat Inc - Modification to use with Autotools project
|
||||
*******************************************************************************/
|
||||
package org.eclipse.cdt.internal.autotools.core.wizards;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsNewProjectNature;
|
||||
import org.eclipse.cdt.core.CCorePlugin;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.templateengine.TemplateCore;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
|
||||
import org.eclipse.cdt.core.templateengine.process.processes.Messages;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.cdt.managedbuilder.core.IConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.IManagedBuildInfo;
|
||||
import org.eclipse.cdt.managedbuilder.core.IOption;
|
||||
import org.eclipse.cdt.managedbuilder.core.ManagedBuildManager;
|
||||
import org.eclipse.cdt.managedbuilder.templateengine.ProjectCreatedActions;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IPath;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
import org.eclipse.core.runtime.Path;
|
||||
|
||||
|
||||
/**
|
||||
* Creates a new Project in the workspace.
|
||||
*/
|
||||
public class NewAutotoolsProject extends ProcessRunner {
|
||||
protected boolean savedAutoBuildingValue;
|
||||
protected ProjectCreatedActions pca;
|
||||
protected IManagedBuildInfo info;
|
||||
|
||||
public NewAutotoolsProject() {
|
||||
pca = new ProjectCreatedActions();
|
||||
}
|
||||
|
||||
public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
|
||||
String projectName = args[0].getSimpleValue();
|
||||
String location = args[1].getSimpleValue();
|
||||
String artifactExtension = args[2].getSimpleValue();
|
||||
String isCProjectValue = args[3].getSimpleValue();
|
||||
boolean isCProject = Boolean.valueOf(isCProjectValue).booleanValue();
|
||||
|
||||
IProject project = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
||||
|
||||
try {
|
||||
if (!project.exists()) {
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
turnOffAutoBuild(workspace);
|
||||
|
||||
IPath locationPath = null;
|
||||
if (location != null && !location.trim().equals("")) { //$NON-NLS-1$
|
||||
locationPath = Path.fromPortableString(location);
|
||||
}
|
||||
|
||||
List<?> configs = template.getTemplateInfo().getConfigurations();
|
||||
if (configs == null || configs.size() == 0) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.4") + projectName); //$NON-NLS-1$
|
||||
}
|
||||
|
||||
pca.setProject(project);
|
||||
pca.setProjectLocation(locationPath);
|
||||
pca.setConfigs((IConfiguration[]) configs.toArray(new IConfiguration[configs.size()]));
|
||||
pca.setArtifactExtension(artifactExtension);
|
||||
info = pca.createProject(monitor, CCorePlugin.DEFAULT_INDEXER, isCProject);
|
||||
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
|
||||
|
||||
// For each IConfiguration, create a corresponding Autotools Configuration
|
||||
IConfiguration[] cfgs = pca.getConfigs();
|
||||
for (int i = 0; i < cfgs.length; ++i) {
|
||||
IConfiguration cfg = cfgs[i];
|
||||
ICConfigurationDescription cfgd = ManagedBuildManager.getDescriptionForConfiguration(cfg);
|
||||
String id = cfgd.getId();
|
||||
AutotoolsConfigurationManager.getInstance().getConfiguration(project, id, true);
|
||||
}
|
||||
AutotoolsConfigurationManager.getInstance().saveConfigs(project);
|
||||
|
||||
info.setValid(true);
|
||||
ManagedBuildManager.saveBuildInfo(project, true);
|
||||
|
||||
restoreAutoBuild(workspace);
|
||||
|
||||
}
|
||||
else {
|
||||
AutotoolsNewProjectNature.addAutotoolsNature(project, monitor);
|
||||
// throw new ProcessFailureException(Messages.getString("NewAutotoolsProject.5") + projectName); //$NON-NLS-1$
|
||||
}
|
||||
} catch (CoreException e) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
|
||||
} catch (BuildException e) {
|
||||
throw new ProcessFailureException(Messages.getString("NewManagedProject.3") + e.getMessage(), e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
protected final void turnOffAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
savedAutoBuildingValue = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
protected final void restoreAutoBuild(IWorkspace workspace) throws CoreException {
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
workspaceDesc.setAutoBuilding(savedAutoBuildingValue);
|
||||
workspace.setDescription(workspaceDesc);
|
||||
}
|
||||
|
||||
/**
|
||||
* setOptionValue
|
||||
* @param config
|
||||
* @param option
|
||||
* @param val
|
||||
* @throws BuildException
|
||||
*/
|
||||
protected void setOptionValue(IConfiguration config, IOption option, String val) throws BuildException {
|
||||
if (val != null) {
|
||||
if (!option.isExtensionElement()) {
|
||||
option.setValue(val);
|
||||
} else {
|
||||
IOption newOption = config.getToolChain().createOption(option, option.getId() + "." + ManagedBuildManager.getRandomNumber(), option.getName(), false); //$NON-NLS-1$
|
||||
newOption.setValue(val);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,79 @@
|
|||
/*******************************************************************************
|
||||
* Copyright (c) 2007, 2010 Symbian Software Limited and others.
|
||||
* All rights reserved. This program and the accompanying materials
|
||||
* are made available under the terms of the Eclipse Public License v1.0
|
||||
* which accompanies this distribution, and is available at
|
||||
* http://www.eclipse.org/legal/epl-v10.html
|
||||
*
|
||||
* Contributors:
|
||||
* Bala Torati (Symbian) - Initial API and implementation
|
||||
* Jon Beniston - Add support for Autotools
|
||||
*******************************************************************************/
|
||||
|
||||
package org.eclipse.cdt.internal.autotools.core.wizards;
|
||||
|
||||
import org.eclipse.cdt.autotools.core.AutotoolsPlugin;
|
||||
import org.eclipse.cdt.core.model.CoreModel;
|
||||
import org.eclipse.cdt.core.settings.model.ICConfigurationDescription;
|
||||
import org.eclipse.cdt.core.templateengine.TemplateCore;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessArgument;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessFailureException;
|
||||
import org.eclipse.cdt.core.templateengine.process.ProcessRunner;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.AutotoolsConfigurationManager;
|
||||
import org.eclipse.cdt.internal.autotools.core.configure.IAConfiguration;
|
||||
import org.eclipse.cdt.managedbuilder.core.BuildException;
|
||||
import org.eclipse.core.resources.IProject;
|
||||
import org.eclipse.core.resources.IWorkspace;
|
||||
import org.eclipse.core.resources.IWorkspaceDescription;
|
||||
import org.eclipse.core.resources.ResourcesPlugin;
|
||||
import org.eclipse.core.runtime.CoreException;
|
||||
import org.eclipse.core.runtime.IProgressMonitor;
|
||||
|
||||
public class SetAutotoolsStringOptionValue extends ProcessRunner {
|
||||
|
||||
public void process(TemplateCore template, ProcessArgument[] args, String processId, IProgressMonitor monitor) throws ProcessFailureException {
|
||||
String projectName = args[0].getSimpleValue();
|
||||
IProject projectHandle = ResourcesPlugin.getWorkspace().getRoot().getProject(projectName);
|
||||
IWorkspace workspace = ResourcesPlugin.getWorkspace();
|
||||
IWorkspaceDescription workspaceDesc = workspace.getDescription();
|
||||
boolean autoBuilding = workspaceDesc.isAutoBuilding();
|
||||
workspaceDesc.setAutoBuilding(false);
|
||||
try {
|
||||
workspace.setDescription(workspaceDesc);
|
||||
} catch (CoreException e) {//ignore
|
||||
}
|
||||
|
||||
ProcessArgument[][] resourcePathObjects = args[1].getComplexArrayValue();
|
||||
for(int i=0; i<resourcePathObjects.length; i++) {
|
||||
ProcessArgument[] resourcePathObject = resourcePathObjects[i];
|
||||
String id = resourcePathObject[0].getSimpleValue();
|
||||
String value = resourcePathObject[1].getSimpleValue();
|
||||
try {
|
||||
setOptionValue(projectHandle, id, value);
|
||||
} catch (BuildException e) {
|
||||
throw new ProcessFailureException(AutotoolsPlugin.getFormattedString("SetAutotoolsStringOptionValue.error", new String[]{e.getMessage()}), e); //$NON-NLS-1$
|
||||
}
|
||||
}
|
||||
|
||||
workspaceDesc.setAutoBuilding(autoBuilding);
|
||||
try {
|
||||
workspace.setDescription(workspaceDesc);
|
||||
} catch (CoreException e) {//ignore
|
||||
}
|
||||
}
|
||||
|
||||
private void setOptionValue(IProject projectHandle, String id, String
|
||||
value) throws BuildException, ProcessFailureException {
|
||||
|
||||
AutotoolsConfigurationManager.getInstance().syncConfigurations(projectHandle);
|
||||
ICConfigurationDescription[] cfgds =
|
||||
CoreModel.getDefault().getProjectDescription(projectHandle).getConfigurations();
|
||||
if (cfgds != null && cfgds.length >= 1) {
|
||||
IAConfiguration iaConfig =
|
||||
AutotoolsConfigurationManager.getInstance().getConfiguration(projectHandle,
|
||||
cfgds[0].getId());
|
||||
iaConfig.setOption(id, value);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
6
build/org.eclipse.cdt.autotools.docs/.classpath
Normal file
|
@ -0,0 +1,6 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6"/>
|
||||
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
|
||||
<classpathentry kind="output" path="bin"/>
|
||||
</classpath>
|
5
build/org.eclipse.cdt.autotools.docs/.gitignore
vendored
Normal file
|
@ -0,0 +1,5 @@
|
|||
bin
|
||||
@dot
|
||||
javaCompiler...args
|
||||
build.xml
|
||||
target
|
28
build/org.eclipse.cdt.autotools.docs/.project
Normal file
|
@ -0,0 +1,28 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>org.eclipse.cdt.autotools.docs</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.ManifestBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.pde.SchemaBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.pde.PluginNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
</projectDescription>
|
|
@ -0,0 +1,11 @@
|
|||
eclipse.preferences.version=1
|
||||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
|
||||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
|
||||
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
|
||||
org.eclipse.jdt.core.compiler.compliance=1.5
|
||||
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
|
||||
org.eclipse.jdt.core.compiler.debug.localVariable=generate
|
||||
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
|
||||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
|
||||
org.eclipse.jdt.core.compiler.source=1.5
|
276
build/org.eclipse.cdt.autotools.docs/ChangeLog
Normal file
|
@ -0,0 +1,276 @@
|
|||
2012-01-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Refactor to org.eclipse.cdt.autotools.docs.
|
||||
|
||||
2011-06-16 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* build.properties: Add book.css.
|
||||
* book.css: New file.
|
||||
|
||||
2011-06-01 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Resolves: #347979
|
||||
* build.properties: Add images directory.
|
||||
* images/*.gif: New files.
|
||||
|
||||
2011-03-22 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* build.properties: Add tools.xml to bin list.
|
||||
|
||||
2010-12-15 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* tools.xml: New file.
|
||||
* plugin.xml: Restore help contents for GNU Tools that were overwritten by switching to
|
||||
using media-wiki to generate documentation.
|
||||
|
||||
2010-12-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Bump up version to 2.0.2 for 0.7 release.
|
||||
|
||||
2010-10-18 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java: Removed.
|
||||
* src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties: Removed.
|
||||
* userguide/Autotools\ Plugin-in\ User\ Guide-toc.xml: Removed.
|
||||
* userguide/Autotools\ Plugin-in\ User\ Guide.html: Removed.
|
||||
* userguide/Building.html: Removed.
|
||||
* userguide/Configuration.html: Removed.
|
||||
* userguide/Creating-an-Autotools-Project.html: Removed.
|
||||
* userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAclocal.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoconfEditor.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoheader.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutomake.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutomakeEditor.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoreconf.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutotools.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsBuilders.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsBuildLocation.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsCheckout.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsConfsettings.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsConsolePrefs.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsConsoleSelect.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsConvertWizard.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsCProjectWizard.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsCreateConf.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsEditorsTab.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsLibtoolize.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsManageConfs.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsNewOther.png: Removed.
|
||||
* userguide/images/Linuxtools-AutotoolsToolSettings.png: Removed.
|
||||
* userguide/Invoking-Autotools.html: Removed.
|
||||
* userguide/Make-Targets.html: Removed.
|
||||
* userguide/Special-Editors.html: Removed.
|
||||
* userguide/Supported-Environments.html: Removed.
|
||||
* userguide/Updating-This-Document.html: Removed.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Building.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Configuration.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Creating-an-Autotools-Project.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtool-AutotoolsMakeTargetsMenu.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAclocal.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutoconfEditor.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutoheader.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutomake.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutomakeEditor.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutoreconf.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutotools.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsAutotoolsConsole.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsBuilders.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsBuildLocation.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsCheckout.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsConfsettings.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsConsolePrefs.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsConsoleSelect.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsConvertWizard.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsCProjectWizard.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsCreateConf.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsEditorsTab.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsLibtoolize.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsMakeTargetBuild.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsMakeTargetCreate.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsMakeTargetEdit.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsManageConfs.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsNewOther.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/images/Linuxtools-AutotoolsToolSettings.png: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Invoking-Autotools.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Make-Targets.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Special-Editors.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Supported-Environments.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/Updating-This-Document.html: New file.
|
||||
* Linux_Tools_Project/Autotools/User_Guide/User-Guide.html: New file.
|
||||
* .classpath: Updated.
|
||||
* build-helper.xml: Rewritten to match rpm ui editor which uses media-wiki anttasks rather
|
||||
than extracting images manually.
|
||||
* build.properties: Remove directories that no longer exist and add new ones.
|
||||
* toc.xml: Replaced.
|
||||
|
||||
2010-06-04 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Bug #315852
|
||||
* toc.xml: Fixed link for pkg-config tool.
|
||||
|
||||
2010-04-17 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Change J2SE level to 1.5.
|
||||
|
||||
2010-04-14 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
Resolves #309117
|
||||
* .classpath: New file.
|
||||
* build-helper.xml: New file.
|
||||
* doc/notices.html: New file.
|
||||
* extract-markup.xsl: New file.
|
||||
* src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/MediaWikiImageFetcher.java: New file.
|
||||
* src/org/eclipse/linuxtools/internal/cdt/autotools/doc/anttask/tasks.properties: New file.
|
||||
* userguide/Autotools\ Plugin-in\ User\ Guide-toc.xml: New file.
|
||||
* userguide/Autotools\ Plugin-in\ User\ Guide.html: New file.
|
||||
* userguide/Building.html: New file.
|
||||
* userguide/Configuration.html: New file.
|
||||
* userguide/Creating-an-Autotools-Project.html: New file.
|
||||
* userguide/images/Linuxtool-AutotoolsMakeTargetsMenu.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAclocal.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoconfEditor.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoconfEditorPrefs.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoheader.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutomake.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutomakeEditor.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutoreconf.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutotools.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsAutotoolsConsole.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsBuilders.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsBuildLocation.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsCheckout.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsConfsettings.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsConsolePrefs.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsConsoleSelect.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsConvAutotoolsWizard.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsConvertWizard.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsCProjectWizard.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsCreateConf.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsEditorsTab.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsLibtoolize.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetBuild.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetCreate.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsMakeTargetEdit.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsManageConfs.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsNewOther.png: New file.
|
||||
* userguide/images/Linuxtools-AutotoolsToolSettings.png: New file.
|
||||
* userguide/Invoking-Autotools.html: New file.
|
||||
* userguide/Make-Targets.html: New file.
|
||||
* userguide/Special-Editors.html: New file.
|
||||
* userguide/Supported-Environments.html: New file.
|
||||
* userguide/Updating-This-Document.html: New file.
|
||||
* .project: Change to be Java project.
|
||||
* build.properties: Add new binary files.
|
||||
* META-INF/MANIFEST.MF: Dependency added.
|
||||
* plugin.xml: Add additional toc for Autotools User Guide.
|
||||
|
||||
2009-11-16 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* plugin.properties: Fix bundle name. Fix provider.
|
||||
|
||||
2009-10-20 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* cheatsheets/autotools.xml: Revised for Autotools rewrite.
|
||||
|
||||
2009-10-13 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* build.properties: Add build.properties to bin list.
|
||||
* META-INF/MANIFEST.MF: Bump up version to 2.0.0.
|
||||
|
||||
2009-01-15 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Add .qualifier to id.
|
||||
|
||||
2008-11-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* build.properties: Add cheatsheets directory to binary list and remove
|
||||
doc.zip which no longer exists in project.
|
||||
|
||||
2008-10-31 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Use translated BundleName and provider. Add
|
||||
"(Incubation)".
|
||||
* plugin.properties: Initial import.
|
||||
|
||||
2008-10-01 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* toc.xml: Add anchor id so other gnu tools can be added to Gnu Tools list.
|
||||
|
||||
2008-09-19 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Update version number to 1.0.0.
|
||||
|
||||
2008-09-16 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* toc.xml: Add http references for all of the GNU tools documentation.
|
||||
|
||||
2007-10-04 jjohnstn <jjohnstn@vermillion>
|
||||
|
||||
* META-INF/MANIFEST.MF: Update release to 0.0.5.
|
||||
* cheatsheets/autotools.xml: Add sub-step after pushing finish for GNU Autotools
|
||||
project wizard to handle the possibility of the workspace asking to go to the
|
||||
C/C++ perspective. Remove separate "changing to C/C++ perspective" step.
|
||||
|
||||
2007-10-03 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* cheatsheets/autotools.xml: New File.
|
||||
* plugin.xml: Add cheatsheets extension for autotools project.
|
||||
* META-INF/MANIFEST.MF: Add dependency on org.eclipse.ui.cheatsheets.
|
||||
|
||||
2007-08-15 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* META-INF/MANIFEST.MF: Change release to 0.0.4 and specify minimum java runtime
|
||||
as 1.4.
|
||||
* build.xml: Removed.
|
||||
|
||||
2007-02-02 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* toc.xml: Add "and Other" to the toc entry.
|
||||
* doc.zip: Add pkg-config/index.html (created using PolyglotMan
|
||||
<http://polyglotman.sourceforge.net/>).
|
||||
|
||||
2007-01-22 Andrew Overholt <overholt@redhat.com>
|
||||
|
||||
* toc.xml: Gnu -> GNU.
|
||||
|
||||
2007-01-12 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* about.html: New license file.
|
||||
|
||||
2006-08-29 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* build.xml: Update release to 0.0.3.
|
||||
|
||||
2006-07-24 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* Manifest.MF: Change release to 0.0.3.
|
||||
* getdocs.sh: Update to current FC6 releases of tools help.
|
||||
* doc.zip: Updated.
|
||||
|
||||
2006-07-14 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* Manifest.MF: Change release to 0.0.2.
|
||||
* build.properties: Add doc.zip and toc.xml to bin files.
|
||||
|
||||
2006-06-08 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* plugin.xml: Make provider Red Hat.
|
||||
|
||||
2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* getdocs.sh: New file to generate doc.zip.
|
||||
|
||||
2006-04-18 Jeff Johnston <jjohnstn@redhat.com>
|
||||
|
||||
* toc.xml: New file.
|
||||
* doc.zip: Ditto.
|
||||
* plugin.xml: Ditto.
|
|
@ -0,0 +1,112 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Building</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Building</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Special Editors</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Make Targets</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Building">Building</h1>
|
||||
<p>As mentioned, an Autotools project is an extended CDT Makefile project. Building the project is done the same as for any Makefile project. You can kick off a build manually by clicking on the Project -> Build Project menu item or if you choose, you can set up builds to occur automatically when resources are changed by checking off the Project -> Build Automatically menu item. The former build option is disabled when automatic builds are selected. By default, a
|
||||
<b>make all</b> is performed following the Autotools configure step.
|
||||
</p>
|
||||
<p>The build is performed on the active build configuration. A build configuration is a CDT construct which is a group of settings for a particular build. This is not to be confused with an Autotools configuration which is just the settings passed to the configure script. The CDT build configuration is saved across Eclipse sessions and includes environment variable settings, build macros, build location, tool settings, etc... used to perform a build. A project may have multiple build configurations. For example, a build with debugging info and a regular optimized build. As such, one configuration is designated the active configuration and as previously stated, is the one used for the build.</p>
|
||||
<p>The Autotools configure script parameters and the autogen.sh script parameters are treated as part of the CDT build configuration. While CDT settings are stored in the .cproject file within the project, the Autotools parameters are stored in a special file: .autotools. There is a one-to-one mapping of Autotools configuration parameters to a build configuration. By default, each Autotools project starts with a base build configuration named
|
||||
<b>Build (GNU)</b> which configures and builds in the top-level project directory. This is common for Autotools projects to have the user configure and build directly in the top-level source directory. The location of the build can be changed in the C/C++ Build properties:
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsBuildLocation.png"/>
|
||||
</p>
|
||||
<p>Notice how the default is ${workspace_loc:/xxxx} where xxxx is the project name. This represents the project's location which may or may not be physically under the workspace root directory. To change the build location, it is recommended that you add a directory following the project location: e.g. ${workspace_loc:/xxxx}/yyyy. </p>
|
||||
<p>It should be noted that the configure script automatically checks to see if a configuration has been performed in the source directory. It does so by looking for the
|
||||
<b>config.status</b> file existing in the same directory as the configure script. If configuring in a different directory and the configure script finds
|
||||
<b>config.status</b> in the source directories, it will stop and report a failure. Such is the case if you originally configure and build the default configuration and either change the build location or add a new configuration later and try to build it. The second configuration fails and recommends running
|
||||
<b>make distclean</b> first. A
|
||||
<b>make distclean</b> performs a clean and in addition removes configuration files such as
|
||||
<b>config.status</b>. The Autotools plug-in recognizes when this situation is about to occur during the configure step and will automatically issue a
|
||||
<b>make distclean</b> on your behalf to avoid the failure. The cleaning operation is recorded in the Configure console. Since it also removes build artefacts for the default configuration, these may have to be regenerated by a future configure/build with the default configuration marked active. If you know you will be creating multiple configurations for the project, you can either specify the default build location to something other than the top-level project directory or else you can avoid using the default configuration and only build configurations you have added yourself.
|
||||
</p>
|
||||
<p>CDT build configurations are managed via the Managed Configurations dialog. The dialog is accessed via a button that can be found on any property page that alters data that is part of the build configuration. This includes the Project -> Properties -> Autotools -> Configure Settings page. Pressing the button results in the Manage Configurations dialog:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsManageConfs.png"/>
|
||||
</p>
|
||||
<p>From the dialog, it is possible to create a new configuration, rename a configuration, delete a configuration, or set a particular configuration as being the active one. Deletion is disabled when there is only one configuration. Likewise, if there is only one configuration, it is active by default. When you choose to create a new configuration (hit the New... button), you are given a number of choices. You can:</p>
|
||||
<ol>
|
||||
<li>create a new one based on the default configuration
|
||||
<ul>
|
||||
<li>In the case of Autotools this is the default Build (GNU) configuration before any modifications were made.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>copy from an existing configuration
|
||||
<ul>
|
||||
<li>This copies all settings made.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>import from an existing project
|
||||
<ul>
|
||||
<li>This is unsupported if the project is not also an Autotools project in which case undefined behavior occurs.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>import a predefined configuration
|
||||
<ul>
|
||||
<li>This is not supported as it offers non-Autotools configurations. Undefined behavior will result if one of these are chosen.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsCreateConf.png"/>
|
||||
</p>
|
||||
<p>Copying a configuration copies all of its settings, including the Autotools configuration parameters. Copying all settings would normally include the build location (the directory where the build will be performed), but the Autotools plug-in, by default, intercedes and for every new configuration subsequent to the initial one, it sets the build location to build-xxxx where xxxx is the unique configuration name. The Autotools plug-in replaces any white-space in the configuration name with underscores so it is possible if you have named two configurations similarly with different white-space characters or one with underscores that you might result in a build location collision. The replacement of white-space is done because the build directory will get placed in the generated Makefile where white-space is used as delimiters and undefined behaviour would therefore occur. The automatic build directory naming behaviour can be turned off from the Project -> Properties -> Autotools page, but it is discouraged since switching between different configurations and building in the same directory can cause undefined behaviour.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutotools.png"/>
|
||||
</p>
|
||||
<p>Note: changes to configurations are not performed unless the Ok or Apply buttons are pressed from a Property page with the Manage Configurations button on it. That is, pressing Ok from the Manage Configurations dialog does not make the changes permanent. You could add new configurations, delete others, and then hit the Cancel button from the corresponding property page and the changes would be reverted.</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Special Editors</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Make Targets</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,125 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Configuration</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Configuration</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Configuration">Configuration</h1>
|
||||
<p>Prior to running a build, the Autotools plug-in runs the configure script. Parameters to be passed to configure may be
|
||||
entered via the Project -> Properties -> Autotools -> Configure Settings UI shown below:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsConfsettings.png"/>
|
||||
</p>
|
||||
<p>You will notice how the actual configure script name is editable. It is not recommended you change the name of the configure script as this is standard for Autotool projects. However, one use of this text input is to add environment variables to set prior to invoking the configure script. For example, you might want to set the command to:
|
||||
<b>CFLAGS="-g -debug" configure</b> to have the CFLAGS environment variable overridden while configuring. The same applies to the autogen.sh script settings.
|
||||
</p>
|
||||
<p>For configure, there are a number of standard parameters that apply to generated configure scripts. Each parameter has its command line name presented so you can look it up in Autotools documentation. In addition, tool-tip hover help is provided.</p>
|
||||
<p>Under the Advanced category, there is a free-form line called "Additional command-line options" where you may enter any options in their command-line format. This is useful for entering custom options that your configure script supports (e.g. --enable-feature-x or --with-lib-y). It can also be used for any of the standard parameters as well if that is more familiar tor you. Parameters in this list are appended to the end of parameters derived from the standard option entries (i.e. you could get two specifications of a parameter). In the case of multiple specification, behaviour is the same as it is on the command line. You can optionally check off the "Display help contents (--help)" option under the General category to see all the standard and custom options the configure script accepts. As the configure script help is a product of how it is written, it is sometimes possible that the help is out of date with regards to added features.</p>
|
||||
<p>In some cases, a project may choose not to invoke the Autotools ahead of time and instead
|
||||
require this be done prior to configuration. The input files that are fed to the Autotools are provided, but the output of
|
||||
the Autotools are not. This may be
|
||||
done to lower the download size and additionally to avoid having to constantly regenerate the output files as the Autotools are
|
||||
updated. In such cases, an autogen.sh script may be provided which is simply a script that runs the various Autotools
|
||||
required. This script may or may not run the configure script at the end. Alternatively, there is also the
|
||||
<i>autoreconf</i>
|
||||
tool which can be invoked to recursively run through the source tree and run all Autotools where the input files are newer than
|
||||
the output files (this includes the case where no output file is present). Any options required when invoking the Autotools
|
||||
can be encoded within the input files themselves.
|
||||
</p>
|
||||
<p>The following defines a priority list of scenarios that the Autotools plug-in checks for when performing the configure step and how each one is handled.</p>
|
||||
<ol>
|
||||
<li>A config.status file exists and configure script options have not changed since the last configuration
|
||||
<ul>
|
||||
<li>The config.status file is created as part of running a generated configure script. It itself is a script file and indicates a configuration has already been performed. If the configure options have not changed since that configuration, there is no need to do a full reconfigure. A simple check is performed by calling the config.status script with the --recheck option. This will verify that the generated Makefile exists and is up to date.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A configure script exists
|
||||
<ul>
|
||||
<li>In this case, the configure script is run with any configuration options specified in the project properties.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>An autogen script exists
|
||||
<ul>
|
||||
<li>In this case, the autogen.sh script is run and following that, a check is made to see if config.status has been created, indicating that the configure script was run. If has not configured, the configure script is run automatically if it was successfully created.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>A Makefile.cvs file exists
|
||||
<ul>
|
||||
<li>A Makefile.cvs is an alternate form of autogen.sh/configure script. In this case, the file is fed to the make command. If a configure script is created and not run as part of this process, it is run automatically.</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>default case
|
||||
<ul>
|
||||
<li>At this point, there is no configure script or autogen.sh script and configure has not been run previously. A last resort is to run the autoreconf command with -i to recursively search the source tree and invoke Autotools for any input file that is older than its output target (or if the target is missing). If this generates a configure script, it is run automatically.</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>If after all of this, the top-level Makefile is not created, an error is generated and building stops. </p>
|
||||
<p>The configure process can be manually forced for a project via the Project -> Reconfigure Project menu item. A reconfigure runs the configure script even if a config.status file is found indicating a prior configuration was successful.</p>
|
||||
<p>The entire configuration step is performed by a special builder that is added when an Autotools project is created or converted from another project. The special builder runs the configure step and is positioned to run prior to the Makefile builder.</p>
|
||||
<p>From the Project -> Properties -> Builders tab for a project you will see:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsBuilders.png"/>
|
||||
</p>
|
||||
<p>Do not un-check the Autotools Makefile builder nor change the order of the builders. Modifying this will result in undefined behaviour.</p>
|
||||
<p>The configure step is run in a special Configuration console added by the Autotools plug-in. This console is separate from the C-Build console which is used to display the results of the make command invocation.</p>
|
||||
<p>To see the Configure console, click on the console selector button (icon looks like a T.V.) found in the Console View as follows:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsConsoleSelect.png"/>
|
||||
</p>
|
||||
<p>Note that the configure console output is per project and shows configuration output for the last build of the project. It is not saved between Eclipse sessions.</p>
|
||||
<p>The Autotools console is an instance of a CDT Build console so the console preferences set in Window -> Preferences -> C/C++ -> Build Console apply as well.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsConsolePrefs.png"/>
|
||||
</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Creating an Autotools Project</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Invoking Autotools</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,87 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Creating an Autotools Project</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Creating an Autotools Project</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Supported Environments</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Configuration</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Creating_an_Autotools_Project">Creating an Autotools Project</h1>
|
||||
<p>There a number of ways to create an Autotools project. The first method is through the CDT C and C++ Project wizards which can be activated from the File -> New -> C Project and File -> New -> C++ Project menu items, respectively, which are available while in the C/C++ Perspective. These two wizards can also be located by clicking on the File -> New -> Project... menu item and then opening the C/C++ folder found there.</p>
|
||||
<p>Looking at the C Wizard, we see that there is a GNU Autotools category.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsCProjectWizard.png"/>
|
||||
</p>
|
||||
<p>Opening the category, there are two choices: Empty Project or Hello World Ansi C Autotools Project. The Empty Project template means that no files will be supplied to the new project while the Hello World project will supply a sample hello world program that uses Autotools for configuring the build. The C++ Project Wizard also has the same GNU Autotools category and two project templates: an Empty Project and a Hello World C++ Autotools sample program. If you are creating a project from scratch, it is recommended that you use the Hello World sample project and make modifications. Otherwise, you will need to create a configure script for the Autotools plug-in to invoke at build time or provide a Makefile so the configuration step does not fail.</p>
|
||||
<p>The C and C++ Wizards can also be used when importing an existing Autotools project. For example, when importing a project from CVS using File -> Import... -> CVS -> you are given the choice to "Check out as a project configured by the new project wizard".</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsCheckout.png"/>
|
||||
</p>
|
||||
<p>From the New Project menu, open the C/C++ category and choose either a C Project or C++ Project, depending on the type of project being imported. If the code is both C and C++, choose C++ Project.</p>
|
||||
<p>Let's say you have a C application using Autotools and select C Project. This will bring up the C Project Wizard as displayed earlier. In this case, choose the Empty Project from the GNU Autotools category as you already have all the configuration files in place.</p>
|
||||
<p>Another method to create an Autotools project is to convert an existing project. For example, if we import a project from SVN or CVS and do not configure using the new project wizard, the project will simply be downloaded into the workspace. At this point, it cannot be built or access various tools from the CDT.</p>
|
||||
<p>To convert it, select the project in the Project Explorer and open the File -> New -> Convert to C/C++ Project menu item as found in the C/C++ Perspective. If in another perspective, this same wizard can be found by selecting File -> New -> Other... -> C/C++ -> Convert to a C/C++ Project. This brings up the C/C++ Conversion wizard.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsConvertWizard.png"/>
|
||||
</p>
|
||||
<p>Note how there is a set of projects that are candidates for conversion. This list contains any projects that are not already C or C++ projects. A C or C++ project includes regular CDT Managed Make and Makefile projects. Also note that the project you selected is automatically selected when the wizard opens.</p>
|
||||
<p>There is a choice of C or C++ project and a set of project types to choose from. For Autotools, select the GNU Autotools category and this will convert to an Autotools project. Once converted, this project will not show up as a candidate project in the conversion wizard.</p>
|
||||
<p>The final way to create an Autotools project is to use the Autotools Conversion wizard. This wizard allows one to convert from any form of project to an Autotools project. Obviously, converting a project that isn't actually C or C++ and using Autotools will result in undefined behaviour. You need to first select the project you wish to convert. After selecting, go to File -> New -> Other... -> C/C++, open the category, select "Convert to a C/C++ Autotools Project" and hit the Next button. </p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsNewOther.png"/>
|
||||
</p>
|
||||
<p>This brings up the following dialog:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsConvAutotoolsWizard.png"/>
|
||||
</p>
|
||||
<p>Again, there are candidates for conversion. This list contains all projects that are not currently C or C++ Autotool projects. You are given the choice of C or C++ as with the standard C/C++ conversion wizard. Hitting the Finish button is all that is needed, but if you hit the Next button and continue on you can select referenced projects, if desired. </p>
|
||||
<p>Once converted to an Autotools project, there is no UI method to convert back to a regular C/C++ project. If this is desired, you need to manually remove the .project, .cproject, and .autotools files from the project directory. This will effectively remove the natures and CDT settings for the project, allowing you to convert it again however you want.</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Supported Environments</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Configuration</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,124 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Invoking Autotools</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Invoking Autotools</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Configuration</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Special Editors</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Invoking_Autotools">Invoking Autotools</h1>
|
||||
<p>To invoke the Autotools, a special menu item has been added to the Project menu. Under Project -> Invoke Autotools there are a set of menu items to invoke the various Autotools for your project. The output of the tool invocation is presented in a special Autotools Console. Like the Configure and C-Build Consoles, the Autotools console is per-project and is not saved across Eclipse sessions. The console, if present, can be accessed via the "Display Selected Console" button in the Console View.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutotoolsConsole.png"/>
|
||||
</p>
|
||||
<p>The tools provided are:</p>
|
||||
<ol>
|
||||
<li>Invoke Autoconf
|
||||
<ul>
|
||||
<li>The autoconf tool is run in the current directory for the current file or folder selected for the project. There are no parameters. Autoconf can also be run by right-clicking a configure.in or configure.ac file and selected Invoke Autoconf.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Automake
|
||||
<ul>
|
||||
<li>The automake tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutomake.png"/>
|
||||
<br/>The first text entry is for options while the 2nd text window is for Makefiles targets to generate. The automake tool should be invoked where the configure script is found that will generate the Makefile(s). There may be multiple Makefiles to generate in the current directory or lower. Each target location should be a Makefile and should have a corresponding Makefile.am file at the relative location specified. For example, automake x/Makefile y/Makefile Makefile specifies three targets. It is expected that there is an x/Makefile.am, y/Makefile.am, and a Makefile.am relative to the current directory. For details on automake, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Aclocal
|
||||
<ul>
|
||||
<li>The aclocal tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAclocal.png"/>
|
||||
<br/>The first text entry is for options while the 2nd text window is for directories to search for m4 macros. The directories can also be specified directly in the options parameters using the -I option. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Autoheader
|
||||
<ul>
|
||||
<li>The autoheader tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutoheader.png"/>
|
||||
<br/>The tool is used to create a template for generated header files. It should be run in a directory containing a configure script as it gets its information from there. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Autoreconf
|
||||
<ul>
|
||||
<li>The autoreconf tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutoreconf.png"/>
|
||||
<br/>The most useful option is the -i option to recursively call Autotools for all input files out of date with respect to their outputs. For details, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li>Invoke Libtoolize
|
||||
<ul>
|
||||
<li>The libtoolize tool is run from the current directory for the file or folder selected in the project. A dialog is presented to allow specification of options.
|
||||
<img border="0" src="images/Linuxtools-AutotoolsLibtoolize.png"/>.
|
||||
<br/>The tool is used to add libtool support to a package. Libtool provides macros to allow a package to create a shared library without having to know all the details required for the current platform. This might include special compiler flags or linker options or special tools. For details on libtoolize, enter --help as an option.
|
||||
<br/>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
</ol>
|
||||
<p>
|
||||
<br/>
|
||||
By default, the autotools are invoked simply by their names; expecting that the path has been set up appropriately. In some instances, you might want to specify a specific location for the autotools. For example, your project may require old versions of the tools which you have installed locally, but do not wish to be on your path. To set these for your project, select your project or a file/folder within it and go to Project -> Properties -> Autotools -> General and select the Tool Settings tab.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsToolSettings.png"/>
|
||||
</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Configuration.html" title="Configuration">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Special-Editors.html" title="Special Editors">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Configuration</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Special Editors</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,102 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Make Targets</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Make Targets</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Updating-This-Document.html" title="Updating This Document">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Building</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Make_Targets">Make Targets</h1>
|
||||
<p>A Makefile has a set of targets that can be built. Typically, every Makefile has an
|
||||
<b>all</b> target which builds all targets, but there may be optional targets as well. A CDT Makefile project enables one to invoke the various make targets via the Make Targets dialog. Since an Autotools project is a form of Makefile project, it too supports the Make Targets dialog.
|
||||
Make Targets are important for an Autotool project because there are a large number of make targets added to the Makefile automatically by configuration. Typically, a project is built by running
|
||||
<b>make all</b>, but it is installed by invoking
|
||||
<b>make install</b>. The install target places files in standard locations; usually system directories on a Linux system. For example, header files would be installed in /usr/include and made available to all users of the system. The install prefix (/usr) can be overridden using the configure --prefix parameter or else by specifying prefix=xxxx on the call to make (e.g. make install prefix=/my/local/directory) so that testing can be performed without modifying the whole system.
|
||||
</p>
|
||||
<p>A regular CDT Makefile project requires users to add their own Make Targets, however, the Autotools plug-in analyzes the top-level Makefile for you and creates top-level Make Targets for the project. As mentioned, these automatically added targets can be numerous. If you wish to create targets to run in sub-directories of the main build directory, you must add these manually. For example, you might wish to build docs in a lower-level sub-directory, but not for the entire project.</p>
|
||||
<p>The Make Targets dialog can be displayed in two ways:</p>
|
||||
<ol>
|
||||
<li>Selecting a file or folder in a project and clicking on the Project -> Make Target menu item</li>
|
||||
<li>Right clicking on a file or folder in a project and selecting Make Target</li>
|
||||
</ol>
|
||||
<p>This brings up a sub-menu containing Create... and Build.... to either create a new Make Target or build an existing Make Target, respectively.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtool-AutotoolsMakeTargetsMenu.png"/>
|
||||
</p>
|
||||
<p>Creating a Make Target is relatively straight-forward:</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsMakeTargetCreate.png"/>
|
||||
</p>
|
||||
<p>There is nothing different in the Make Target dialog for Autotools, however, a few concepts need to be clarified.</p>
|
||||
<p>For Make Targets added as part of the Project -> Make Target menu item, the target is for the top-level Makefile for the current build. This means that if you add a Make Target this way, it will persist across configurations and will try and run the
|
||||
<b>make</b> command in the top-level build location specified for the active configuration.
|
||||
</p>
|
||||
<p>Make Targets added by using the right-click Make Target menu are location sensitive. This means that the
|
||||
<b>make</b> command will attempt to run in that directory where the right-click was performed, regardless of whether there is a Makefile present there. Let's say you want to add your own Make Target that performed a
|
||||
<b>make all install</b> (i.e. you want to group multiple targets together into one). If you are in configuration X with build directory build-X, you want to right-click in a directory that is build-X or a sub-directory of build-X. This target will issue a
|
||||
<b>make all install</b> in that particular directory. If you wanted the same target for another configuration, you would have to right-click in its build directory or lower and add another Make Target. Obviously, for top-level Make Targets, using the Project -> Make Target menu item makes the most sense since it applies to all configurations. If you add a Make Target to a source directory, it will likely fail when run because it will try and run
|
||||
<b>make</b> in that directory which will probably only contain a Makefile.in or Makefile.am file and not a Makefile which is only generated at configure time.
|
||||
</p>
|
||||
<p>The Make Target dialog can be used to override various flags within the Makefile. For example, to perform a
|
||||
<b>make install</b> and reset the prefix to /my/local/directory, you would first select the
|
||||
<b>install</b> target from the Build... dialog.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsMakeTargetBuild.png"/>
|
||||
</p>
|
||||
<p>Then, you would click the Edit button to edit the Make Target. You can then override the prefix by specifying its value after the
|
||||
<b>make</b> command. You edit the build command by first un-checking "Use Builder Settings" which enables text entry.
|
||||
</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsMakeTargetEdit.png"/>
|
||||
</p>
|
||||
<p>The check-box that says "Run all project builders" should be left un-checked. By default, we only want the CDT Makefile builder to run and not the Autotools configure builder or any other builder.</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Updating-This-Document.html" title="Updating This Document">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Building</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Updating This Document</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,78 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Special Editors</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Special Editors</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Building</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Special_Editors">Special Editors</h1>
|
||||
<p>The Autotools plug-in provides two special editors for editing Autotool input files. The first is the Autoconf Editor. This editor is invoked when opening configure.in, configure.ac files as well as the resultant configure scripts that autoconf creates. Support includes full colourization, outline view, rudimentary error parsing, and hover help/completion.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutoconfEditor.png"/>
|
||||
</p>
|
||||
<p>The outline view shows macro references and program control statements such as if, else, for, etc... Hover help with text completion is provided for the various AC-prefixed and AM-prefixed macros that are provided as standard. As the macros vary from release to release of autoconf and automake, the editor uses an autoconf and automake version property to determine which set of macros it should adhere to. The versions selected affect the parsing which will issue warnings for macros that do not have enough parameters or too many parameters. To set the autoconf and automake versions for the Autoconf Editor, go to the Project -> Properties -> Autotools -> General page and select the Editors tab.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsEditorsTab.png"/>
|
||||
</p>
|
||||
<p>There you will find a pull-down of the various versions supported. Future releases may add new versions.</p>
|
||||
<p>The default autoconf and automake versions to use for editing can be set as a preference. Go to Window -> Preferences -> C/C++ -> Autotools -> Autoconf Editor and click on the Versions tab.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutoconfEditorPrefs.png"/>
|
||||
</p>
|
||||
<p>Under the Syntax tab of the same preference page, you can change the colours used for the various elements shown in the editor.</p>
|
||||
<p>A second editor, the Automake Editor is also provided by the Autotools plug-in. This editor is invoked when opening a Makefile.am or Makefile.in file. Support includes full colourization, outline view, rudimentary error parsing, and hover help.</p>
|
||||
<p>
|
||||
<img border="0" src="images/Linuxtools-AutotoolsAutomakeEditor.png"/>
|
||||
</p>
|
||||
<p>In the example shown, one can see the $ variable references are displayed when hovered over. This is particularly useful for $< and $@ in make targets to understand what is being referenced. In some instances, you will see reference to variables surrounded by the @ symbol (e.g. @srcdir@). This represents a variable that is to be substituted by the configure script.</p>
|
||||
<p>Rudimentary error parsing looks for syntax errors. As with the Autoconf editor, colourization can be controlled by preferences. Go to Window -> Preferences -> C/C++ -> Autotools -> Automake Editor and click on the Syntax tab.</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Invoking-Autotools.html" title="Invoking Autotools">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Building.html" title="Building">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Invoking Autotools</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Building</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,60 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Supported Environments</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Supported Environments</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Autotools Plug-in User Guide</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Supported_Environments">Supported Environments</h1>
|
||||
<p>While the Autotools should work on any Unix-based system, it has only been tested on Linux (note that it is part of the Linux Tools project). OS-specific bugs or problems that are not reproducible on Linux may require a user work-around. For example, users of Cygwin or MinGW may require setting modifications to get the plug-in working for their project. The Autotools plug-in is not supported under a regular Windows environment (i.e. without Cygwin or MinGW).</p>
|
||||
<p>To use the Autotools plug-in, it is required that you have the CDT (C/C++ Development Tools) already installed in Eclipse, the GNU Autotools installed on your system, and the "sh" (shell) command must be available. The "sh" command is required to invoke the configure script.</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Creating-an-Autotools-Project.html" title="Creating an Autotools Project">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Autotools Plug-in User Guide</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Creating an Autotools Project</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,54 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide - Updating This Document</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Updating This Document</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Make Targets</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top"></td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Updating_This_Document">Updating This Document</h1>
|
||||
<p>This document is maintained in a collaborative wiki. If you wish to update or modify this document please visit
|
||||
|
||||
<a href="http://wiki.eclipse.org/Linux_Tools_Project/Autotools/User_Guide">http://wiki.eclipse.org/Linux_Tools_Project/Autotools/User_Guide</a>
|
||||
</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left">
|
||||
<a href="Make-Targets.html" title="Make Targets">
|
||||
<img alt="Previous" border="0" src="../../../images/prev.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 60%" align="center">
|
||||
<a href="User-Guide.html" title="Autotools Plug-in User Guide">
|
||||
<img alt="Autotools Plug-in User Guide" border="0" src="../../../images/home.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
<td style="width: 20%" align="right"></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top">Make Targets</td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top"></td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
|
@ -0,0 +1,61 @@
|
|||
<?xml version='1.0' encoding='utf-8' ?><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
|
||||
<title>Autotools Plug-in User Guide</title>
|
||||
<link type="text/css" rel="stylesheet" href="../../../book.css"/>
|
||||
</head>
|
||||
<body>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<th style="width: 100%" align="center" colspan="3">Autotools Plug-in User Guide</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Supported Environments</td>
|
||||
</tr>
|
||||
</table><hr/>
|
||||
<h1 id="Introduction">Introduction</h1>
|
||||
<p>The Autotools plug-in for Eclipse extends the CDT (C/C++ Development Tools) to add support for maintaining and
|
||||
building C/C++ projects that use GNU Autotools.</p>
|
||||
<p>The GNU Autotools are a set of tools used to make a project portable to multiple systems or build environments. The tools aid the developer to create
|
||||
a configure script which is meant to be invoked prior to performing the build. The configure script may perform tests such as testing the current platform, the OS, what is locally installed, or any number of things. Parameters can be passed as well to provide information that is not calculable (e.g. what will be the target platform the project will be run on). Results of tests and parameters are used to create the Makefiles for the build or in some cases, additional files such as header files or code sequences. </p>
|
||||
<p>What gets tested is fully controllable by the developer by way of special input files which
|
||||
are fed to the Autotools. Typically, the most commonly used Autotools are 'autoconf', 'automake', and 'aclocal'. The 'autoconf' tool takes a 'configure.in' or 'configure.ac' input file and creates the 'configure' script previously discussed. It is possible to have multiple configure scripts in various subdirectories, but a project should be designed so there is one top-level configure script that calls any lower-level ones automatically.</p>
|
||||
<p>The 'automake' tool takes a 'Makefile.am' input file and creates a 'Makefile.in' file which is used at configuration time by the configure script as a template for creating a Makefile. Each Makefile will have its own corresponding Makefile.in file. There may be if/else logic used to determine what ends up in the Makefile or there may be requests to directly substitute variables calculated in the configure step.</p>
|
||||
<p>The 'aclocal' tool creates a repository of macros that are specified directly or indirectly in the 'autoconf' input files. Such macros are provided to perform commonly used tests or actions (e.g. test that a certain header file
|
||||
exists or find the C compiler). The macros are written in a language called m4 and the developer is free to create their own macros to add to the repository. </p>
|
||||
<p>The Autotools plug-in adds support for running the configure script prior to the build. As well, support is added for invoking the Autotools themselves as well as maintaining the files they use. An Autotools project extends a CDT Makefile project. Therefore, functionality in the CDT for supporting such a project applies to an Autotools project as well (e.g. C/C++ Property pages).</p>
|
||||
<p>For more details on the GNU Autotools, see
|
||||
<a href="http://www.gnu.org/software/autoconf/">http://www.gnu.org/software/autoconf/</a> and
|
||||
|
||||
<a href="http://www.gnu.org/software/automake/">http://www.gnu.org/software/automake/</a>
|
||||
</p><hr/>
|
||||
<table class="navigation" style="width: 100%;" border="0" summary="navigation">
|
||||
<tr>
|
||||
<td style="width: 20%" align="left"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right">
|
||||
<a href="Supported-Environments.html" title="Supported Environments">
|
||||
<img alt="Next" border="0" src="../../../images/next.gif"/>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="width: 20%" align="left" valign="top"></td>
|
||||
<td style="width: 60%" align="center"></td>
|
||||
<td style="width: 20%" align="right" valign="top">Supported Environments</td>
|
||||
</tr>
|
||||
</table>
|
||||
</body>
|
||||
</html>
|
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 23 KiB |
After Width: | Height: | Size: 136 KiB |
After Width: | Height: | Size: 43 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 27 KiB |
After Width: | Height: | Size: 115 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 56 KiB |
After Width: | Height: | Size: 81 KiB |
After Width: | Height: | Size: 90 KiB |
After Width: | Height: | Size: 54 KiB |
After Width: | Height: | Size: 62 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 42 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 100 KiB |
After Width: | Height: | Size: 59 KiB |
After Width: | Height: | Size: 67 KiB |
After Width: | Height: | Size: 52 KiB |
After Width: | Height: | Size: 51 KiB |
After Width: | Height: | Size: 19 KiB |
After Width: | Height: | Size: 36 KiB |
After Width: | Height: | Size: 38 KiB |
After Width: | Height: | Size: 39 KiB |