Blame src/hwloc/HACKING

Packit Service c5cf8c
-*- text -*-
Packit Service c5cf8c
Packit Service c5cf8c
Notes to developers:
Packit Service c5cf8c
Packit Service c5cf8c
- Note that the README file is automatically generated from the main
Packit Service c5cf8c
  page of the doxygen documentation by running "make doc" (or "make
Packit Service c5cf8c
  readme").
Packit Service c5cf8c
Packit Service c5cf8c
- To check that all the code is working:
Packit Service c5cf8c
Packit Service c5cf8c
  make check
Packit Service c5cf8c
  make distcheck
Packit Service c5cf8c
  make check with --enable-debug
Packit Service c5cf8c
Packit Service c5cf8c
  Do this both from inside and outside sources.
Packit Service c5cf8c
Packit Service c5cf8c
- The following tools are necessary to generate all documentation (any
Packit Service c5cf8c
  flavor of "make dist" will fail if these tools are not available):
Packit Service c5cf8c
Packit Service c5cf8c
  - doxygen with man, pdf and html support
Packit Service c5cf8c
  - a latex distribution with pdflatex, and the usually recommended
Packit Service c5cf8c
    package files (such as float.sty) and fonts (such as ptmr8t)
Packit Service c5cf8c
  - fig2dev (transfig package)
Packit Service c5cf8c
  - gs (ghostscript package)
Packit Service c5cf8c
  - epstopdf
Packit Service c5cf8c
  - w3m or lynx (to generate the README)
Packit Service c5cf8c
Packit Service c5cf8c
  On Debian systems, the following packages should be enough:
Packit Service c5cf8c
    doxygen ghostscript texlive-latex-base texlive-latex-recommended
Packit Service c5cf8c
    texlive-fonts-recommended texlive-font-utils transfig w3m
Packit Service c5cf8c
  On RedHat systems:
Packit Service c5cf8c
    ghostscript doxygen transfig tetex tetex-latex w3m
Packit Service c5cf8c
Packit Service c5cf8c
- *** BEFORE MAKING AN OFFICIAL RELEASE TARBALL: the release manager
Packit Service c5cf8c
  MUST update the VERSION file:
Packit Service c5cf8c
Packit Service c5cf8c
  - ensure that the major, minor, and release version numbers are
Packit Service c5cf8c
    correct.  The greek/svn numbers will automatically be stripped by
Packit Service c5cf8c
    make_dist_tarball (see below).
Packit Service c5cf8c
  - ensure that increment the so_version number as appropriate (see
Packit Service c5cf8c
    the GNU Libtool documentation for a description of what to do).
Packit Service c5cf8c
Packit Service c5cf8c
- Create a distribution tarball by running the following from the
Packit Service c5cf8c
  top-level source directory:
Packit Service c5cf8c
Packit Service c5cf8c
  shell$ ./contrib/dist/make_dist_tarball
Packit Service c5cf8c
Packit Service c5cf8c
  It will take a few minutes because it runs "make distcheck" and it
Packit Service c5cf8c
  builds two tarballs (an official release and a greek release).  For
Packit Service c5cf8c
  example, after "make_dist_tarball" completes, you'll have two
Packit Service c5cf8c
  tarballs, like this:
Packit Service c5cf8c
Packit Service c5cf8c
  hwloc-0.9.1.tar.gz
Packit Service c5cf8c
  hwloc-0.9.1rc1.tar.gz
Packit Service c5cf8c
Packit Service c5cf8c
  The "rc1" tarball (or whatever the greek version is) can be
Packit Service c5cf8c
  distributed for testing and validation.  If it passes, then the
Packit Service c5cf8c
  non-rc1 tarball can be released (it's identical to the rc1 tarball
Packit Service c5cf8c
  except for its version).
Packit Service c5cf8c
Packit Service c5cf8c
- Check tarballs by configuring and building them and then running
Packit Service c5cf8c
  "make check".
Packit Service c5cf8c
Packit Service c5cf8c
- make maintainer-clean can be used to properly remove the generated
Packit Service c5cf8c
  documentations.
Packit Service c5cf8c
Packit Service c5cf8c
- Silent rules are used by default to reduce the build verbosity:
Packit Service c5cf8c
Packit Service c5cf8c
  shell$ make
Packit Service c5cf8c
  CC	src/topology.lo
Packit Service c5cf8c
Packit Service c5cf8c
  To revert to the old verbose rules, pass V=1 to make:
Packit Service c5cf8c
Packit Service c5cf8c
  shell$ make V=1
Packit Service c5cf8c
  /bin/sh ../libtool  --tag=CC   --mode=compile gcc [...] -c -o topology.lo topology.c
Packit Service c5cf8c
Packit Service c5cf8c
Packit Service c5cf8c
Building the Windows zipballs on Windows with MinGW:
Packit Service c5cf8c
Packit Service c5cf8c
- Install prerequisites:
Packit Service c5cf8c
  - Visual C++ Express, currently available at:
Packit Service c5cf8c
     http://www.microsoft.com/visualstudio/en-us/products/2010-editions/express)
Packit Service c5cf8c
  - mingw-w64-bin_i686-mingw_<date>.zip if building a 64bits zipball:
Packit Service c5cf8c
     http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win64/Automated%20Builds/
Packit Service c5cf8c
  - mingw-w32-bin_i686-mingw_<date>.zip If building a 32bits zipball,
Packit Service c5cf8c
     or if building a 64bits zipball on a 32bits Windows:
Packit Service c5cf8c
     http://sourceforge.net/projects/mingw-w64/files/Toolchains%20targetting%20Win32/Automated%20Builds/
Packit Service c5cf8c
  - MSYS-<date>.zip
Packit Service c5cf8c
     http://sourceforge.net/projects/mingw-w64/files/External%20binary%20packages%20%28Win64%20hosted%29/MSYS%20%2832-bit%29/
Packit Service c5cf8c
  - findutils-<version>-bin.zip
Packit Service c5cf8c
     http://sourceforge.net/projects/ezwinports/files/
Packit Service c5cf8c
  Unpack all these ZIPs in a path that does not contain spaces,
Packit Service c5cf8c
  to avoid problems later.
Packit Service c5cf8c
Packit Service c5cf8c
- Launch msys.bat (in the root directory of the extracted MSYS ZIP).
Packit Service c5cf8c
Packit Service c5cf8c
- Your path must contain:
Packit Service c5cf8c
  - The bin directory of the extracted MinGW ZIP
Packit Service c5cf8c
    (it contains <arch>-gcc)
Packit Service c5cf8c
  - The <arch>/lib directory of the extracted MinGW ZIP
Packit Service c5cf8c
    (it contains libgcc*.DLL, needed for C++ tests during make check)
Packit Service c5cf8c
  - Visual C++ Express bin and IDE directories
Packit Service c5cf8c
  - The bin directory of the non-cross-compiling MinGW ZIP
Packit Service c5cf8c
    when building a 64bits zipball on a 32bits Windows
Packit Service c5cf8c
  - The bin directory of the findutils ZIP to find the "find" command
Packit Service c5cf8c
    (the Windows find command cannot be used)
Packit Service c5cf8c
- Examples of PATH (depends on where ZIPs were extracted and were Visual Studio was installed):
Packit Service c5cf8c
  - For a 32bits zipball:
Packit Service c5cf8c
    $ PATH=/c/hwloc/mingw32/bin:/c/hwloc/mingw32/i686-w64-mingw32/lib:”/c/Program Files/Microsoft Visual Studio 10.0/VC/bin”:”/c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE”:$PATH
Packit Service c5cf8c
  - For a 64bits zipball:
Packit Service c5cf8c
    $ PATH=/c/hwloc/mingw64/bin:/c/hwloc/mingw64/x86_64-w64-mingw32/lib:”/c/Program Files/Microsoft Visual Studio 10.0/VC/bin”:”/c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE”:$PATH
Packit Service c5cf8c
  - For a 64bits zipball on a 32bits Windows:
Packit Service c5cf8c
    $ PATH=/c/hwloc/mingw64/bin:/c/hwloc/mingw32/bin:/c/hwloc/mingw32/i686-w64-mingw32/lib:”/c/Program Files/Microsoft Visual Studio 10.0/VC/bin”:”/c/Program Files/Microsoft Visual Studio 10.0/Common7/IDE”:$PATH
Packit Service c5cf8c
- Check that running "lib", "link" and "cl" finds the right tools (installed by Visual Studio)
Packit Service c5cf8c
  and displays their usage output (list of command-line options).
Packit Service c5cf8c
Packit Service c5cf8c
- Download a hwloc tarball (building from SVN requires autotools, doxygen, LaTeX, etc.),
Packit Service c5cf8c
  extract it and enter the directory.
Packit Service c5cf8c
Packit Service c5cf8c
- Set the install prefix to what the zipball name must be:
Packit Service c5cf8c
  $ prefix=$PWD/hwloc-win<size>-build-<version>
Packit Service c5cf8c
- Configure
Packit Service c5cf8c
  - For a 32bits zipball:
Packit Service c5cf8c
    $ ./configure --prefix=$prefix --enable-static --host=i686-w64-mingw32
Packit Service c5cf8c
  - For a 64bits zipball:
Packit Service c5cf8c
    $ ./configure --prefix=$prefix --enable-static --host=x86_64-w64-mingw32
Packit Service c5cf8c
  - For a 64bits zipball on a 32bits Windows:
Packit Service c5cf8c
    $ ./configure --prefix=$prefix --enable-static --host=x86_64-w64-mingw32 CC_FOR_BUILD=i686-w64-mingw32-gcc
Packit Service c5cf8c
Packit Service c5cf8c
- Build
Packit Service c5cf8c
  $ make
Packit Service c5cf8c
- If not building a 64bits zipball on a 32bits machine, test things:
Packit Service c5cf8c
  $ make check
Packit Service c5cf8c
  If your Windows is not configured in English, some failure may occur in tests/xml
Packit Service c5cf8c
  because floats are localized.
Packit Service c5cf8c
Packit Service c5cf8c
- Install
Packit Service c5cf8c
  $ make install
Packit Service c5cf8c
- Create the zipball
Packit Service c5cf8c
  $ zip -r hwloc-win<size>-build-<version>.zip hwloc-win<size>-build-<version>
Packit Service c5cf8c
Packit Service c5cf8c
- Compare the contents of the new zipball with a previous one.
Packit Service c5cf8c
  Make sure the .lib file was generated.