From f624f1bf4dbb8bbb60d0f2c5ceb34dc1ef96627d Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Fri, 14 Mar 2003 16:01:04 +0000 Subject: [PATCH] Add support for HP's NonStop Server (formerly known by several names, including Tandem). Submitted by: Mirko Zeibig git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274262 13f79535-47bb-0310-9956-ffa450edef68 --- WHATSNEW | 4 +++- docs/manual/CoreTasks/chmod.html | 5 +++-- docs/manual/CoreTasks/conditions.html | 3 ++- docs/manual/CoreTasks/pathconvert.html | 4 ++-- src/main/org/apache/tools/ant/taskdefs/Chmod.java | 5 +++-- src/main/org/apache/tools/ant/taskdefs/Execute.java | 4 ++++ src/main/org/apache/tools/ant/taskdefs/PathConvert.java | 6 +++--- src/main/org/apache/tools/ant/taskdefs/condition/Os.java | 3 +++ 8 files changed, 23 insertions(+), 11 deletions(-) diff --git a/WHATSNEW b/WHATSNEW index beaa95df6..bec103137 100644 --- a/WHATSNEW +++ b/WHATSNEW @@ -1,4 +1,4 @@ -Changes from Ant 1.5.2 to current CVS version +Changes from Ant 1.5.3 to current CVS version ============================================= Changes that could break older environments: @@ -163,6 +163,8 @@ Other changes: * New filterreader . +* Support for HP's NonStop (Tandem) OS has been added. + Changes from Ant 1.5.2 to Ant 1.5.3 =================================== diff --git a/docs/manual/CoreTasks/chmod.html b/docs/manual/CoreTasks/chmod.html index 120bd1a3c..cc1aba279 100644 --- a/docs/manual/CoreTasks/chmod.html +++ b/docs/manual/CoreTasks/chmod.html @@ -9,7 +9,8 @@

Chmod

Description

-

Changes the permissions of a file or all files inside specified directories. Right now it has effect only under Unix. +

Changes the permissions of a file or all files inside specified +directories. Right now it has effect only under Unix or NonStop (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 @@ -102,7 +103,7 @@ below any directory named trial) writable for members of the same group on a UNIX system. In addition all files belonging to a FileSet with id other.shared.sources get the same permissions.

-

Copyright © 2000-2002 Apache Software Foundation. All rights +


Copyright © 2000-2003 Apache Software Foundation. All rights Reserved.

diff --git a/docs/manual/CoreTasks/conditions.html b/docs/manual/CoreTasks/conditions.html index b8465cf24..f99c88d8f 100644 --- a/docs/manual/CoreTasks/conditions.html +++ b/docs/manual/CoreTasks/conditions.html @@ -92,6 +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)
  • win9x for Microsoft Windows 95 and 98
  • z/os for z/OS and OS/390
  • os/400 for OS/400
  • @@ -315,7 +316,7 @@ that is "true","yes", or "on"


    -

    Copyright © 2001-2002 Apache Software +

    Copyright © 2001-2003 Apache Software Foundation. All rights Reserved.

    diff --git a/docs/manual/CoreTasks/pathconvert.html b/docs/manual/CoreTasks/pathconvert.html index e49e2fe53..b9cd2f4bd 100644 --- a/docs/manual/CoreTasks/pathconvert.html +++ b/docs/manual/CoreTasks/pathconvert.html @@ -31,7 +31,7 @@ drive letters to Unix paths, and vice-versa.

    targetos The target architecture. Must be one of 'unix', 'windows', - 'netware' or 'os/2'. + 'netware', 'tandem' or 'os/2'. This is a shorthand mechanism for specifying both pathsep and dirsep according to the specified target architecture. @@ -176,7 +176,7 @@ list of files.


    -

    Copyright © 2001-2002 Apache Software Foundation. +

    Copyright © 2001-2003 Apache Software Foundation. All rights Reserved.

    diff --git a/src/main/org/apache/tools/ant/taskdefs/Chmod.java b/src/main/org/apache/tools/ant/taskdefs/Chmod.java index 4bd3cad0d..f8327cb75 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Chmod.java +++ b/src/main/org/apache/tools/ant/taskdefs/Chmod.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2000-2002 The Apache Software Foundation. All rights + * Copyright (c) 2000-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -255,6 +255,7 @@ public class Chmod extends ExecuteOn { } protected boolean isValidOs() { - return Os.isFamily("unix") && super.isValidOs(); + return (Os.isFamily("unix") || Os.isFamily("tandem")) + && 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 f9d94e9b6..8f96009af 100644 --- a/src/main/org/apache/tools/ant/taskdefs/Execute.java +++ b/src/main/org/apache/tools/ant/taskdefs/Execute.java @@ -232,6 +232,10 @@ public class Execute { } else if (Os.isFamily("z/os")) { String[] cmd = {"/bin/env"}; return cmd; + } else if (Os.isFamily("tandem")) { +// String[] cmd = {"/bin/sh -c env"}; + String[] cmd = {"/bin/env"}; + return cmd; } else if (Os.isFamily("unix")) { // Generic UNIX // Alternatively one could use: /bin/sh -c env diff --git a/src/main/org/apache/tools/ant/taskdefs/PathConvert.java b/src/main/org/apache/tools/ant/taskdefs/PathConvert.java index 77ea7d4a9..86a4c50c5 100644 --- a/src/main/org/apache/tools/ant/taskdefs/PathConvert.java +++ b/src/main/org/apache/tools/ant/taskdefs/PathConvert.java @@ -1,7 +1,7 @@ /* * The Apache Software License, Version 1.1 * - * Copyright (c) 2001-2002 The Apache Software Foundation. All rights + * Copyright (c) 2001-2003 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without @@ -202,7 +202,7 @@ public class PathConvert extends Task { */ public static class TargetOs extends EnumeratedAttribute { public String[] getValues() { - return new String[]{"windows", "unix", "netware", "os/2"}; + return new String[]{"windows", "unix", "netware", "os/2", "tandem"}; } } @@ -269,7 +269,7 @@ public class PathConvert extends Task { // validateSetup code, the same assumptions can be made as // with windows - that ; is the path separator - targetWindows = !targetOS.equals("unix"); + targetWindows = !targetOS.equals("unix") && !targetOS.equals("tandem"); } /** diff --git a/src/main/org/apache/tools/ant/taskdefs/condition/Os.java b/src/main/org/apache/tools/ant/taskdefs/condition/Os.java index a0fd1828e..5106f4d63 100644 --- a/src/main/org/apache/tools/ant/taskdefs/condition/Os.java +++ b/src/main/org/apache/tools/ant/taskdefs/condition/Os.java @@ -95,6 +95,7 @@ public class Os implements Condition { *
  • mac
  • *
  • netware
  • *
  • os/2
  • + *
  • tandem
  • *
  • unix
  • *
  • windows
  • *
  • win9x
  • @@ -214,6 +215,8 @@ public class Os implements Condition { isFamily = pathSep.equals(";") && !isFamily("netware"); } else if (family.equals("mac")) { isFamily = osName.indexOf("mac") > -1; + } else if (family.equals("tandem")) { + isFamily = osName.indexOf("nonstop_kernel") > -1; } else if (family.equals("unix")) { isFamily = pathSep.equals(":") && (!isFamily("mac") || osName.endsWith("x"));