[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: DESTDIR build problem



On Tue, Jan 19, 1999 at 09:27:47AM +0100, Stefan Karrmann wrote:
> I've followed the instructions of Debian New Maintainers Guide
> (http://www.de.debian.org/doc/maint-guide) to create a new
> package clean.

Nice to see someone is reading the manuals... :)

Also, if your version of the document is 0.6 or lower, please
go to http://www.debian.org/~elphick/manuals.html/maint-guide/

> But it seems to me that the DESTDIR doesn't work.
> Is there a mistake in the Makefiles or have I misunderstood
> something of the build process.

You missed one important part, and that is actual *defining* where
that variable points. Read on...

> while debian/rules contains the lines:
> ---Rules Begin---
> build: build-stamp
> build-stamp:
> ---Rules End---

This is not the relevant rule, the one you need to check is 'install:'.
It should write something like this, as explained in the Guide:

  28 install: install-stamp
  29 install-stamp: build-stamp
  30    dh_testdir
  31    dh_testroot
  32    dh_clean -k
  33    dh_installdirs
  34
  35    # Add here commands to install the package into debian/tmp.
  36    $(MAKE) install DESTDIR=`pwd`/debian/tmp
  37
  38    touch install-stamp

Please note the line numbered 36, where you invoke making process
reffering to the install: target in the Makefile, and also defining
what $DESTDIR is.

Of course, you should remove the line numbers when inserting in real
debian/rules file.

> ---Makefile Begin---
> # Edited for Debian GNU/Linux.
> DESTDIR =

This value (better to say non-value) of the DESTDIR variable can and
will be overriden from command line - in our case, that is the
invocation from debian/rules.

It is put there just for precaution. I will explain better that in
the next revision of the document.

> default: install

This is IMO wrong, if it is the first rule. You should not try to blindly
install something before it is really built. Default rule should point
to the compilation of object files and the binary.

> ---Makefile End---

> Thanks for your hints,

BTW how do you like the rest of the document?

--
enJoy -*/\*- http://jagor.srce.hr/~jrodin/


Reply to: