If you want to build the Mach Interface Generator yourself instead of just using a pre-built package, follow these instructions.
You can chose between getting the sources from the developers' RCS:
$ git clone http://git.savannah.gnu.org/cgit/hurd/mig.git/
... or (if you are working on a Debian system) get the sources that are used for the current Debian mig package:
$ apt-get source mig
The unpacked source tree is around 1 MiB, and the build tree also is around 1 MiB.
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
Change into the directory with the downloaded / unpacked MIG sources:
$ cd mig-X.X.X.XX
Start the build process:
$ dpkg-buildpackage -us -uc -b -rfakeroot
This will create a .deb package in the parent directory, which you can then install on your system.
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.
Additionally, you need to have GNU Mach's header files installed. See building GNU Mach about how to do that, then come back here.
First, generate the configuration files:
$ cd mig $ autoreconf --install
The Mach Interface Generator has to be built in a separate build directory:
$ 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"
If you are building on a 64 bit machine, you need to add a --host option:
$ GNU=~/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):
$ make all install
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
If you already have e.g. ~/bin in your $PATH, you could also create a symbolic link:
$ ln -s ~/gnu/bin/mig ~/bin/