ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 9810] New: - Neither apply nor exec expands wildcards
Date Wed, 12 Jun 2002 16:35:13 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9810>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9810

Neither apply nor exec expands wildcards

           Summary: Neither apply nor exec expands wildcards
           Product: Ant
           Version: 1.4.1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Enhancement
          Priority: Other
         Component: Core tasks
        AssignedTo: ant-dev@jakarta.apache.org
        ReportedBy: stefan.kedl@utanet.at


Neither apply nor exec expands wildcards handed over by the nested arg-tag.

  <property name="SRC_DIR" value="./src"/>
  <property name="TARGET" value="myTarget"/>
  <target name="aTarget">
    <exec executable="ld">
      <arg value="-L"/>
      <arg value="/usr/local/lib"/>
      <arg value="-lmylib"/>
      <arg value="-Bdynamic"/>
      <arg value="-G"/>
      <arg value="${SRC_DIR}/*.o"/>
      <arg value="-o"/>
      <arg value="${SRC_DIR}/lib${TARGET}.so"/>
    </exec>
  </target>


This target produces the following output:

aTarget:
     [exec] Current OS is SunOS
     [exec] ld -L /opt/mqm/lib -lmqm -lwmqjbind -Bdynamic -G ./src/*.o
-o ./src/libmyTarget.so
     [exec] ld: fatal: file ./src/*.o: open failed: No such file or directory
     [exec] Result: 1

If myobj1.o and myobj2.o is used instead of *.o the target will be processed 
properly (see the following target)

  <property name="SRC_DIR" value="./src"/>
  <target name="aTarget">
    <exec executable="ld">
      <arg value="-L"/>
      <arg value="/usr/local/lib"/>
      <arg value="-lmylib"/>
      <arg value="-Bdynamic"/>
      <arg value="-G"/>
      <arg value="${SRC_DIR}/myobj1.o"/>
      <arg value="${SRC_DIR}/myobj2.o"/>
      <arg value="-o"/>
      <arg value="${SRC_DIR}/lib${TARGET}.so"/>
    </exec>
  </target>

This works, but if you add a new object-file (myobj3.o) to the project it is 
necessary to add a new arg-entry (<arg value="${SRC_DIR}/myobj3.o"/>)to the 
build-file.
I looked for solutions in the ant-documentations as well as in some news-
groups, but i found no proper solution for my problem.

I think it would make life easier if exec and apply are able to handle 
wildcards.

thanks

s. kedl

--
To unsubscribe, e-mail:   <mailto:ant-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:ant-dev-help@jakarta.apache.org>


Mime
View raw message