get:
Show a patch.

patch:
Update a patch.

put:
Update a patch.

GET /api/patches/245/?format=api
HTTP 200 OK
Allow: GET, PUT, PATCH, HEAD, OPTIONS
Content-Type: application/json
Vary: Accept

{
    "id": 245,
    "url": "http://patchwork.ozlabs.org/api/patches/245/?format=api",
    "web_url": "http://patchwork.ozlabs.org/project/cbe-oss-dev/patch/48C972EE.5060804@am.sony.com/",
    "project": {
        "id": 1,
        "url": "http://patchwork.ozlabs.org/api/projects/1/?format=api",
        "name": "Cell Broadband Engine development",
        "link_name": "cbe-oss-dev",
        "list_id": "cbe-oss-dev.ozlabs.org",
        "list_email": "cbe-oss-dev@ozlabs.org",
        "web_url": null,
        "scm_url": null,
        "webscm_url": null,
        "list_archive_url": "",
        "list_archive_url_format": "",
        "commit_url_format": ""
    },
    "msgid": "<48C972EE.5060804@am.sony.com>",
    "list_archive_url": null,
    "date": "2008-09-11T19:35:10",
    "name": "MARS: Build files cleanup",
    "commit_ref": null,
    "pull_url": null,
    "state": "new",
    "archived": false,
    "hash": "4069545be14b05347173e25958dcf5ef7a76fb37",
    "submitter": {
        "id": 127,
        "url": "http://patchwork.ozlabs.org/api/people/127/?format=api",
        "name": "Yuji Mano",
        "email": "yuji.mano@am.sony.com"
    },
    "delegate": {
        "id": 26,
        "url": "http://patchwork.ozlabs.org/api/users/26/?format=api",
        "username": "ymano",
        "first_name": "Yuji",
        "last_name": "Mano",
        "email": "yuji.mano@am.sony.com"
    },
    "mbox": "http://patchwork.ozlabs.org/project/cbe-oss-dev/patch/48C972EE.5060804@am.sony.com/mbox/",
    "series": [],
    "comments": "http://patchwork.ozlabs.org/api/patches/245/comments/",
    "check": "pending",
    "checks": "http://patchwork.ozlabs.org/api/patches/245/checks/",
    "tags": {},
    "related": [],
    "headers": {
        "Return-Path": "<cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org>",
        "X-Original-To": [
            "patchwork@ozlabs.org",
            "cbe-oss-dev@ozlabs.org"
        ],
        "Delivered-To": [
            "patchwork@ozlabs.org",
            "cbe-oss-dev@ozlabs.org"
        ],
        "Received": [
            "from ozlabs.org (localhost [127.0.0.1])\n\tby ozlabs.org (Postfix) with ESMTP id 55C42DE4B4\n\tfor <patchwork@ozlabs.org>; Fri, 12 Sep 2008 06:39:12 +1000 (EST)",
            "from IE1EHSOBE002.bigfish.com (outbound-dub.frontbridge.com\n\t[213.199.154.16]) by ozlabs.org (Postfix) with ESMTP id 7C378DE38E\n\tfor <cbe-oss-dev@ozlabs.org>; Fri, 12 Sep 2008 06:37:22 +1000 (EST)",
            "from mail5-dub-R.bigfish.com (10.5.252.3) by\n\tIE1EHSOBE002.bigfish.com (10.5.252.22) with Microsoft SMTP Server id\n\t8.1.291.1; Thu, 11 Sep 2008 20:37:21 +0000",
            "from mail5-dub (localhost.localdomain [127.0.0.1])\tby\n\tmail5-dub-R.bigfish.com (Postfix) with ESMTP id EF85222010D\tfor\n\t<cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:20 +0000 (UTC)",
            "by mail5-dub (MessageSwitch) id 1221165434545769_3026; Thu, 11 Sep\n\t2008 20:37:14 +0000 (UCT)",
            "from mail8.fw-sd.sony.com (mail8.fw-sd.sony.com [160.33.66.75])\tby\n\tmail5-dub.bigfish.com (Postfix) with ESMTP id AFDAF7B0081\tfor\n\t<cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:13 +0000 (UTC)",
            "from mail3.sjc.in.sel.sony.com (mail3.sjc.in.sel.sony.com\n\t[43.134.1.211])\tby mail8.fw-sd.sony.com (8.14.2/8.14.2) with ESMTP id\n\tm8BKbC0B021206\tfor <cbe-oss-dev@ozlabs.org>;\n\tThu, 11 Sep 2008 20:37:12 GMT",
            "from USSDIXIM01.am.sony.com (ussdixim01.am.sony.com\n\t[43.130.140.33])\n\tby mail3.sjc.in.sel.sony.com (8.12.11/8.12.11) with ESMTP id\n\tm8BKbBHo021782\n\tfor <cbe-oss-dev@ozlabs.org>; Thu, 11 Sep 2008 20:37:12 GMT",
            "from ussdixms03.am.sony.com ([43.130.140.23]) by\n\tUSSDIXIM01.am.sony.com with Microsoft SMTPSVC(5.0.2195.6713);\n\tThu, 11 Sep 2008 13:37:11 -0700",
            "from [43.135.148.175] ([43.135.148.175]) by ussdixms03.am.sony.com\n\twith Microsoft SMTPSVC(5.0.2195.6713);\n\tThu, 11 Sep 2008 13:37:10 -0700"
        ],
        "X-BigFish": "VS-25(zz541L1417L9370P936eQ936fQ34f5jzz10c0j10d3izz2b68k1497iz2dh6bh61h)",
        "X-Spam-TCS-SCL": "0:0",
        "Message-ID": "<48C972EE.5060804@am.sony.com>",
        "Date": "Thu, 11 Sep 2008 12:35:10 -0700",
        "From": "Yuji Mano <yuji.mano@am.sony.com>",
        "User-Agent": "Thunderbird 2.0.0.5 (X11/20070719)",
        "MIME-Version": "1.0",
        "To": "CBE Development <cbe-oss-dev@ozlabs.org>",
        "X-Enigmail-Version": "0.95.7",
        "X-OriginalArrivalTime": "11 Sep 2008 20:37:10.0522 (UTC)\n\tFILETIME=[2A3A05A0:01C9144E]",
        "X-SEL-encryption-scan": "scanned",
        "Subject": "[Cbe-oss-dev] [PATCH 10/11]MARS: Build files cleanup",
        "X-BeenThere": "cbe-oss-dev@ozlabs.org",
        "X-Mailman-Version": "2.1.11",
        "Precedence": "list",
        "List-Id": "Discussion about Open Source Software for the Cell Broadband Engine\n\t<cbe-oss-dev.ozlabs.org>",
        "List-Unsubscribe": "<https://ozlabs.org/mailman/options/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=unsubscribe>",
        "List-Archive": "<http://ozlabs.org/pipermail/cbe-oss-dev>",
        "List-Post": "<mailto:cbe-oss-dev@ozlabs.org>",
        "List-Help": "<mailto:cbe-oss-dev-request@ozlabs.org?subject=help>",
        "List-Subscribe": "<https://ozlabs.org/mailman/listinfo/cbe-oss-dev>,\n\t<mailto:cbe-oss-dev-request@ozlabs.org?subject=subscribe>",
        "Content-Type": "text/plain; charset=\"us-ascii\"",
        "Content-Transfer-Encoding": "7bit",
        "Sender": "cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org",
        "Errors-To": "cbe-oss-dev-bounces+patchwork=ozlabs.org@ozlabs.org"
    },
    "content": "From: Geoff Levand <geoffrey.levand@am.sony.com>\n\nCleanup build files:\n o Use the git revision in default package version.\n o Add configure option --with-mars-platform to support platform\n   specific builds.\n o Move embedspu from mpu makefile to host makefile.\n o Add makefile variable MARS_KERNEL.\n o Change default prefix from /usr to /usr/local.\n o Remove 'host_alias=spu' hack with top level configure logic.\n o Remove unneeded Makefile.am files.\n o Remove unneeded files config.sub.patch, VERSION.\n o Update README file.\n\nSigned-off-by: Geoff Levand <geoffrey.levand@am.sony.com>\nAcked-by: Kazunori Asayama <asayama@sm.sony.co.jp>",
    "diff": "--- a/Makefile.am\n+++ b/Makefile.am\n@@ -36,15 +36,8 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n-SUBDIRS = include src\n+SUBDIRS = src/mpu src/host/lib\n \n-EXTRA_DIST = \\\n-\tbootstrap \\\n-\tconfigure.ac.in \\\n-\tconfig.sub.patch \\\n-\tCOPYING \\\n-\tINSTALL \\\n-\tREADME \\\n-\tVERSION\n+EXTRA_DIST = bootstrap configure.ac.in\n \n MAINTAINERCLEANFILES = Makefile.in\n--- a/README\n+++ b/README\n@@ -37,24 +37,14 @@\n \n MARS Library README\n \n-Index\n-=====\n-\t* Overview\n-\t* Building Source\n-\t* Installing Library\n-\t* Using Library\n-\n-\n Overview\n ========\n-The MARS (Multicore Application Runtime System) provides an API to easily manage\n+\n+The MARS (Multicore Application Runtime System) provides an API to manage\n and create user programs that will be scheduled to run on various MPUs of a\n multicore-core environment with minimal runtime support required of the host.\n \n-For more specific details, please refer to the MARS Reference Manual\n-documentation that is generated from the build.\n-\n-/mars-lib\n+/mars\n |\n |---/include\t\tInclude directory\n |   |\n@@ -81,54 +71,35 @@ documentation that is generated from the\n \n Building Source\n ================\n-Run configure and make\n-----------------------\n-To build the MARS library source, you need to first run ./configure from the\n-top-level directory, and then do a ./make. The build supports both native and\n-cross compiling.\n-\n-You need to specify whether you are building libraries for a 32-bit host or\n-64-bit host.\n-\n-32-bit host\n----------------------\n-[mars-lib]$ ./configure --host=ppu --libdir=\"/usr/lib\"\n-[mars-lib]$ make HOST_FLAGS=-m32\n-\n-64-bit host\n----------------------\n-[mars-lib]$ ./configure --host=ppu --libdir=\"/usr/lib64\"\n-[mars-lib]$ make HOST_FLAGS=-m64\n-\n-The '--libdir' option to './configure' specifies the target directory to where\n-the compiled libraries will be installed. Make sure to specify the correct path\n-to the target userland path when doing a cross compile.\n-\n-\n-Installing Library\n-==================\n-After building of the library is complete, you need to install the library to\n-the system standard paths. As an alternative you can also choose to install the\n-library using the RPMs explained in the previous section.\n-\n-[mars-lib]$ make install\n-\n-When installation is complete, the MARS library files can be found in the\n-following locations:\n-\n-MARS host includes:\t/usr/include\n-MARS host libraries:\t/usr/lib or /usr/lib64\n-MARS MPU includes:\t/usr/mpu/include\n-MARS MPU libraries:\t/usr/mpu/lib\n \n+* See the source file INSTALL for generic build info.\n \n-Using Library\n-=============\n-Using the library is a matter of including the MARS library headers in your\n-programs and linking the appropriate MARS library and C runtime.\n+* The configure scripts require the option --with-mars-platform.  Currently,\n+only the Cell Broadband Engine (--with-mars-platfrom=cell) is supported.\n \n-For more information regarding MARS library usage, please refer to the MARS Docs\n-package.\n+* Use the prefixes PPU_ and SPU_ on command line variables to the top level\n+configure to specify variables for the different Cell toolchains.\n \n-For sample code that shows usage of the MARS library, please refer to the MARS\n-Samples package.\n+* When building 64-bit libraries for a powerpc host it is customary to use\n+the --libdir configure option to install the libraries in a EPREFIX/lib64\n+directory.  Run configure with the --help option for more info.\n+\n+For example, when using the Cell SDK toolchains use options similar to these:\n+\n+32-bit powerpc host\n+-------------------\n+  ./configure \\\n+    --with-mars-platform=cell \\\n+    PPU_EMBEDSPU=ppu-embedspu \\\n+    PPU_CC=ppu-gcc PPU_CFLAGS=\"-O3 -funroll-loops -m32\" \\\n+    SPU_CC=spu-gcc SPU_CFLAGS=\"-O3 -funroll-loops\"\n+\n+64-bit powerpc host\n+-------------------\n+  ./configure \\\n+    --libdir=\"/usr/lib64\" \\\n+    --with-mars-platform=cell \\\n+    PPU_EMBEDSPU=ppu-embedspu \\\n+    PPU_CC=ppu-gcc PPU_CFLAGS=\"-O3 -funroll-loops -m64\" \\\n+    SPU_CC=spu-gcc SPU_CFLAGS=\"-O3 -funroll-loops\"\n+\n--- a/VERSION\n+++ /dev/null\n@@ -1,2 +0,0 @@\n-0.9.2\n-\n--- a/bootstrap\n+++ b/bootstrap\n@@ -37,33 +37,54 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n-if [ $VERSION ]; then\n-\tversion=$VERSION\n-\techo \"VERSION =\" $version\n-elif [ -f VERSION ]; then\n-\tversion=`cat VERSION`\n-\techo \"VERSION =\" $version\n+version=\n+\n+if [ \"$1\" ]; then\n+\tversion=$1\n+elif head=$(git rev-parse --short --verify HEAD 2>/dev/null); then\n+\n+\t# If available, use the git commit revision for the package version.\n+\n+\tmonths=\"Jan:01 Feb:02 Mar:03 Apr:04 May:05 Jun:06 Jul:07 Aug:08 \\\n+\t\tSep:09 Oct:10 Nov:11 Dec:12\"\n+\n+\t# Add a date prefix for easy reading.\n+\n+\tdate=$(git-log --pretty=format:\"%cD\" -1 HEAD)\n+\n+\t# date='Fri, 2 Aug 2007 19:36:06 -0700'\n+\n+\tdate=${date##*, }\n+\tdate=${date% [0-9][0-9]:*}\n+\tday=${date%* [A-Z][a-z][a-z] *}\n+\tyear=${date##* [A-Z][a-z][a-z] 20}\n+\tmonth=${date##${day} }\n+\tmonth=${month%% 20${year}}\n+\tmonth=${months##*${month}:}\n+\tmonth=${month%% *}\n+\t[ ! ${day#[0-9][0-9]} ] || day=\"0$day\"\n+\n+\tversion=$(printf '%s.%s.%s-%s%s' ${year} ${month} ${day} g ${head})\n+\n+\t# Add a '-dirty' postfix for uncommitted changes.\n+\n+\tif git diff-index HEAD | read dummy; then\n+\t\tversion=`printf '%s%s' ${version} -dirty`\n+\tfi\n else\n-\tversion=\"\"\n-\techo \"No VERSION file found!\"\n+\t# Default to date and time.\n+\n+\tversion=\"dev-$(date +%y.%m.%d-%H.%M.%S)\"\n fi\n \n-version_maj=$(echo ${version} | sed -e 's/\\.[0-9.]*//')\n-version_min=$(echo ${version} | sed -e 's/^[0-9]*\\.//' | sed -e 's/\\.[0-9]*$//')\n-version_rev=$(echo ${version} | sed -e 's/[0-9.]*\\.//')\n+set -x\n \n-sed -e s,@version@,${version},g \\\n-\tconfigure.ac.in > configure.ac\n+sed -e s,@version@,${version},g configure.ac.in > configure.ac\n \n aclocal\n-libtoolize --force --copy\n autoheader\n automake --foreign --add-missing --copy\n autoconf\n \n-pushd src/host && ./bootstrap $version && popd\n-pushd src/mpu && ./bootstrap $version && popd\n-\n-if [ -e config.sub ]; then\n-\tpatch -p1 < config.sub.patch\n-fi\n+pushd src/mpu > /dev/null && ./bootstrap ${version} && popd > /dev/null\n+pushd src/host > /dev/null && ./bootstrap ${version} && popd > /dev/null\n--- a/config.sub.patch\n+++ /dev/null\n@@ -1,24 +0,0 @@\n---- a/config.sub\t2005-11-22 05:18:02.000000000 -0800\n-+++ b/config.sub\t2006-07-11 12:09:36.000000000 -0700\n-@@ -816,6 +816,10 @@\n- \tppc64le-* | powerpc64little-*)\n- \t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n- \t\t;;\n-+\tppu)\n-+\t\tbasic_machine=powerpc64-cell\n-+\t\tos=-linux\n-+\t\t;;\n- \tps2)\n- \t\tbasic_machine=i386-ibm\n- \t\t;;\n-@@ -868,6 +872,10 @@\n- \tspur)\n- \t\tbasic_machine=spur-unknown\n- \t\t;;\n-+\tspu)\n-+\t\tbasic_machine=spu-cell\n-+\t\tos=-none\n-+\t\t;;\n- \tst2000)\n- \t\tbasic_machine=m68k-tandem\n- \t\t;;\n--- a/configure.ac.in\n+++ b/configure.ac.in\n@@ -36,28 +36,89 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n-AC_INIT(mars, @version@, Yuji Mano <yuji.mano@am.sony.com>)\n+AC_INIT([mars], [@version@], [MARS <cbe-oss-dev@ozlabs.org>])\n \n-AC_PREFIX_DEFAULT(/usr)\n+AC_PREFIX_DEFAULT([/usr])\n+\n+AC_ARG_WITH([mars-platform],\n+\t[AS_HELP_STRING([--with-mars-platform=TYPE],\n+\t\t[specify mars platform TYPE (cell | spursengine)])],\n+\t[],\n+\t[AC_MSG_ERROR([missing option --with-mars-platform=])])\n+AS_CASE([${with_mars_platform}],\n+\t[cell],[],\n+\t[spursengine],[],\n+\t[AC_MSG_ERROR([invalid option --with-mars-platform=${with_mars_platform}])])\n+AM_CONDITIONAL([MARS_PLATFORM_CELL],\n+\t[test \"x${with_mars_platform}\" = \"xcell\"])\n+AM_CONDITIONAL([MARS_PLATFORM_SPURSENGINE],\n+\t[test \"x${with_mars_platform}\" = \"xspursengine\"])\n+AC_MSG_RESULT([using mars-platform ${with_mars_platform}])\n+\n+AC_ARG_ENABLE(\n+\t[debug],\n+\t[AS_HELP_STRING([--enable-debug], [build debug versions of mars])])\n+AM_CONDITIONAL([DEBUG], [test \"x${enable_debug}\" = \"xyes\"])\n+AC_MSG_RESULT([using enable-debug ${enable_debug}])\n+\n+AC_CONFIG_AUX_DIR([.])\n+\n+AM_INIT_AUTOMAKE\n+AC_SUBST([DESTDIR])\n+AC_CONFIG_HEADERS([config.h])\n+AC_CONFIG_FILES([Makefile])\n+\n+mars_args_host=\n+mars_args_prefix=\n+mars_args_libdir=\n+mars_args_other=\n \n if test \"x${prefix}\" = \"xNONE\"; then\n \tprefix=$ac_default_prefix\n-\tac_configure_args=\"$ac_configure_args --prefix $prefix\"\n+\tac_configure_args=\"$ac_configure_args '--prefix=$prefix'\"\n fi\n \n-AM_INIT_AUTOMAKE\n-AC_PROG_LIBTOOL\n-\n-AC_CONFIG_HEADERS(config.h)\n-AC_CONFIG_FILES([\n-\tMakefile\n-\tinclude/Makefile\n-\tsrc/Makefile\n-])\n-\n-AC_CONFIG_SUBDIRS([\n-\tsrc/host\n-\tsrc/mpu\n-])\n+for a in $ac_configure_args; do\n+\tcase ${a} in\n+\t\\'--host=*\\' )\n+\t\tmars_args_host=${a}\n+\t\t;;\n+\t\\'--prefix=*\\' )\n+\t\tmars_args_prefix=${a}\n+\t\t;;\n+\t\\'--libdir=*\\' )\n+\t\tmars_args_libdir=${a}\n+\t\t;;\n+\t\\'host_alias=*\\' )\n+\t\t# ignore\n+\t\t;;\n+\t* )\n+\t\tmars_arg_other=\"${mars_arg_other} ${a}\"\n+\t\t;;\n+\tesac\n+done\n+\n+mars_args_prefix_spu=`echo \"$mars_args_prefix\" | sed 's,'\\''$,/spu'\\'',g'`\n+mars_args_libdir_spu=`echo \"$mars_args_prefix\" | sed 's,'\\''$,/spu/lib'\\'',g' | sed 's,--prefix,--libdir,g'`\n+\n+mars_args_ppu=`echo \"$mars_arg_other\" | sed 's,'\\''PPU_,'\\'',g'`\n+mars_args_ppu=\"$mars_args_ppu $mars_args_prefix $mars_args_libdir $mars_args_host\"\n+\n+mars_args_spu=`echo \"$mars_arg_other\" | sed 's,'\\''SPU_,'\\'',g'`\n+mars_args_spu=\"$mars_args_spu $mars_args_prefix_spu $mars_args_libdir_spu --host=spu\"\n+\n+AC_MSG_RESULT([using mars_srcdir $ac_abs_confdir])\n+AC_MSG_RESULT([using mars_builddir $ac_pwd])\n+\n+echo \"mars_args_ppu=@$mars_args_ppu@\"\n+echo \"mars_args_spu=@$mars_args_spu@\"\n+\n+mkdir -p ${ac_pwd}/src/mpu\n+pushd ${ac_pwd}/src/mpu > /dev/null && \\\n+\teval \"${ac_abs_confdir}/src/mpu/configure $mars_args_spu\"; popd\n+\n+mkdir -p ${ac_pwd}/src/host\n+pushd ${ac_pwd}/src/host > /dev/null && \\\n+\teval \"${ac_abs_confdir}/src/host/configure $mars_args_ppu\" ; popd\n \n AC_OUTPUT\n--- a/include/Makefile.am\n+++ /dev/null\n@@ -1,88 +0,0 @@\n-## Makefile.am -- Process this file with automake to produce Makefile.in\n-#\n-#  Copyright 2008 Sony Corporation of America\n-#\n-#\n-#  Permission is hereby granted, free of charge, to any person obtaining\n-#  a copy of this Library and associated documentation files (the\n-#  \"Library\"), to deal in the Library without restriction, including\n-#  without limitation the rights to use, copy, modify, merge, publish,\n-#  distribute, sublicense, and/or sell copies of the Library, and to\n-#  permit persons to whom the Library is furnished to do so, subject to\n-#  the following conditions:\n-#\n-#   The above copyright notice and this permission notice shall be\n-#   included in all copies or substantial portions of the Library.\n-#\n-#   If you modify the Library, you may copy and distribute your modified\n-#   version of the Library in object code or as an executable provided\n-#   that you also do one of the following:\n-#\n-#    Accompany the modified version of the Library with the complete\n-#    corresponding machine-readable source code for the modified version\n-#    of the Library; or,\n-#\n-#    Accompany the modified version of the Library with a written offer\n-#    for a complete machine-readable copy of the corresponding source\n-#    code of the modified version of the Library.\n-#\n-#\n-#  THE LIBRARY IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-#  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-#  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n-#  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n-#  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n-#  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n-#\n-\n-MAINTAINERCLEANFILES = Makefile.in\n-\n-hostdir = $(prefix)/include/mars\n-mpudir = $(prefix)/spu/include/mars\n-\n-host_HEADERS = \\\n-\tcommon/mars/mars_error.h \\\n-\tcommon/mars/mars_mutex_types.h \\\n-\tcommon/mars/mars_task_types.h \\\n-\tcommon/mars/mars_task_barrier_types.h \\\n-\tcommon/mars/mars_task_event_flag_types.h \\\n-\tcommon/mars/mars_task_queue_types.h \\\n-\tcommon/mars/mars_task_semaphore_types.h \\\n-\thost/mars/mars.h \\\n-\thost/mars/mars_context.h \\\n-\thost/mars/mars_mutex.h \\\n-\thost/mars/mars_task.h \\\n-\thost/mars/mars_task_barrier.h \\\n-\thost/mars/mars_task_event_flag.h \\\n-\thost/mars/mars_task_queue.h \\\n-\thost/mars/mars_task_semaphore.h \\\n-\thost/mars/mars_task_signal.h\n-\n-mpu_HEADERS = \\\n-\tcommon/mars/mars_error.h \\\n-\tcommon/mars/mars_mutex_types.h \\\n-\tcommon/mars/mars_task_types.h \\\n-\tcommon/mars/mars_task_barrier_types.h \\\n-\tcommon/mars/mars_task_event_flag_types.h \\\n-\tcommon/mars/mars_task_queue_types.h \\\n-\tcommon/mars/mars_task_semaphore_types.h \\\n-\tmpu/mars/mars.h \\\n-\tmpu/mars/mars_mutex.h \\\n-\tmpu/mars/mars_task.h \\\n-\tmpu/mars/mars_task_barrier.h \\\n-\tmpu/mars/mars_task_event_flag.h \\\n-\tmpu/mars/mars_task_queue.h \\\n-\tmpu/mars/mars_task_semaphore.h \\\n-\tmpu/mars/mars_task_signal.h\n-\n-EXTRA_DIST = \\\n-\tcommon/mars/mars_debug.h \\\n-\tcommon/mars/mars_kernel_types.h \\\n-\tcommon/mars/mars_workload_types.h \\\n-\thost/mars/mars_timer.h \\\n-\thost/mars/mars_workload_queue.h \\\n-\tmpu/mars/mars_dma.h \\\n-\tmpu/mars/mars_kernel.h \\\n-\tmpu/mars/mars_timer.h \\\n-\tmpu/mars/mars_syscalls.h\n--- a/src/Makefile.am\n+++ /dev/null\n@@ -1,41 +0,0 @@\n-## Makefile.am -- Process this file with automake to produce Makefile.in\n-#\n-#  Copyright 2008 Sony Corporation of America\n-#\n-#\n-#  Permission is hereby granted, free of charge, to any person obtaining\n-#  a copy of this Library and associated documentation files (the\n-#  \"Library\"), to deal in the Library without restriction, including\n-#  without limitation the rights to use, copy, modify, merge, publish,\n-#  distribute, sublicense, and/or sell copies of the Library, and to\n-#  permit persons to whom the Library is furnished to do so, subject to\n-#  the following conditions:\n-#\n-#   The above copyright notice and this permission notice shall be\n-#   included in all copies or substantial portions of the Library.\n-#\n-#   If you modify the Library, you may copy and distribute your modified\n-#   version of the Library in object code or as an executable provided\n-#   that you also do one of the following:\n-#\n-#    Accompany the modified version of the Library with the complete\n-#    corresponding machine-readable source code for the modified version\n-#    of the Library; or,\n-#\n-#    Accompany the modified version of the Library with a written offer\n-#    for a complete machine-readable copy of the corresponding source\n-#    code of the modified version of the Library.\n-#\n-#\n-#  THE LIBRARY IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND,\n-#  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n-#  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\n-#  IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\n-#  CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\n-#  TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n-#  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n-#\n-\n-SUBDIRS = mpu host\n-\n-MAINTAINERCLEANFILES = Makefile.in\n--- a/src/host/bootstrap\n+++ b/src/host/bootstrap\n@@ -39,15 +39,10 @@\n \n version=\"$1\"\n \n-sed -e s,@version@,${version},g \\\n-\tconfigure.ac.in > configure.ac\n+sed -e s,@version@,${version},g configure.ac.in > configure.ac\n \n aclocal\n libtoolize --force --copy\n autoheader\n automake --foreign --add-missing --copy\n autoconf\n-\n-if [ -e config.sub ]; then\n-\tpatch -p1 < config.sub.patch\n-fi\n--- a/src/host/config.sub.patch\n+++ /dev/null\n@@ -1,24 +0,0 @@\n---- a/config.sub\t2005-11-22 05:18:02.000000000 -0800\n-+++ b/config.sub\t2006-07-11 12:09:36.000000000 -0700\n-@@ -816,6 +816,10 @@\n- \tppc64le-* | powerpc64little-*)\n- \t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n- \t\t;;\n-+\tppu)\n-+\t\tbasic_machine=powerpc64-cell\n-+\t\tos=-linux\n-+\t\t;;\n- \tps2)\n- \t\tbasic_machine=i386-ibm\n- \t\t;;\n-@@ -868,6 +872,10 @@\n- \tspur)\n- \t\tbasic_machine=spur-unknown\n- \t\t;;\n-+\tspu)\n-+\t\tbasic_machine=spu-cell\n-+\t\tos=-none\n-+\t\t;;\n- \tst2000)\n- \t\tbasic_machine=m68k-tandem\n- \t\t;;\n--- a/src/host/configure.ac.in\n+++ b/src/host/configure.ac.in\n@@ -36,20 +36,37 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n-AC_INIT(host, @version@, Yuji Mano <yuji.mano@am.sony.com>)\n+AC_INIT([mars], [@version@], [MARS <cbe-oss-dev@ozlabs.org>])\n \n-host_alias=ppu\n-AC_SUBST(host_alias)\n+AC_ARG_WITH([mars-platform],\n+\t[AS_HELP_STRING([--with-mars-platform=TYPE],\n+\t\t[specify mars platform TYPE (cell | spursengine)])],\n+\t[],\n+\t[AC_MSG_ERROR([missing option --with-mars-platform=])])\n+AS_CASE([${with_mars_platform}],\n+\t[cell],[],\n+\t[spursengine],[],\n+\t[AC_MSG_ERROR([invalid option --with-mars-platform=${with_mars_platform}])])\n+AM_CONDITIONAL([MARS_PLATFORM_CELL],\n+\t[test \"x${with_mars_platform}\" = \"xcell\"])\n+AM_CONDITIONAL([MARS_PLATFORM_SPURSENGINE],\n+\t[test \"x${with_mars_platform}\" = \"xspursengine\"])\n+AC_MSG_RESULT([using mars-platform ${with_mars_platform}])\n+\n+AC_ARG_ENABLE(\n+\t[debug],\n+\t[AS_HELP_STRING([--enable-debug], [build debug versions of mars])])\n+AM_CONDITIONAL([DEBUG], [test \"x${enable_debug}\" = \"xyes\"])\n+AC_MSG_RESULT([using enable-debug ${enable_debug}])\n \n AC_CONFIG_AUX_DIR([.])\n \n+AC_CHECK_TARGET_TOOL([EMBEDSPU], [embedspu], [embedspu-not-found])\n+\n AC_PROG_LIBTOOL\n AM_INIT_AUTOMAKE\n-\n-AC_CONFIG_HEADERS(config.h)\n-AC_CONFIG_FILES([\n-\tMakefile\n-\tlib/Makefile\n-])\n+AC_SUBST([DESTDIR])\n+AC_CONFIG_HEADERS([config.h])\n+AC_CONFIG_FILES([Makefile lib/Makefile])\n \n AC_OUTPUT\n--- a/src/host/lib/Makefile.am\n+++ b/src/host/lib/Makefile.am\n@@ -36,16 +36,61 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n+extra_cppflags =\n+extra_cflags =\n+extra_ldflags =\n+\n+MARS_KERNEL = ${top_builddir}/../mpu/kernel/mars-kernel\n+\n+if DEBUG\n+ extra_cppflags += \"-DDEBUG\"\n+else\n+ extra_cppflags += \"-DNDEBUG\"\n+endif\n+\n+if MARS_PLATFORM_CELL\n+endif\n+\n+if MARS_PLATFORM_SPURSENGINE\n+endif\n+\n+EXTRA_DIST = bootstrap configure.ac.in\n+\n MAINTAINERCLEANFILES = Makefile.in\n \n-lib_LTLIBRARIES = libmars.la\n+pkginclude_HEADERS = \\\n+\t$(srcdir)/../../../include/common/mars/mars_error.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_mutex_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_barrier_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_event_flag_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_queue_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_semaphore_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_types.h \\\n+\t$(srcdir)/../../../include/host/mars/mars.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_context.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_mutex.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task_barrier.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task_event_flag.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task_queue.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task_semaphore.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_task_signal.h\n+\n+EXTRA_DIST += \\\n+\t$(srcdir)/../../../include/host/mars/mars_timer.h \\\n+\t$(srcdir)/../../../include/host/mars/mars_workload_queue.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_debug.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_kernel_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_workload_types.h\n \n-libmars_la_CPPFLAGS = \\\n+AM_CPPFLAGS = \\\n+\t$(extra_cppflags) \\\n \t-I$(srcdir)/../../../include/host \\\n \t-I$(srcdir)/../../../include/common\n \n-libmars_la_CFLAGS = \\\n-\t$(HOST_FLAGS)\n+AM_CFLAGS = \\\n+\t$(extra_cflags) \\\n+\t-W \\\n \t-Wall \\\n \t-Wunused \\\n \t-Winline \\\n@@ -54,19 +99,10 @@ libmars_la_CFLAGS = \\\n \t-Wmissing-prototypes \\\n \t-Wmissing-declarations\n \n-# version-info rules (current:revision:age):\n-# * If the library source code has changed since the last release, then\n-#   increment revision.\n-# * If any interfaces have been added, removed, or changed since the\n-#   last release, then increment current and set revision to 0.\n-# * If any interfaces have been added since the last release, then\n-#   increment age.\n-# * If any interfaces have been removed since the last release, then\n-#   set age to 0.\n+AM_LDFLAGS = \\\n+\t$(extra_ldflags)\n \n-libmars_la_LDFLAGS = \\\n-\t-version-info 0:0:0 \\\n-\t-Wl,../../mpu/kernel/mars_kernel.eo\n+lib_LTLIBRARIES = libmars.la\n \n libmars_la_SOURCES = \\\n \tmars_context.c \\\n@@ -78,3 +114,27 @@ libmars_la_SOURCES = \\\n \tmars_task_queue.c \\\n \tmars_task_semaphore.c \\\n \tmars_task_signal.c\n+\n+libmars_la_DEPENDENCIES = mars-kernel.eo\n+\n+# library version-info rules (current:revision:age):\n+# * If the library source code has changed since the last release, then\n+#   increment revision.\n+# * If any interfaces have been added, removed, or changed since the\n+#   last release, then increment current and set revision to 0.\n+# * If any interfaces have been added since the last release, then\n+#   increment age.\n+# * If any interfaces have been removed since the last release, then\n+#   set age to 0.\n+\n+libmars_la_LDFLAGS = \\\n+\t-version-info 0:0:0 \\\n+\t-Wl,-Map -Wl,$@.map -Wl,--cref \\\n+\t-Wl,mars-kernel.eo\n+\n+libmars_la_LIBADD = -lspe2\n+\n+mars-kernel.eo: ${MARS_KERNEL}\n+\t$(EMBEDSPU) $(CFLAGS) mars_kernel_entry  $< $@\n+\n+CLEANFILES = *.eo *.map\n--- a/src/mpu/Makefile.am\n+++ b/src/mpu/Makefile.am\n@@ -38,9 +38,6 @@\n \n SUBDIRS = lib kernel\n \n-EXTRA_DIST = \\\n-\tbootstrap \\\n-\tconfigure.ac.in \\\n-\tconfig.sub.patch\n+EXTRA_DIST = bootstrap configure.ac.in\n \n MAINTAINERCLEANFILES = Makefile.in\n--- a/src/mpu/bootstrap\n+++ b/src/mpu/bootstrap\n@@ -39,15 +39,10 @@\n \n version=\"$1\"\n \n-sed -e s,@version@,${version},g \\\n-\tconfigure.ac.in > configure.ac\n+sed -e s,@version@,${version},g configure.ac.in > configure.ac\n \n aclocal\n libtoolize --force --copy\n autoheader\n automake --foreign --add-missing --copy\n autoconf\n-\n-if [ -e config.sub ]; then\n-\tpatch -p1 < config.sub.patch\n-fi\n--- a/src/mpu/config.sub.patch\n+++ /dev/null\n@@ -1,24 +0,0 @@\n---- a/config.sub\t2005-11-22 05:18:02.000000000 -0800\n-+++ b/config.sub\t2006-07-11 12:09:36.000000000 -0700\n-@@ -816,6 +816,10 @@\n- \tppc64le-* | powerpc64little-*)\n- \t\tbasic_machine=powerpc64le-`echo $basic_machine | sed 's/^[^-]*-//'`\n- \t\t;;\n-+\tppu)\n-+\t\tbasic_machine=powerpc64-cell\n-+\t\tos=-linux\n-+\t\t;;\n- \tps2)\n- \t\tbasic_machine=i386-ibm\n- \t\t;;\n-@@ -868,6 +872,10 @@\n- \tspur)\n- \t\tbasic_machine=spur-unknown\n- \t\t;;\n-+\tspu)\n-+\t\tbasic_machine=spu-cell\n-+\t\tos=-none\n-+\t\t;;\n- \tst2000)\n- \t\tbasic_machine=m68k-tandem\n- \t\t;;\n--- a/src/mpu/configure.ac.in\n+++ b/src/mpu/configure.ac.in\n@@ -36,30 +36,36 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n-AC_INIT(mpu, @version@, Yuji Mano <yuji.mano@am.sony.com>)\n+AC_INIT([mars], [@version@], [MARS <cbe-oss-dev@ozlabs.org>])\n \n-host_alias=spu\n-AC_SUBST(host_alias)\n-\n-libdir=${prefix}/spu/lib\n-ac_configure_args=\"$ac_configure_args --libdir $libdir\"\n+AC_ARG_WITH([mars-platform],\n+\t[AS_HELP_STRING([--with-mars-platform=TYPE],\n+\t\t[specify mars platform TYPE (cell | spursengine)])],\n+\t[],\n+\t[AC_MSG_ERROR([missing option --with-mars-platform=])])\n+AS_CASE([${with_mars_platform}],\n+\t[cell],[],\n+\t[spursengine],[],\n+\t[AC_MSG_ERROR([invalid option --with-mars-platform=${with_mars_platform}])])\n+AM_CONDITIONAL([MARS_PLATFORM_CELL],\n+\t[test \"x${with_mars_platform}\" = \"xcell\"])\n+AM_CONDITIONAL([MARS_PLATFORM_SPURSENGINE],\n+\t[test \"x${with_mars_platform}\" = \"xspursengine\"])\n+AC_MSG_RESULT([using mars-platform ${with_mars_platform}])\n+\n+AC_ARG_ENABLE(\n+\t[debug],\n+\t[AS_HELP_STRING([--enable-debug], [build debug versions of mars])])\n+AM_CONDITIONAL([DEBUG], [test \"x${enable_debug}\" = \"xyes\"])\n+AC_MSG_RESULT([using enable-debug ${enable_debug}])\n \n AC_CONFIG_AUX_DIR([.])\n \n-AC_PROG_CC(spu-gcc)\n-AC_PROG_CXX(spu-g++)\n-AC_PROG_LD(spu-ld)\n-AM_PROG_AS(spu-as)\n-AC_PATH_TOOL(PPU_EMBEDSPU, ppu-embedspu)\n-\n AC_PROG_LIBTOOL\n AM_INIT_AUTOMAKE\n-\n-AC_CONFIG_HEADERS(config.h)\n-AC_CONFIG_FILES([\n-\tMakefile\n-\tkernel/Makefile\n-\tlib/Makefile\n-])\n+AM_PROG_AS\n+AC_SUBST([DESTDIR])\n+AC_CONFIG_HEADERS([config.h])\n+AC_CONFIG_FILES([Makefile lib/Makefile kernel/Makefile])\n \n AC_OUTPUT\n--- a/src/mpu/kernel/Makefile.am\n+++ b/src/mpu/kernel/Makefile.am\n@@ -36,15 +36,44 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n+extra_cppflags =\n+extra_cflags =\n+extra_ldflags =\n+\n+if DEBUG\n+ extra_cppflags += \"-DDEBUG\"\n+ # debug kernel is 64K\n+ extra_ldflags += -Wl,--defsym=__stack=0x0fff0\n+else\n+ extra_cppflags += \"-DNDEBUG\"\n+ # release kernel is 16K\n+ # ** todo **\n+ extra_ldflags += -Wl,--defsym=__stack=0x0fff0\n+endif\n+\n+if MARS_PLATFORM_CELL\n+endif\n+\n+if MARS_PLATFORM_SPURSENGINE\n+endif\n+\n MAINTAINERCLEANFILES = Makefile.in\n \n-noinst_PROGRAMS = mars_kernel mars_kernel.eo\n+EXTRA_DIST = \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_kernel.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_syscalls.h\n \n-mars_kernel_CPPFLAGS = \\\n+AM_CPPFLAGS = \\\n+\t$(extra_cppflags) \\\n \t-I$(srcdir)/../../../include/mpu \\\n \t-I$(srcdir)/../../../include/common\n \n-mars_kernel_CFLAGS = \\\n+AM_CCASFLAGS = \\\n+\t$(extra_cppflags)\n+\n+AM_CFLAGS = \\\n+\t$(extra_cflags) \\\n+\t-W \\\n \t-Wall \\\n \t-Wunused \\\n \t-Winline \\\n@@ -53,12 +82,15 @@ mars_kernel_CFLAGS = \\\n \t-Wmissing-prototypes \\\n \t-Wmissing-declarations\n \n-mars_kernel_LDFLAGS = \\\n-\t-Wl,--defsym=__stack=0x0fff0 \\\n+AM_LDFLAGS = \\\n+\t$(extra_ldflags) \\\n+\t-Wl,-Map -Wl,$@.map -Wl,--cref \\\n \t-Wl,-gc-sections \\\n \t-Wl,-N \\\n \t-Wl,-s\n \n+noinst_PROGRAMS = mars-kernel\n+\n mars_kernel_LDADD = $(builddir)/../lib/libmars.a\n \n mars_kernel_SOURCES = \\\n@@ -69,6 +101,4 @@ mars_kernel_SOURCES = \\\n \tmars_kernel_task.c \\\n \tmars_kernel_workload.c\n \n-mars_kernel_eo_SOURCES =\n-mars_kernel.eo: mars_kernel\n-\t$(PPU_EMBEDSPU) $(HOST_FLAGS) mars_kernel_entry mars_kernel mars_kernel.eo\n+CLEANFILES = *.map\n--- a/src/mpu/lib/Makefile.am\n+++ b/src/mpu/lib/Makefile.am\n@@ -36,15 +36,52 @@\n #  LIBRARY OR THE USE OR OTHER DEALINGS IN THE LIBRARY.\n #\n \n+extra_cppflags =\n+extra_cflags =\n+extra_ldflags =\n+\n+if DEBUG\n+ extra_cppflags += \"-DDEBUG\"\n+else\n+ extra_cppflags += \"-DNDEBUG\"\n+endif\n+\n+if MARS_PLATFORM_CELL\n+endif\n+\n+if MARS_PLATFORM_SPURSENGINE\n+endif\n+\n MAINTAINERCLEANFILES = Makefile.in\n \n-lib_LIBRARIES = libmars.a\n+pkginclude_HEADERS = \\\n+\t$(srcdir)/../../../include/common/mars/mars_error.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_mutex_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_barrier_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_event_flag_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_queue_types.h \\\n+\t$(srcdir)/../../../include/common/mars/mars_task_semaphore_types.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_mutex.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task_barrier.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task_event_flag.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task_queue.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task_semaphore.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_task_signal.h\n+\n+EXTRA_DIST = \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_dma.h \\\n+\t$(srcdir)/../../../include/mpu/mars/mars_timer.h\n \n-libmars_a_CPPFLAGS = \\\n+AM_CPPFLAGS = \\\n+\t$(extra_cppflags) \\\n \t-I$(srcdir)/../../../include/mpu \\\n \t-I$(srcdir)/../../../include/common\n \n-libmars_a_CFLAGS = \\\n+AM_CFLAGS = \\\n+\t-W \\\n \t-Wall \\\n \t-Wunused \\\n \t-Winline \\\n@@ -53,6 +90,8 @@ libmars_a_CFLAGS = \\\n \t-Wmissing-prototypes \\\n \t-Wmissing-declarations\n \n+lib_LIBRARIES = libmars.a\n+\n libmars_a_SOURCES = \\\n \tmars_entry.S \\\n \tmars_mutex.c \\\n",
    "prefixes": []
}