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

Re: debian/rules



On Mar 11 2009, Jaromír Mikeš wrote:
> Thanks for advice and link it can really save frustration.

I particularly have no problem with the commented lines (they serve me
as a reminder or as a way to put a quick reference on the rules file),
but some people really dislike them.

> I have one other question about debian/rules
> 
> original variable PREFIX in makefile is PREFIX = /usr/local
> 
> I shouldn't edit makefile itself so I should to do it in debian/rules file.
> The result should looks like this?

Usually, some makefiles derived from configure scripts accept a --prefix
option that indicates where to install the package.

In other cases, you may just want to use DESTDIR (if the makefile
honours it) or with PREFIX, just like you did.

> build-stamp: configure-stamp 
> 	dh_testdir
> 
> 	# Add here commands to compile the package.
> 	$(MAKE) -C source/ PREFIX=/usr

Be careful here, because the binaries and everything else will be
installed in a subdirectory of the debian directory of the source
package. Some programs (like, say, Daniel J. Bernstein's utilities) need
special care when specifying the installation directory.

> 	# Add here commands to clean up after the build process.
> 	-$(MAKE) -C source/ PREFIX=/usr clean

Hummm, here you should also make sure that you don't ignore errors from
make (see the hyphen that was put there). Are current versions of
dh_make producing such templates?

Anyway, another point is the following:

> Makefile is also nested in "source" subdirectory ... thats why " - C source/ "

Some upstream have unusual ways of doing things indeed. :-)


Regards, Rogério Brito.

-- 
Rogério Brito : rbrito@{mackenzie,ime.usp}.br : GPG key 1024D/7C2CAEB8
http://www.ime.usp.br/~rbrito : http://meusite.mackenzie.com.br/rbrito
Projects: algorithms.berlios.de : lame.sf.net : vrms.alioth.debian.org


Reply to: