Couple questions from a newbie

Tomislav Greguric greguric at stud.uni-frankfurt.de
Mon Jul 24 17:03:42 PDT 2000


> Let me see if I understand the build process correctly. When you run
> configure, the script checks a bunch of host-specific things (like cpu,
> libc version, etc) and uses the information it gains to create
> Makefiles. The only thing the configure script does is create Makefiles,
> right?
> 
> Then you run make, which compiles the source and creates a bunch of
> executables, libraries, and possibly other stuff.
> 
> Then you run make install, which copies all the files that are required by
> the package to the appropriate directories, correct?
> 
> Since nothing is compiled until the make stage, it seems that it is
> pointless to set the --prefix option in the configure stage if you are
> just going to override it in the make stage. Does configure do something
> with the option, other than just pass it on to the Makefiles?

In most cases it is correct that only the makefile is generated. But
it is created from template files (Makefile.in), which is the Makefile
but instead of some hardcoded values it contains variables. After a
successfull configure the configure-script reads the Makefile.in,
replaces every variable with the value it has determined and saves the
result as Makefile.

And this is not restricted to makefiles, of course. I've seen some
man-pages using this, too. It is much more useful to have the page say
the correct path to a file instead of something hard-coded ("...look
in your site's config-file /usr/my/own/prefix/etc/example.cfg" instead
of "...look in your site's config-file /usr/local/etc/example.cfg",
for example). Unfortunately, some programs store these informations
hardcoded into the binary usign the same technique, too.

Cheers,
Tomislav
--
Mail archive: http://www.pcrdallas.com/mail-archives/lfs-discuss
IRC access: server: irc.linuxfromscratch.org port: 6667 channel: #LFS
Unsubscribe: email lfs-discuss-request at linuxfromscratch.org and put
"unsubscribe" (without the quotation marks) in the body of the message
(no subject is required)



More information about the lfs-dev mailing list