Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Managed Build versioning, was RE: [cdt-patch] Additions to Managed Build Options Functionality

Doh, meant to send this to cdt-dev instead :-(

 

___________________________________________

 

Chris Recoskie

Software Designer

IDE Frameworks Group

Texas Instruments, Toronto

 

 

-----Original Message-----
From: Recoskie, Chris
Sent: Wednesday, March 17, 2004 9:52 AM
To: 'cdt-patch@xxxxxxxxxxx'
Subject: Managed Build versioning, was RE: [cdt-patch] Additions to Managed Build Options Functionality

 

I suspect that Sean is going to torpedo this, citing the “we don’t want to break old manifests” argument.

 

I think that for the future, we are going to need to come up with some method of versioning the Managed Build support and the projects and makefiles that get generated from it.  I realize that there is a lot that will need doing before June so this might not be something that would necessarily be done for 2.0, but I think will need to be done eventually.  We can’t remain locked forever into the current design and implementation, but we need an intelligent way to update and upgrade the functionality over time without blowing everyone out of the water.

 

I was going to wait until later to brooch the subject, as I have not fully formulated my thoughts on how on earth we could do it, let alone come up with an intelligent proposal to float to the list, but this seemed like a good time to at least put the bug in peoples’ ears.  Would it be possible for us to devote some of our cycles to thinking about this and discussing it on the list?

 

Right now in my toolchain plug-in I am sort of hacking around these sorts of problems (and others), but it’s not pretty.  Our compiler and linker are spitting out a lot of warnings because things are not quite setup as they should be.  The generated code works fine, but it’s unpalatable to leave the warnings there for the user to see (and changing the code generation tools to behave in a more GNU-like manner is not really an option according to our code generation team).

 

___________________________________________

 

Chris Recoskie

Software Designer

IDE Frameworks Group

Texas Instruments, Toronto

 

 

-----Original Message-----
From: cdt-patch-admin@xxxxxxxxxxx [mailto:cdt-patch-admin@xxxxxxxxxxx] On Behalf Of Treggiari, Leo
Sent:
Wednesday, March 17, 2004 9:30 AM
To: cdt-patch@xxxxxxxxxxx
Subject: [cdt-patch] Additions to Managed Build Options Functionality

 

Hi,

 

This patch implements 2 pieces of additional option functionality that were discussed on CDT-DEV.

 

  1. For a String option, if the defaultValue attribute is present, and contains a string of length > 0, then the command string (if any) is prepended to the defaultValue string to form the command line string.
  2. Add a commandFalse attribute to the Option Schema to be used, if specified, when the value of a Boolean option is False.

 

I’ll send a patch to the JUnit Managed Builder tests next.

 

Leo

 

Index: schema/ManagedBuildTools.exsd

===================================================================

retrieving revision 1.7

diff -u -r1.7 ManagedBuildTools.exsd

--- schema/ManagedBuildTools.exsd       26 Feb 2004 20:53:54 -0000        1.7

+++ schema/ManagedBuildTools.exsd    17 Mar 2004 14:13:10 -0000

@@ -213,6 +213,13 @@

                </documentation>

             </annotation>

          </attribute>

+         <attribute name="commandFalse" type="string">

+            <annotation>

+               <documentation>

+                  An optional value, used only with options of type Boolean, that specifies the actual command that will be passed to the tool on the command line when the value of the Boolean option is False.

+               </documentation>

+            </annotation>

+         </attribute>

       </complexType>

    </element>

 

Index: src/org/eclipse/cdt/managedbuilder/core/IOption.java

===================================================================

retrieving revision 1.3

diff -u -r1.3 IOption.java

--- src/org/eclipse/cdt/managedbuilder/core/IOption.java     16 Mar 2004 22:25:50 -0000        1.3

+++ src/org/eclipse/cdt/managedbuilder/core/IOption.java  17 Mar 2004 14:13:10 -0000

@@ -27,6 +27,7 @@

            // Schema attribute names for option elements

            public static final String CATEGORY = "category"; //$NON-NLS-1$

            public static final String COMMAND = "command"; //$NON-NLS-1$

+          public static final String COMMAND_FALSE = "commandFalse"; //$NON-NLS-1$

            public static final String DEFAULT_VALUE = "defaultValue"; //$NON-NLS-1$

            public static final String ENUM_VALUE = "enumeratedOptionValue"; //$NON-NLS-1$

            public static final String IS_DEFAULT = "isDefault"; //$NON-NLS-1$

@@ -87,6 +88,14 @@

             * @return String

             */

            public String getCommand();

+         

+          /**

+          * Answers a <code>String</code> containing the actual command line

+          * option associated with a Boolean option when the value is False

+          *

+          * @return String

+          */

+          public String getCommandFalse();

           

            /**

             * Answers the user-defined preprocessor symbols.

Index: src/org/eclipse/cdt/managedbuilder/internal/core/Option.java

===================================================================

retrieving revision 1.5

diff -u -r1.5 Option.java

--- src/org/eclipse/cdt/managedbuilder/internal/core/Option.java      12 Mar 2004 19:11:53 -0000        1.5

+++ src/org/eclipse/cdt/managedbuilder/internal/core/Option.java   17 Mar 2004 14:13:13 -0000

@@ -33,6 +33,7 @@

            private List builtIns;

            private IOptionCategory category;

            private String command;

+          private String commandFalse;

            private String defaultEnumName;

            private Map enumCommands;

            private ITool tool;

@@ -62,6 +63,9 @@

                        // Get the command defined for the option

                        command = element.getAttribute(COMMAND);

                       

+                      // Get the command defined for a Boolean option when the value is False

+                      commandFalse = element.getAttribute(COMMAND_FALSE);

+                     

                        // Options hold different types of values

                        String valueTypeStr = element.getAttribute(VALUE_TYPE);

                        if (valueTypeStr == null)

@@ -182,6 +186,13 @@

             */

            public String getCommand() {

                        return command;

+          }

+

+          /* (non-Javadoc)

+          * @see org.eclipse.cdt.core.build.managed.IOption#getCommandFalse()

+          */

+          public String getCommandFalse() {

+                      return commandFalse;

            }

 

            /* (non-Javadoc)

Index: src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java

===================================================================

retrieving revision 1.8

diff -u -r1.8 OptionReference.java

--- src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java   12 Mar 2004 19:11:53 -0000        1.8

+++ src/org/eclipse/cdt/managedbuilder/internal/core/OptionReference.java            17 Mar 2004 14:13:13 -0000

@@ -249,6 +249,13 @@

            }

 

            /* (non-Javadoc)

+          * @see org.eclipse.cdt.core.build.managed.IOption#getCommandFalse()

+          */

+          public String getCommandFalse() {

+                      return option.getCommandFalse();

+          }

+

+          /* (non-Javadoc)

             * @see org.eclipse.cdt.core.build.managed.IOption#getDefinedSymbols()

             */

            public String[] getDefinedSymbols() throws BuildException {

Index: src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java

===================================================================

retrieving revision 1.9

diff -u -r1.9 Tool.java

--- src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java         12 Mar 2004 19:11:53 -0000        1.9

+++ src/org/eclipse/cdt/managedbuilder/internal/core/Tool.java      17 Mar 2004 14:13:13 -0000

@@ -206,8 +206,16 @@

                                    IOption option = opts[index];

                                    switch (option.getValueType()) {

                                                case IOption.BOOLEAN :

+                                                          String boolCmd;

                                                            if (option.getBooleanValue()) {

-                                                                       buf.append(option.getCommand() + WHITE_SPACE);

+                                                                      boolCmd = option.getCommand();

+                                                          }

+                                                          //  FYI; getCommandFalse is new with CDT 2.0

+                                                          else {

+                                                                      boolCmd = option.getCommandFalse();

+                                                          }

+                                                          if (boolCmd != null && boolCmd.length() > 0) {

+                                                                      buf.append(boolCmd + WHITE_SPACE);

                                                            }

                                                            break;

                                               

@@ -219,8 +227,11 @@

                                                            break;

                                               

                                                case IOption.STRING :

+                                                          String strCmd = option.getCommand();

                                                            String val = option.getStringValue();

                                                            if (val.length() > 0) {

+                                                                      if (strCmd != null)

+                                                                                  buf.append(strCmd);

                                                                        buf.append(val + WHITE_SPACE);

                                                            }

                                                            break;

Index: src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java

===================================================================

retrieving revision 1.9

diff -u -r1.9 ToolReference.java

--- src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java       16 Mar 2004 22:12:23 -0000        1.9

+++ src/org/eclipse/cdt/managedbuilder/internal/core/ToolReference.java    17 Mar 2004 14:13:14 -0000

@@ -199,8 +199,16 @@

                                    IOption option = opts[index];

                                    switch (option.getValueType()) {

                                                case IOption.BOOLEAN :

+                                                          String boolCmd;

                                                            if (option.getBooleanValue()) {

-                                                                       buf.append(option.getCommand() + WHITE_SPACE);

+                                                                      boolCmd = option.getCommand();

+                                                          }

+                                                          //  FYI; getCommandFalse is new with CDT 2.0

+                                                          else {

+                                                                      boolCmd = option.getCommandFalse();

+                                                          }

+                                                          if (boolCmd != null && boolCmd.length() > 0) {

+                                                                      buf.append(boolCmd + WHITE_SPACE);

                                                            }

                                                            break;

                                               

@@ -212,8 +220,11 @@

                                                            break;

                                               

                                                case IOption.STRING :

+                                                          String strCmd = option.getCommand();

                                                            String val = option.getStringValue();

                                                            if (val.length() > 0) {

+                                                                      if (strCmd != null)

+                                                                                  buf.append(strCmd);

                                                                        buf.append(val + WHITE_SPACE);

                                                            }

                                                            break;


Back to the top