From: Curt A. <ca...@us...> - 2002-04-16 05:39:49
|
Update of /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks In directory usw-pr-cvs1:/tmp/cvs-serv10367/src/net/sf/antcontrib/cpptasks Modified Files: CUtil.java Log Message: placed gcc -l and -L after .o files more xerces build.xml Index: CUtil.java =================================================================== RCS file: /cvsroot/ant-contrib/cpptasks/src/net/sf/antcontrib/cpptasks/CUtil.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** CUtil.java 13 Apr 2002 05:53:59 -0000 1.11 --- CUtil.java 16 Apr 2002 05:39:46 -0000 1.12 *************** *** 471,473 **** --- 471,500 ---- } + public static boolean isActive(Project p, String ifCond, String unlessCond) + throws BuildException { + if (ifCond != null) { + String ifValue = p.getProperty(ifCond); + if(ifValue == null) { + return false; + } else { + if(ifValue.equals("false") || ifValue.equals("no")) { + throw new BuildException("if condition \"" + ifCond + + "\" has suspicious value \"" + ifValue); + } + } + } + if (unlessCond != null) { + String unlessValue = p.getProperty(unlessCond); + if(unlessValue != null) { + if(unlessValue.equals("false") || unlessValue.equals("no")) { + throw new BuildException("unless condition \"" + unlessCond + + "\" has suspicious value \"" + unlessValue); + } + return false; + } + } + return true; + } + + } |