diff options
Diffstat (limited to 'microkernel/mach/mig/gnu_mig/building.mdwn')
-rw-r--r-- | microkernel/mach/mig/gnu_mig/building.mdwn | 82 |
1 files changed, 56 insertions, 26 deletions
diff --git a/microkernel/mach/mig/gnu_mig/building.mdwn b/microkernel/mach/mig/gnu_mig/building.mdwn index f92f7dbe..e7d3c150 100644 --- a/microkernel/mach/mig/gnu_mig/building.mdwn +++ b/microkernel/mach/mig/gnu_mig/building.mdwn @@ -1,15 +1,28 @@ +[[!meta copyright="Copyright © 2006, 2007, 2008, 2011 Free Software Foundation, +Inc."]] + +[[!meta license="""[[!toggle id="license" text="GFDL 1.2+"]][[!toggleable +id="license" text="Permission is granted to copy, distribute and/or modify this +document under the terms of the GNU Free Documentation License, Version 1.2 or +any later version published by the Free Software Foundation; with no Invariant +Sections, no Front-Cover Texts, and no Back-Cover Texts. A copy of the license +is included in the section entitled [[GNU Free Documentation +License|/fdl]]."]]"""]] + # <a name="Building_the_Mach_Interface_Gene"> Building the Mach Interface Generator from Source </a> -If you want to build the Mach Interface Generator yourself instead of just using a pre-built package, follow these instructions. +If you want to build the Mach Interface Generator yourself instead of just +using a pre-built package, follow these instructions. ## <a name="Getting_the_Source_Code"> Getting the Source Code </a> You can chose between getting the [sources from the developers' -RCS](http://savannah.gnu.org/cvs/?group=hurd): +RCS](http://git.savannah.gnu.org/cgit/hurd/): - $ cvs -z3 -d:pserver:anonymous@cvs.savannah.gnu.org:/sources/hurd co mig + $ git clone http://git.savannah.gnu.org/cgit/hurd/mig.git/ -... or (if you are working on a Debian system) the ones that are used for the [current Debian mig package](http://packages.debian.net/source/unstable/mig): +... or (if you are working on a Debian system) get the sources that are used for the +[current Debian mig package](http://packages.debian.net/source/unstable/mig): $ apt-get source mig @@ -17,53 +30,70 @@ Please see the Debian [[hurd/running/debian/FAQ]] before using _apt-get source_. The unpacked source tree is around 1 MiB, and the build tree also is around 1 MiB. -## <a name="Preparing_for_the_Build"> Preparing for the Build </a> +## <a name="_on_Debian_systems"> On Debian Systems: </a> -### <a name="_on_Debian_systems"> ... on Debian systems </a> +### <a name="Preparing_for_the_Build"> Preparing for the Build </a> -Building the Mach Interface Generator requires the _build-essential_ and _fakeroot_ packages, their dependencies and additional packages that are specified by the source mig package: +Building MIG requires the *build-essential* and *fakeroot* packages, +and some additional dependencies specified by the mig source package: # apt-get install build-essential fakeroot # apt-get build-dep mig -### <a name="_on_non_Debian_systems"> ... on non-Debian systems </a> +### <a name="Building_and_Installing"> Building and Installing </a> <a name="_a_deb_file"> ... a _.deb_ file </a> -Building the Mach Interface Generator requires a C compiler, a standard C library (with corresponding header files) and your favourite flavor of awk (gawk), yacc (bison), lex (flex) and make. +Change into the directory with the downloaded / unpacked MIG sources: -Additionally, you need to have GNU Mach's header files installed. See -[[mach/gnumach/building]] about how to do that, then come back here. + $ cd mig-X.X.X.XX -## <a name="Building_and_Installing"> Building and Installing </a> +Start the build process: -### <a name="_a_deb_file"> ... a _.deb_ file </a> + $ dpkg-buildpackage -us -uc -b -rfakeroot -Change into the directory with the downloaded / unpacked MIG sources (_mig-1.3.1.99_): +This will create a _.deb_ package in the parent directory, +which you can then install on your system. - $ cd mig-1.3.1.99 +## <a name="_on_non_Debian_systems"> On non-Debian Systems: </a> -Start the build process: +### <a name="Preparing_for_the_Build"> Preparing for the Build </a> - $ dpkg-buildpackage -us -uc -b -rfakeroot +Building the Mach Interface Generator requires a C compiler, a standard 32 bit +C library (with corresponding header files), your favourite flavor of awk +(gawk), yacc (bison), lex (flex) and make. -You can then install / distribute the _.deb_ file which will drop out one directory above the current one. +Additionally, you need to have GNU Mach's header files installed. See +[[building GNU Mach|mach/gnumach/building]] about how to do that, then come back here. + +### <a name="Building_and_Installing"> Building and Installing </a> + +First, generate the configuration files: -### <a name="_TODO_"> [TODO] </a> + $ cd mig + $ autoreconf --install -The Mach Interface Generator has to be built in a separate directory: +The Mach Interface Generator has to be built in a separate build directory: - $ mkdir mig-build - $ cd mig-build + $ mkdir build + $ cd build + +Find the base directory where you installed GNU Mach's header files and where +you now intend to install the Mach Interface Generator (e.g. _~/gnu_), and run +configure: + + $ GNU=~/gnu + $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" -Find the root directory where you installed GNU Mach's header files and where you now intend to install the Mach Interface Generator (_~/gnu_) and the path to your Mach Interface Generator sources (\_[...]/mig) and configure it: +If you are building on a 64 bit machine, you need to add a --host option: $ GNU=~/gnu - $ TARGET_CPPFLAGS=-I"$GNU"/include [...]/mig/configure --prefix="$GNU" + $ TARGET_CPPFLAGS=-I"$GNU"/include ../configure --prefix="$GNU" --host=i686-unknown-linux-gnu -Build and install the Mach Interface Generator into _$GNU_, i.e. _~/gnu/_ in our example: +Build and install the Mach Interface Generator into _$GNU_ (i.e. _~/gnu/_ in our example): $ make all install -To make your _mig_ binary easily available, you should append something like the following to e.g. your _~/.bash\_profile_: +To make your _mig_ binary easily available, you should append something like +the following to e.g. your _~/.bash\_profile_: PATH=~/gnu/bin:$PATH export PATH |