LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux From Scratch (https://www.linuxquestions.org/questions/linux-from-scratch-13/)
-   -   Installing findutils-4.1, ch. 6, make options (https://www.linuxquestions.org/questions/linux-from-scratch-13/installing-findutils-4-1-ch-6-make-options-75263/)

itsjustme 07-23-2003 02:12 PM

Installing findutils-4.1, ch. 6, make options
 
Ok, the book says:
Quote:

By default, the location of the updatedb database is in /usr/var. To make the location of /var/lib/misc/locatedb file FHS compliant, pass the localstatedir=/var/lib/misc option to both make commands below.

Continue with compiling the package:

make libexecdir=/usr/bin

Finish installing the package:

make libexecdir=/usr/bin install
So, I am assuming they just got lazy in the book and didn't type this all out, but they do expect you to type in:

make libexecdir=/usr/bin --localestatedir=/var/lib/misc
make libexecdir=/usr/bin install --localestatedir=/var/lib/misc

Is that correct? I guess I just want to make sure it's 2 dashes, --, and make sure the stuff after the equal sign doesn't need to be in parenthesis.

Thanks...

Dark_Helmet 07-23-2003 03:58 PM

I believe they mean for you to do this:

Code:

make libexecdir=/usr/bin localestatedir=/var/lib/misc
make libexecdir=/usr/bin localestatedir=/var/lib/misc install

Passing "--localestatedir=/var/lib/misc" shouldn't work. That would be interpreted by make as a command-line option, whereas what you're trying to do is define a directory for the package your compiling... not make. So "localestatedir=/var/lib/misc" would define a shell variable for that command only, and the Makefile for findutils probably looks at that variable's contents to determine where to place the database.

itsjustme 07-23-2003 04:29 PM

I see what you are saying.

Quote:

Originally posted by Dark_Helmet
Passing "--localestatedir=/var/lib/misc" shouldn't work. That would be interpreted by make as a command-line option, whereas what you're trying to do is define a directory...
But the part, then, that confused me was:

Quote:


pass the localstatedir=/var/lib/misc option to both make commands

Sounded like a command line option to me.

I'm glad i asked, and I assume that that worked for you.

Thanks...

Dark_Helmet 07-23-2003 05:08 PM

To be honest, I can't remember if I made the system 100% FHS compliant. It wouldn't hurt to run the command with the '--' prepended to the localestatdir option, because I'm pretty sure you'll just get an error. And in that case, you just run it again without the dashes...:D

itsjustme 07-24-2003 12:43 PM

Well, now I'm confused, or in other words, it's a normal day. ;)

I found this link:
http://archive.linuxfromscratch.org/...findutils.html

Which shows the localestatedir assignment in front of the libexec part.

And in this link:
http://www.de.linuxfromscratch.org/v...findutils.html

it doesn't say where to put the assignment in the command, but it does say to use the '--'.

lfslinux 07-24-2003 01:06 PM

Quote:

Originally posted by itsjustme
Well, now I'm confused, or in other words, it's a normal day. ;)

I found this link:
http://archive.linuxfromscratch.org/...findutils.html

Which shows the localestatedir assignment in front of the libexec part.

And in this link:
http://www.de.linuxfromscratch.org/v...findutils.html

it doesn't say where to put the assignment in the command, but it does say to use the '--'.

Confusing, isn't it?

If you use findutils-4.1 you pass "localstatedir=/var/lib/misc" to make like so:

make localstatedir=/var/lib/misc <other stuff here>

Don't use --localstatedir. In this case it isn't a command line option to the make program, but an override to a definition in the Makefile file. You're passing a variable name and value on the make command line, not a program option.

If you use findutils-4.1.x you pass the option to the configure script as a command line option ala ./configure --blah --localstatedir=/var/lib/misc and the configure script will write the Makefile files with that variable and value so you don't need to override it anymore. Earier findutils versions (like 4.1) don't support the configure script option.

So, which one do you use? Depends on your findutils version. If you're following the CVS version of the book, you're using (or supposed to anyways) version 4.1.7 (use configure script option). If you use a stable release, you're using 4.1 (use make option).

I hope it's clear now?

itsjustme 07-24-2003 02:01 PM

Hey, thanks a lot!

I'll use this part:
Quote:

If you use findutils-4.1 you pass "localstatedir=/var/lib/misc" to make like so:

make localstatedir=/var/lib/misc <other stuff here>
I purchased the 4.1 book and the CD in your initial pre-order special offer since I have a 56K connection, so I'm not using CVS, which, as I understand it, is Concurrent Version System, and involves a bunch of downloading. I am however, checking the printed book against the online book for typos and changes.

I'm trying not to deviate from the book too much since this is my first attempt. FBBG!

Thanks for the help.
:study:

Edit: my typo in posts above: localestatedir - should be localstatedir

itsjustme 07-24-2003 03:10 PM

[slaps palm to forehead]

Ok, going back and looking at it again I see the directory assignment 'pattern':

make (localstatedir=/var/lib/misc) (libexecdir=/usr/bin)

and

make (localstatedir=/var/lib/misc) (libexecdir=/usr/bin) install

[/slaps palm to forehead]

:rolleyes:


All times are GMT -5. The time now is 02:22 PM.