r6 - 06 Oct 2004 - 18:26:13 - BobKrzaczekYou are here: TWiki >  Help Web  >  AdminStuff > SoftwareInstalls > BuildingFromScratch > BuildingGnuMake
Tags:
create new tag
, view all tags
  • Version: 3.80
  • Summary: A very popular program maintenance tool; the GNU implementation of the make utility.

Obtaining

Pull down GNU Make from your friendly neighborhood GNU mirror.

   cd /cis/src/gnu
   wget ftp://ftp.gnu.org/pub/gnu/make/make-3.80.tar.bz2

Unpacking

Unpacking it is just as you might expect.

   bzip2 -dc make-3.80.tar.bz2 |tar xf -

Configuring

It doesn't really matter if you build GNU Make with GCC or with vendor language tools. If this is the first time you're building anything, you probably have no choice but to build with vendor tools. If you've come back to rebuild or update GNU Make, you may want to use the GNU language tools. Whichever tools you pick, only do one of the following steps.

Configuring with Vendor Language Tools

   CC=cc CFLAGS=-O ./configure --prefix=/gnu

Configuring with GNU Language Tools

   ./configure --prefix=/gnu

Building

Build and test, as usual. Don't proceed if things fail.

   make
   make check

Installation

First, let it install into the /gnu tree normally.

   make install

You can also install GNU Make so that it is available as "gmake" to people in the /cis tree who don't use =/gnu. It's good to rename it to the traditional "gmake" to avoid nasty surprises to people blindly typing make.

   ln -s /gnu/bin/make /cis/bin/gmake
   ln -s /gnu/share/man/man1/make.1 /cis/share/man/man1/gmake.1
   ln -s /gnu/share/info/make.info /cis/share/info/gmake.info
   for x in /gnu/share/info/make.info-* ; do
      ln -s $x /cis/share/info/`basename $x`
   done

If you install those symlinks, be sure to edit /cis/share/info/dir and ensure that there's an entry that looks like

   GNU Packages
   * Make: (gmake).                   Remake files automatically.

Documentation

If you're building tools for the very first time, you might have to skip this step and come back to it later, since teTeX and friends probably aren't yet installed. If you're updating GNU Make, though, go right ahead and finish this installation.

Create the documentation files.

   make dvi

This is an old-style document, in that tables of contents and such are present at the end of the file, not the beginning. Thus, you'll have to splice a better document together yourself (sorry!). First, convert the DVI file to PS. Pay attention to the page numbers emitted by the dvips utility; they are included here as an example.

   dvips -o make0.ps make.dvi
    ... [1] [2] [3] [4] [1] [2] [3] [4] [5]
    ...
    ... [150] [151] [152] [-1] [-2] [-3] [-4] [-5] [-6]

With that output, we can see that there are three sets of pages, the first being 4 pages long, the next being 152 pages long, and the last being 6 pages long, for a total of 162 pages. After you've checked out the various contents of these sections (hint: try xdvi make.dvi) you'll find that you want to assemble a new PS file that contains

  • only the last two pages of set 1
  • all six pages of set 3
  • all 152 pages of set 2

So, from make0.ps, extract the three bodies of pages. Bear in mind that we have to count physical pages ourselves here (aren't you glad people eventually stopped doing things this way?) See the manpages for psselect if you're curious how this works (especially the _6- hack).

   psselect 3-4 make0.ps make1.ps
   psselect _6- make0.ps make2.ps
   psselect 5-156 make0.ps make3.ps

Use gs to combine our three files into a single PS file; don't bother trying to use psmerge, it'll fail. If you don't have ghostscript installed yet, you can stop here and come back later.

   gs -q -dNOPAUSE -sDEVICE=pswrite -sPAPERSIZE=letter \
      -sOutputFile=make.ps -dBATCH make[123].ps

Then convert the PS into a PDF file.

   ps2pdf make.ps make.pdf

And, now, create a doc directory and fill it up with various bits of documentation.

   mkdir -p -m 0755 /gnu/share/doc/make
   cp make.dvi make.ps make.pdf README /gnu/share/doc/make

If you installed the symlink for /cis/bin/gmake above, you should install a similar symlink here as well.

   ln -s /gnu/share/doc/make /cis/share/doc/gmake
Edit | WYSIWYG | Attach | Printable | Raw View | Backlinks: Web, All Webs | History: r6 < r5 < r4 < r3 < r2 | More topic actions
 
Powered by TWiki
This site is powered by the TWiki collaboration platformCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding TWiki? Send feedback