Lessons to be learnt from recent events

Richard Lightman richard at nezumi.plus.com
Wed Jan 29 07:08:00 PST 2003

* Jack Brown <jbrown at kmts.ca> [2003-01-29 12:56]:
> There is slightly more to it than what I have said (eg Perl doesent like
I have solved that one. here are the perl overrides fro my makefiles:

perl:STAGE_CONFIGURE=$(command) ./Configure $(configure)
define perl_problems
$(command) mv config.sh config.sh~
$(command) sed -e "s@^\(install[^v].*='*\)\(/.*\)@\1$(DESTDIR)\2@" config.sh~ >$(vpath)/config.sh
perl_config_pm=$(prefix)/lib/perl5/*/$(shell uname -m)*/Config.pm
define more_perl_problems
$(command) sed 's@$(DESTDIR)@@' >perl_screwed_up_destdir $(call glob,$(CURDIR)/destdir$(prefix)/lib/perl5/*/*/.packlist)
$(command) cp  $(__ralfs_sandbox)perl_screwed_up_destdir $(call glob,$(CURDIR)/destdir$(prefix)/lib/perl5/*/*/.packlist)
$(command) sed 's@$(DESTDIR)@@' >perl_screwed_up_destdir $(call glob,$(CURDIR)/destdir$(perl_config_pm))
$(command) chmod 644 $(call glob,$(CURDIR)/destdir$(perl_config_pm))
$(command) cp  $(__ralfs_sandbox)perl_screwed_up_destdir $(call glob,$(CURDIR)/destdir$(perl_config_pm))

Notes: Make makefiles work by overiding intelligent defaults. The
defaults start with 'configure --prefix=/usr', 'make', 'make install',
and do sensible things if configure does not exist, or if there is
no makefile. Many packages do not require any build instructions
to work with my makefiles. It is also possible to apply an override
to a group of packages, so only 6 overrides are required to handle
all the kde packages.

configure       -- options for configure command
prefix          -- default valure is /usr
STAGE_CONFIGURE -- runs configure, possibly from a separate directory
                   from the source.
command         -- Change root, user, directory, and environment to the
                   coorrect values
perl_problems   -- At present there is no syntax in make for target
                   specific verbatim variables.
vpath           -- The directory where the build take place. For
                   packages that do not support building in a separate
                   directory from the sources, this is the source
                   directory. It is needed here because the IO
                   redirection takes place in a shell run by make that
                   has not yet run $(command)
AFTER_INSTALL   -- space to put extra commands after configure runs.
test            -- if set, the make target for the self test
perl_config_pm  -- does not appear to need the uname hack when
                   compiling for 486 on a 686.
$(DESTDIR)      -- absolute path for DESTDIR, taking into acount that
                   there might be a chroot.
AFTER_INSTALL   -- space to put extra commands after 'make install'.
glob            -- piece of magic to correct shell globs expanded
                   before chroot, but rewquired in chroot.
CURDIR          -- The current directory for make, and the shells it
__ralfs_sandbox -- Like CURDIR, but without $(LFS) because make has
                   the host's root directory (at this stage), but
                   after $(command), cp will have the new root

I install everything with DESTDIR - If you want the trick for for the
other difficult package (shadow), just ask.

There is something in the perl man-pages about installing on an andrew
filesystem (I think these have a read only mount point, and a separate
mountpoint for writing). This could probably be adapted to make perl
work with DESTDIR, but requires more knowledge of perl than I have
patience for learning.

Unsubscribe: send email to listar at linuxfromscratch.org
and put 'unsubscribe lfs-dev' in the subject header of the message

More information about the lfs-dev mailing list