6 messages in net.sourceforge.lists.courier-usersRe: [courier-users] make: invalid opt...
FromSent OnAttachments
VincentFeb 13, 2004 6:28 pm 
Phillip HutchingsFeb 13, 2004 7:01 pm 
VincentFeb 13, 2004 7:43 pm 
Malcolm WeirFeb 14, 2004 12:23 pm 
VincentFeb 14, 2004 9:56 pm 
Malcolm WeirFeb 15, 2004 3:56 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [courier-users] make: invalid option when using DESTDIR with install-configureActions...
From:Vincent (cour@crel.us)
Date:Feb 14, 2004 9:56:39 pm
List:net.sourceforge.lists.courier-users

----- Malcolm Weir wrote: ----- From: Vincent Sent: Friday, February 13, 2004 7:41 PM To: courier-users@li... Subject: Re: [courier-users] make: invalid option when using DESTDIR with install-configure

Thanks for the reply.

On Sat, Feb 14, 2004 at 03:59:00PM +1300, Phillip Hutchings wrote:

That's what make does. It's working fine.

I don't understand. Why doesn't it do on on other targets like install-strip?

Install-strip is a target, and is in the [Mm]akefile on the left of a colon.

Huh? install-configure isn't?

<from the Makefile> install-configure: @$(MAKE) -$(MAKEFLAGS) install-perms /usr/bin/perl ././sysconftool `awk ' $$5 == "config" && $$1 ~ /\.dist$$/
{ print $$1 }' <perm issions.dat` </from the Makefile>

How is that not a target where install-strip is?

What you appear to be trying to do is run make with an environment variable "DESTDIR" set to something. Dunnon *why* you want to do that, but if that's what you want to do, set the environment up before the command:

DESTDIR=/whatever make install-strip

This is how Unix works.

(Compare the results of: echo VARIABLE=fred Variable is $VARIABLE And VARIABLE=fred echo Variable is $VARIABLE )

Malc.

What? You don't know why I would want to do that?

<from my previous message that you replied to> I need to be able to use DESTDIR so that I can have the package all pre-configured before creating a binary package to take to another machine. </previous message>

<from the courier manual> ...set the make variable named DESTDIR. For example:

make install DESTDIR=/var/tmp/courier-inst

The contents of DESTDIR are prepended to the name of every file installed, so if --prefix was set to /usr/lib/courier, the files will be installed in /var/tmp/courier-inst/usr/lib/courier. This only works if you use GNU make. . . This feature is mainly for use by people who are rolling Courier into a prebuilt package, ... </manual>

Although, I think I found the problem. The Makefile is calling on make with "-$(MAKEFLAGS) install-perms" under the target, install-configure.

I found in the manual on GNU make:

<make manual> Likewise variables defined on the command line are passed to the sub-`make' through `MAKEFLAGS'. Words in the value of `MAKEFLAGS' that contain `=', `make' treats as variable definitions just as if they appeared on the command line. </make manual>

I have compiled and packaged hundreds of GNU packages using DISTDIR=... or prefix=... on the command line of make when installing into a packaging area and have never encountered this particular problem.

So, I would consider using "-$(MAKEFLAGS)" a bug in the Makefile. It is turning it into "-DESTDIR=...".

Also, from looking at the install-configure and related targets, it does not look like DESTDIR is being used even if the above problems is corrected. It should work for all targets in order to create a binary package to install on other machines.

PS: Sorry about replying to my own posting to where this does not thread correctly. I had to cut and paste Malcolm's reply from the mailing list archive from the web site because my email got disrupted today for some reason and I did not get the days postings.