From d0d045b55b8830ee156e367c88fecc2589cd1443 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Sun, 13 Jul 2014 13:14:49 +0200 Subject: [PATCH] Starting to implement support for Windows/Cygwin. * New: In all to CMakeLists.txt, disable the warning about deprecated WIN32 under cygwin. * New: In boostrap, in ccb.py, coriolisEnv.py and builder/Configuration.py add recognition in uname for the values returned under Windows/Cygwin. * New: In Documenation, in UsersGuide.rst add some informations about Cygwin and a section for the devel branch. --- bootstrap/CMakeLists.txt | 1 + bootstrap/builder/Configuration.py | 14 ++++++++++++- bootstrap/ccb.py | 14 +++++++++++++ bootstrap/coriolisEnv.py | 22 +++++++++++++++++---- crlcore/CMakeLists.txt | 1 + cumulus/CMakeLists.txt | 1 + cumulus/src/CMakeLists.txt | 4 +++- cumulus/src/{ => plugins}/ClockTree.py | 0 documentation/CMakeLists.txt | 1 + documentation/UsersGuide/UsersGuide.rst | 26 +++++++++++++++++++++++-- equinox/CMakeLists.txt | 1 + etesian/CMakeLists.txt | 1 + hurricane/CMakeLists.txt | 1 + ispd/CMakeLists.txt | 1 + katabatic/CMakeLists.txt | 1 + kite/CMakeLists.txt | 1 + knik/CMakeLists.txt | 1 + mauka/CMakeLists.txt | 1 + metis/CMakeLists.txt | 1 + nimbus/CMakeLists.txt | 1 + solstice/CMakeLists.txt | 1 + stratus1/CMakeLists.txt | 1 + unicorn/CMakeLists.txt | 1 + vlsisapd/CMakeLists.txt | 1 + 24 files changed, 90 insertions(+), 8 deletions(-) rename cumulus/src/{ => plugins}/ClockTree.py (100%) diff --git a/bootstrap/CMakeLists.txt b/bootstrap/CMakeLists.txt index 5601e405..eae4c7fd 100644 --- a/bootstrap/CMakeLists.txt +++ b/bootstrap/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(Bootstrap) cmake_minimum_required(VERSION 2.4.0) diff --git a/bootstrap/builder/Configuration.py b/bootstrap/builder/Configuration.py index 2406337b..88aa5fa8 100644 --- a/bootstrap/builder/Configuration.py +++ b/bootstrap/builder/Configuration.py @@ -2,7 +2,7 @@ # -*- mode:Python -*- # # This file is part of the Coriolis Software. -# Copyright (c) UPMC/LIP6 2008-2014, All Rights Reserved +# Copyright (c) UPMC 2008-2014, All Rights Reserved # # +-----------------------------------------------------------------+ # | C O R I O L I S | @@ -131,6 +131,10 @@ class Configuration ( object ): self._osFreeBSD8x_64 = re.compile (".*FreeBSD 8.*x86_64.*") self._osFreeBSD8x = re.compile (".*FreeBSD 8.*") self._osDarwin = re.compile (".*Darwin.*") + self._osCygwinW7_64 = re.compile (".*CYGWIN_NT-6\.1-WOW64.*") + self._osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*") + self._osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3]-WOW64.*") + self._osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*") uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() @@ -155,6 +159,14 @@ class Configuration ( object ): self._osType = "FreeBSD.8x.x86_64" self._libSuffix = "64" elif self._osFreeBSD8x .match(lines[0]): self._osType = "FreeBSD.8x.i386" + elif self._osCygwinW7_64.match(lines[0]): + self._osType = "Cygwin.W7_64" + self._libSuffix = "64" + elif self._osCygwinW7.match(lines[0]): self._osType = "Cygwin.W7" + elif self._osCygwinW8_64.match(lines[0]): + self._osType = "Cygwin.W8_64" + self._libSuffix = "64" + elif self._osCygwinW8.match(lines[0]): self._osType = "Cygwin.W8" else: uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) self._osType = uname.stdout.readlines()[0][:-1] diff --git a/bootstrap/ccb.py b/bootstrap/ccb.py index bc42e3f2..bccfde26 100755 --- a/bootstrap/ccb.py +++ b/bootstrap/ccb.py @@ -64,6 +64,10 @@ def guessOs (): osFreeBSD8x_64 = re.compile (".*FreeBSD 8.*x86_64.*") osFreeBSD8x = re.compile (".*FreeBSD 8.*") osDarwin = re.compile (".*Darwin.*") + osCygwinW7_64 = re.compile (".*CYGWIN_NT-6\.1-WOW64.*") + osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*") + osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3]-WOW64.*") + osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*") uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() @@ -93,6 +97,16 @@ def guessOs (): libDir = "lib64" elif osFreeBSD8x.match(lines[0]): osType = "FreeBSD.8x.i386" + elif osCygwinW7_64.match(lines[0]): + osType = "Cygwin.W7_64" + libDir = "lib64" + elif osCygwinW7.match(lines[0]): + osType = "Cygwin.W7" + elif osCygwinW8_64.match(lines[0]): + osType = "Cygwin.W8_64" + libDir = "lib64" + elif osCygwinW8.match(lines[0]): + osType = "Cygwin.W8" else: uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) osType = uname.stdout.readlines()[0][:-1] diff --git a/bootstrap/coriolisEnv.py b/bootstrap/coriolisEnv.py index 8ee204cd..b5f21734 100755 --- a/bootstrap/coriolisEnv.py +++ b/bootstrap/coriolisEnv.py @@ -44,6 +44,10 @@ def guessOs (): osFreeBSD8x_amd64 = re.compile (".*FreeBSD 8.*amd64.*") osFreeBSD8x_64 = re.compile (".*FreeBSD 8.*x86_64.*") osFreeBSD8x = re.compile (".*FreeBSD 8.*") + osCygwinW7_64 = re.compile (".*CYGWIN_NT-6\.1-WOW64.*") + osCygwinW7 = re.compile (".*CYGWIN_NT-6\.1.*") + osCygwinW8_64 = re.compile (".*CYGWIN_NT-6\.[2-3]-WOW64.*") + osCygwinW8 = re.compile (".*CYGWIN_NT-6\.[2-3].*") uname = subprocess.Popen ( ["uname", "-srm"], stdout=subprocess.PIPE ) lines = uname.stdout.readlines() @@ -78,12 +82,22 @@ def guessOs (): osType = "FreeBSD.8x.i386" elif osDarwin.match(lines[0]): osType = "Darwin" + elif osCygwinW7_64.match(lines[0]): + osType = "Cygwin.W7_64" + libDir = "lib64" + elif osCygwinW7.match(lines[0]): + osType = "Cygwin.W7" + elif osCygwinW8_64.match(lines[0]): + osType = "Cygwin.W8_64" + libDir = "lib64" + elif osCygwinW8.match(lines[0]): + osType = "Cygwin.W8" else: - uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) - osType = uname.stdout.readlines()[0][:-1] + uname = subprocess.Popen ( ["uname", "-sr"], stdout=subprocess.PIPE ) + osType = uname.stdout.readlines()[0][:-1] - #print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] - #print " (using: \"%s\")" % osType + #print "[WARNING] Unrecognized OS: \"%s\"." % lines[0][:-1] + #print " (using: \"%s\")" % osType return (osType,libDir) diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index 6c814ee3..c4e59aaf 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(CRLCORE) cmake_minimum_required(VERSION 2.8.9) diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index 0046f7f1..f951c0c5 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(CUMULUS) cmake_minimum_required(VERSION 2.4.0) diff --git a/cumulus/src/CMakeLists.txt b/cumulus/src/CMakeLists.txt index 4424b6da..1e9b234a 100644 --- a/cumulus/src/CMakeLists.txt +++ b/cumulus/src/CMakeLists.txt @@ -3,7 +3,9 @@ set ( pysources ${CMAKE_CURRENT_SOURCE_DIR}/placeandroute.py ${CMAKE_CURRENT_SOURCE_DIR}/ref.py ) - set ( pyplugins ${CMAKE_CURRENT_SOURCE_DIR}/ClockTree.py + set ( pyplugins ${CMAKE_CURRENT_SOURCE_DIR}/plugins/__init__.py + ${CMAKE_CURRENT_SOURCE_DIR}/plugins/ClockTree.py + ${CMAKE_CURRENT_SOURCE_DIR}/plugins/Chip.py ) install ( FILES ${pysources} DESTINATION ${PYTHON_SITE_PACKAGES}/cumulus ) diff --git a/cumulus/src/ClockTree.py b/cumulus/src/plugins/ClockTree.py similarity index 100% rename from cumulus/src/ClockTree.py rename to cumulus/src/plugins/ClockTree.py diff --git a/documentation/CMakeLists.txt b/documentation/CMakeLists.txt index f01e2d35..0ed90c18 100644 --- a/documentation/CMakeLists.txt +++ b/documentation/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE; explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(DOCUMENTATION) cmake_minimum_required(VERSION 2.4.0) diff --git a/documentation/UsersGuide/UsersGuide.rst b/documentation/UsersGuide/UsersGuide.rst index ccd1f048..899db2b5 100644 --- a/documentation/UsersGuide/UsersGuide.rst +++ b/documentation/UsersGuide/UsersGuide.rst @@ -318,6 +318,10 @@ automatically created either by |ccb| or the build system. | | Linux, SL 6, 64 bits | | ~/coriolis-2.x/Linux.slsoc6x_64/Release.Shared/build/ | | | FreeBSD 8, 32 bits | | ~/coriolis-2.x/FreeBSD.8x.i386/Release.Shared/build/ | | | FreeBSD 8, 64 bits | | ~/coriolis-2.x/FreeBSD.8x.amd64/Release.Shared/build/ | +| | Windows 7, 32 bits | | ~/coriolis-2.x/Cygwin.W7/Release.Shared/build/ | +| | Windows 7, 64 bits | | ~/coriolis-2.x/Cygwin.W7_64/Release.Shared/build/ | +| | Windows 8.x, 32 bits | | ~/coriolis-2.x/Cygwin.W8/Release.Shared/build/ | +| | Windows 8.x, 64 bits | | ~/coriolis-2.x/Cygwin.W8_64/Release.Shared/build/ | +--------------------------+-----------------------------------------------------------------------------+ | **Architecture Dependant Install** | +--------------------------+-----------------------------------------------------------------------------+ @@ -363,6 +367,24 @@ The complete list of |ccb| functionalities can be accessed with the ``--help`` a It also may be run in graphical mode (``--gui``). +Building the Devel Branch +------------------------- + +In the |Coriolis| |git| repository, two branches are present: + +* The :cb:`master` branch, which contains the latest stable version. This is the + one used by default if you follow the above instructions. + +* The :cb:`devel` branch, which obviously contains the latest commits from the + development team. To use it instead of the :cb:`master` one, do the following + command just after the first step: :: + + dummy@lepka:~$ git checkout devel + + Be aware that it may requires newer versions of the depnencies and may introduce + incompatibilites with the stable version. + + Additionnal Requirement under |MacOS| ------------------------------------- @@ -401,8 +423,8 @@ cells libraries. In a typical installation, this is generally :cb:`/usr/share/alliance/cells`. -Environment Helper -~~~~~~~~~~~~~~~~~~ +Setting up the Environment (coriolisEnv.py) +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ To simplify the tedious task of configuring your environment, a helper is provided in the ``bootstrap`` source directory: :: diff --git a/equinox/CMakeLists.txt b/equinox/CMakeLists.txt index ca849ea3..6492641c 100644 --- a/equinox/CMakeLists.txt +++ b/equinox/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(EQUINOX) cmake_minimum_required(VERSION 2.8.9) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index 29ee53c1..d091a252 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(ETESIAN) option(BUILD_DOC "Build the documentation (doxygen)" OFF) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index c83f8761..313f3881 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(HURRICANE) option(BUILD_DOC "Build the documentation (doxygen)" OFF) diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 5bf685dd..6ccec521 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(ISPD) cmake_minimum_required(VERSION 2.4.0) diff --git a/katabatic/CMakeLists.txt b/katabatic/CMakeLists.txt index 2b1ea808..44a54c7e 100644 --- a/katabatic/CMakeLists.txt +++ b/katabatic/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(KATABATIC) option(BUILD_DOC "Build the documentation (doxygen)" OFF) diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index 2dcba377..e181743d 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(KITE) option(BUILD_DOC "Build the documentation (doxygen)" OFF) diff --git a/knik/CMakeLists.txt b/knik/CMakeLists.txt index febb3e29..81d4fdb6 100644 --- a/knik/CMakeLists.txt +++ b/knik/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(KNIK) cmake_minimum_required(VERSION 2.8.9) diff --git a/mauka/CMakeLists.txt b/mauka/CMakeLists.txt index 37799e0f..0c1ee3f1 100644 --- a/mauka/CMakeLists.txt +++ b/mauka/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(MAUKA) cmake_minimum_required(VERSION 2.8.9) diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index 54cb5fb4..c6be2042 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(METIS) cmake_minimum_required(VERSION 2.8.9) diff --git a/nimbus/CMakeLists.txt b/nimbus/CMakeLists.txt index a2995eb2..70215b52 100644 --- a/nimbus/CMakeLists.txt +++ b/nimbus/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(NIMBUS) cmake_minimum_required(VERSION 2.8.9) diff --git a/solstice/CMakeLists.txt b/solstice/CMakeLists.txt index 844e4382..5f70bdda 100644 --- a/solstice/CMakeLists.txt +++ b/solstice/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(SOLSTICE) cmake_minimum_required(VERSION 2.8.9) diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 269e2c89..5763e437 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(STRATUS1) option(BUILD_DOC "Build the documentation (latex2html)" OFF) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index 707e8ac2..35ee4553 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(UNICORN) cmake_minimum_required(VERSION 2.8.9) diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt index 153f9e29..9799c64c 100644 --- a/vlsisapd/CMakeLists.txt +++ b/vlsisapd/CMakeLists.txt @@ -1,5 +1,6 @@ # -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + set(CMAKE_LEGACY_CYGWIN_WIN32 0) project(VLSISAPD) cmake_minimum_required(VERSION 2.8.9)