From ed475344e72f1fb4d9e19cf627ddf8e67cc23942 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 23 May 2003 13:40:37 +0000 Subject: [PATCH] NonStop Kernel is Unix as far as Ant is concerned. doesn't like to be called with parallel. and should also disable the addsourcefile attribute. git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274607 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 2 +- docs/manual/CoreTasks/chmod.html | 2 +- docs/manual/CoreTasks/conditions.html | 2 +- docs/manual/OptionalTasks/attrib.html | 8 ---- .../org/apache/tools/ant/taskdefs/Chmod.java | 3 +- .../apache/tools/ant/taskdefs/Execute.java | 3 +- .../optional/unix/AbstractAccessTask.java | 14 ++++++ .../ant/taskdefs/optional/windows/Attrib.java | 43 ++++++++++++++++++- 8 files changed, 61 insertions(+), 16 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index 225b508ab..f0d9472af 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -246,7 +246,7 @@ Other changes: * New filterreader . -* Support for HP's NonStop (Tandem) OS has been added. +* Support for HP's NonStop Kernel (Tandem) OS has been added. * 's basedir attribute is now optional if you specify nested filesets. Bugzilla Report 18046. diff --git a/docs/manual/CoreTasks/chmod.html b/docs/manual/CoreTasks/chmod.html index 1a7aad9bb..dc2638762 100644 --- a/docs/manual/CoreTasks/chmod.html +++ b/docs/manual/CoreTasks/chmod.html @@ -10,7 +10,7 @@

Chmod

Description

Changes the permissions of a file or all files inside specified -directories. Right now it has effect only under Unix or NonStop (Tandem). +directories. Right now it has effect only under Unix or NonStop Kernel (Tandem). The permissions are also UNIX style, like the argument for the chmod command.

See the section on directory based tasks, on how the inclusion/exclusion of files works, and how to diff --git a/docs/manual/CoreTasks/conditions.html b/docs/manual/CoreTasks/conditions.html index f99c88d8f..e924e7aeb 100644 --- a/docs/manual/CoreTasks/conditions.html +++ b/docs/manual/CoreTasks/conditions.html @@ -92,7 +92,7 @@ the tests succeed.

  • unix (for all Unix and Unix-like operating systems)
  • netware (for Novell NetWare)
  • os/2 (for OS/2)
  • -
  • tandem (for HP's NonStop - formerly Tandem)
  • +
  • tandem (for HP's NonStop Kernel - formerly Tandem)
  • win9x for Microsoft Windows 95 and 98
  • z/os for z/OS and OS/390
  • os/400 for OS/400
  • diff --git a/docs/manual/OptionalTasks/attrib.html b/docs/manual/OptionalTasks/attrib.html index df0680836..5cd01bc03 100644 --- a/docs/manual/OptionalTasks/attrib.html +++ b/docs/manual/OptionalTasks/attrib.html @@ -59,14 +59,6 @@ elements.

    If set to dir, only the directories are considered. No, default is file - - maxparallel - Limit the amount of parallelism by passing at - most this many sourcefiles at once. Set it to <= 0 for - unlimited. Defaults to unlimited. - No - - verbose Whether to print a summary after execution or not. diff --git a/src/main/org/apache/tools/ant/taskdefs/Chmod.java b/src/main/org/apache/tools/ant/taskdefs/Chmod.java index eaf329028..4c7a23af9 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Chmod.java +++ b/src/main/org/apache/tools/ant/taskdefs/Chmod.java @@ -263,7 +263,6 @@ public class Chmod extends ExecuteOn { } protected boolean isValidOs() { - return (Os.isFamily("unix") || Os.isFamily("tandem")) - && super.isValidOs(); + return Os.isFamily("unix") && super.isValidOs(); } } diff --git a/src/main/org/apache/tools/ant/taskdefs/Execute.java b/src/main/org/apache/tools/ant/taskdefs/Execute.java index d619d11b8..499d9581e 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -231,8 +231,7 @@ public class Execute { String[] cmd = {"command.com", "/c", "set" }; return cmd; } - } else if (Os.isFamily("z/os") || Os.isFamily("tandem") - || Os.isFamily("unix")) { + } else if (Os.isFamily("z/os") || Os.isFamily("unix")) { // On most systems one could use: /bin/sh -c env // Some systems have /bin/env, others /usr/bin/env, just try diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java index a1db6a2bb..1ea408a96 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/unix/AbstractAccessTask.java @@ -95,18 +95,32 @@ public abstract class AbstractAccessTask addFileset(fs); } + /** + * @ant.attribute ignore="true" + */ public void setCommand(Commandline cmdl) { throw new BuildException(taskType + " doesn\'t support the command attribute", getLocation()); } + /** + * @ant.attribute ignore="true" + */ public void setSkipEmptyFilesets(boolean skip) { throw new BuildException(taskType + " doesn\'t support the " + "skipemptyfileset attribute", getLocation()); } + /** + * @ant.attribute ignore="true" + */ + public void setAddsourcefile(boolean b) { + throw new BuildException(getTaskType() + + " doesn\'t support the addsourcefile attribute", getLocation()); + } + protected boolean isValidOs() { return Os.isFamily("unix") && super.isValidOs(); } diff --git a/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java b/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java index 84d98a711..7801720f8 100644 --- a/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java +++ b/src/main/org/apache/tools/ant/taskdefs/optional/windows/Attrib.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2002 The Apache Software Foundation. All rights + * Copyright (c) 2002-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -120,18 +120,59 @@ public class Attrib extends ExecuteOn { super.checkConfiguration(); } + /** + * @ant.attribute ignore="true" + */ public void setExecutable(String e) { throw new BuildException(taskType + " doesn\'t support the executable attribute", getLocation()); } + /** + * @ant.attribute ignore="true" + */ public void setCommand(String e) { throw new BuildException(taskType + " doesn\'t support the command attribute", getLocation()); } + /** + * @ant.attribute ignore="true" + */ + public void setAddsourcefile(boolean b) { + throw new BuildException(getTaskType() + + " doesn\'t support the addsourcefile attribute", getLocation()); + } + + /** + * @ant.attribute ignore="true" + */ + public void setSkipEmptyFilesets(boolean skip) { + throw new BuildException(taskType + " doesn\'t support the " + + "skipemptyfileset attribute", + getLocation()); + } + + /** + * @ant.attribute ignore="true" + */ + public void setParallel(boolean parallel) { + throw new BuildException(getTaskType() + + " doesn\'t support the parallel attribute", + getLocation()); + } + + /** + * @ant.attribute ignore="true" + */ + public void setMaxParallel(int max) { + throw new BuildException(getTaskType() + + " doesn\'t support the maxparallel attribute", + getLocation()); + } + protected boolean isValidOs() { return Os.isFamily("windows") && super.isValidOs(); }