lfs cvs 20020929 makefile

Thomas de Roo thomas.de.roo at hccnet.nl
Tue Oct 1 09:08:31 PDT 2002


On Tuesday 01 October 2002 17:54, you wrote:
> I have the file included. 

Or at least I wanted to. Here it is.

Groeten,
Thomas
-------------- next part --------------
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
# Thia is the Chapter 5 and 6 Makefile for Linux From Scratch, version        #
# 			20020929-1556 (LFS RC 1)			      #
#									      #
# The original Makefile by Christophe Devine can be found @ 		      #
# 					http://devine.nerim.net/Makefile      #
#									      #
# any comments or suggestions: Hugo Patrício @ lfs-portugal at netcabo.pt        #
#									      #
#	COMPILEFLAGS-option added, 1/10/02, Thomas.de.Roo at hccnet.nl	      #
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #

LFS=/mnt/lfs
COMPILEFLAGS='-O3 -march=athlon -mcpu=athlon'

all:

	test "`basename \`pwd\``" = "lfs-packages-20020929-1556"

	mkdir -p $(LFS)/static/src
	cp  -v * $(LFS)/static/src

	cd $(LFS)/static/src && \
	md5sum  -c 00MD5SUMS && \
	\
	make	static-bash       static-binutils   static-bzip2	\
		static-diffutils  static-fileutils  static-findutils	\
		static-gawk       static-gcc        static-grep		\
		static-gzip       static-make       static-patch	\
		static-sed        static-sh-utils   static-tar		\
		static-texinfo    static-textutils  static-util-linux

	find $(LFS)/static -type f -print -exec strip -g {} 2>/dev/null \;

	su -c " \
	chroot $(LFS) /static/bin/env -i HOME=/root TERM=$(TERM) \
	    PS1='\u:\w\$ ' \
	    PATH=/bin:/usr/bin:/sbin:/usr/sbin:/static/bin \
	    /static/bin/bash -c \
	' cd /static/src && make inside-chroot SHELL=/static/bin/bash ' "

static-bash:

	test -e /usr/lib/libcurses.a

	bzip2 -dc bash-2.05a.tar.bz2 | tar -xv && \
	cd bash-2.05a && \
	\
	./configure --enable-static-link \
	    --prefix=$(LFS)/static --with-curses && \
	make && \
	make install

	rm -rf bash-2.05a

static-binutils:

	bzip2 -dc binutils-2.13.tar.bz2 | tar -xv && \
	cd binutils-2.13 && \
	\
	mkdir ../binutils-build && \
	cd ../binutils-build && \
	../binutils-2.13/configure --prefix=$(LFS)/static --disable-nls && \
	make LDFLAGS=-all-static && \
	make install
	
	rm -rf binutils-build
	rm -rf binutils-2.13

static-bzip2:

	bzip2 -dc bzip2-1.0.2.tar.bz2 | tar -xv && \
	cd bzip2-1.0.2 && \
	\
	make CC="gcc -static" && \
	make PREFIX=$(LFS)/static install
	
	rm -rf bzip2-1.0.2

static-diffutils:

	bzip2 -dc diffutils-2.8.1.tar.bz2 | tar -xv && \
	cd diffutils-2.8.1 && \
	\
	LDFLAGS=-static CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static --disable-nls && \
	make && \
	make install

	rm -rf diffutils-2.8.1

static-fileutils:

	bzip2 -dc fileutils-4.1.tar.bz2 | tar -xv && \
	cd fileutils-4.1 && \
	\
	bzip2 -dc ../fileutils-4.1.patch.bz2 | patch -Np1 && \
	LDFLAGS=-static \
	./configure --disable-nls --prefix=$(LFS)/static && \
	make && \
	make install

	rm -rf fileutils-4.1

static-findutils:

	bzip2 -dc findutils-4.1.tar.bz2 | tar -xv && \
	cd findutils-4.1 && \
	\
	bzip2 -dc ../findutils-4.1.patch.bz2 | patch -Np1 && \
	CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf findutils-4.1

static-gawk:

	bzip2 -dc gawk-3.1.1.tar.bz2 | tar -xv && \
	cd gawk-3.1.1 && \
	\
	CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static --disable-nls && \
	make LDFLAGS=-static && \
	make install

	rm -rf gawk-3.1.1

static-gcc:

	bzip2 -dc gcc-3.2.tar.bz2 | tar -xv && \
	cd gcc-3.2 && \
	\
	bzip2 -dc ../gcc-3.2.patch.bz2 | patch -Np1 && \
	bzip2 -dc ../gcc-3.2-nofixincludes.2.patch.bz2 | patch -Np1 && \
	mkdir ../gcc-build && \
	cd ../gcc-build && \
	../gcc-3.2/configure --prefix=/static --enable-languages=c \
	--disable-nls --disable-shared && \
	echo "#define HAVE_GAS_HIDDEN 1" >> gcc/auto-host.h && \
	make BOOT_LDFLAGS=-static bootstrap && \
	make prefix=$(LFS)/static install && \
	ln -s gcc $(LFS)/static/bin/cc
	
	rm -rf gcc-build
	rm -rf gcc-3.2

static-grep:

	bzip2 -dc grep-2.5.tar.bz2 | tar -xv && \
	cd grep-2.5 && \
	\
	LDFLAGS=-static CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static --disable-nls \
	    --disable-perl-regexp && \
	make && \
	make install
	
	rm -rf grep-2.5

static-gzip:

	bzip2 -dc gzip-1.2.4a.tar.bz2 | tar -xv && \
	cd gzip-1.2.4a && \
	\
	./configure --prefix=$(LFS)/static && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf gzip-1.2.4a

static-make:

	bzip2 -dc make-3.79.1.tar.bz2 | tar -xv && \
	cd make-3.79.1 && \
	\
	./configure --prefix=$(LFS)/static --disable-nls && \
	make LDFLAGS=-static && \
	make install

	rm -rf make-3.79.1

static-patch:

	bzip2 -dc patch-2.5.4.tar.bz2 | tar -xv && \
	cd patch-2.5.4 && \
	\
	CPPFLAGS=-D_GNU_SOURCE \
	./configure --prefix=$(LFS)/static && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf patch-2.5.4

static-sed:

	bzip2 -dc sed-3.02.tar.bz2 | tar -xv && \
	cd sed-3.02 && \
	\
	CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static && \
	make LDFLAGS=-static && \
	make install

	rm -rf sed-3.02

static-sh-utils:

	bzip2 -dc sh-utils-2.0.tar.bz2 | tar -xv && \
	cd sh-utils-2.0 && \
	\
	bzip2 -dc ../sh-utils.patch.bz2 | patch -Np1 && \
	./configure --prefix=$(LFS)/static \
	    --disable-nls && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf sh-utils-2.0

static-tar:

	bzip2 -dc tar-1.13.tar.bz2 | tar -xv && \
	cd tar-1.13 && \
	\
	bzip2 -dc ../tar-1.13.patch.bz2 | patch -Np1 && \
	\
	./configure --prefix=$(LFS)/static --disable-nls && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf tar-1.13

static-texinfo:

	bzip2 -dc texinfo-4.2.tar.bz2 | tar -xv && \
	cd texinfo-4.2 && \
	\
	LDFLAGS=-static ./configure --prefix=$(LFS)/static \
	    --disable-nls && \
	make && \
	make install
	
	rm -rf texinfo-4.2

static-textutils:

	bzip2 -dc textutils-2.1.tar.bz2 | tar -xv && \
	cd textutils-2.1 && \
	\
	CPPFLAGS=-Dre_max_failures=re_max_failures2 \
	./configure --prefix=$(LFS)/static \
	    --disable-nls && \
	make LDFLAGS=-static && \
	make install
	
	rm -rf textutils-2.1

static-util-linux:

	bzip2 -dc util-linux-2.11u.tar.bz2 | tar -xv && \
	cd util-linux-2.11u && \
	\
	./configure && \
	make -C lib && \
	make -C mount LDFLAGS=-static mount umount && \
	cp mount/{mount,umount} $(LFS)/static/bin
	
	rm -rf util-linux-2.11u

inside-chroot:

	chown -R 0:0 /

	mkdir -p /{bin,boot,dev/pts,etc/opt,home,lib,mnt,proc} && \
	mkdir -p /{root,sbin,tmp,usr/local,var,opt} && \
	for dirname in /usr /usr/local ; \
	    do \
	    mkdir $$dirname/{bin,etc,include,lib,sbin,share,src} ; \
	    ln -s share/{man,doc,info} $$dirname ; \
	    mkdir $$dirname/share/{dict,doc,info,locale,man} ; \
	    mkdir $$dirname/share/{nls,misc,terminfo,zoneinfo} ; \
	    mkdir $$dirname/share/man/man{1,2,3,4,5,6,7,8} ; \
	done && \
	mkdir /var/{lock,log,mail,run,spool} && \
	mkdir -p /var/{tmp,opt,cache,lib/misc,local} && \
	mkdir /opt/{bin,doc,include,info} && \
	mkdir -p /opt/{lib,man/man{1,2,3,4,5,6,7,8}} && \
	ln -s ../var/tmp /usr

	chmod 0750 /root && \
	chmod 1777 /tmp /var/tmp

	echo "root:x:0:0:root:/root:/bin/bash" > /etc/passwd

	echo "root:x:0:"	 > /etc/group
	echo "bin:x:1:"		>> /etc/group
	echo "sys:x:2:"		>> /etc/group
	echo "kmem:x:3:"	>> /etc/group
	echo "tty:x:4:"		>> /etc/group
	echo "tape:x:5:"	>> /etc/group
	echo "daemon:x:6:"	>> /etc/group
	echo "floppy:x:7:"	>> /etc/group
	echo "disk:x:8:"	>> /etc/group
	echo "lp:x:9:"		>> /etc/group
	echo "dialout:x:10:"	>> /etc/group
	echo "audio:x:11:"	>> /etc/group

	ln -s /proc/mounts /etc/mtab

	mount proc /proc -t proc ; true

	ln -s /static/bin/bash /bin/bash && \
	ln -s bash /bin/sh

	mkdir /var/lib/packages ; touch /tmp/timestamp

	cd /static/src && \
	\
	make SHELL=/bin/sh   makedev  linux  man-pages  glibc  gcc zlib \
		findutils gawk ncurses vim  bison less  groff textutils \
		sed flex binutils fileutils  sh-utils gettext net-tools \
		perl linuxthreads m4 texinfo  autoconf  automake  bash  \
		file  libtool  bin86 bzip2  ed  kbd diffutils e2fsprogs \
		grep  gzip  man  lilo  make modutils  netkit-base patch \
		procinfo  procps psmisc  shadow  sysklogd  sysvinit tar \
		util-linux lfs-bootscripts

	rm /tmp/timestamp

log-package:

	rm -f /var/lib/packages/$(P)

	find /{bin,lib,sbin,usr} -cnewer /tmp/timestamp -type f -print \
	    -exec sh -c " /static/bin/strip -g {} 2>/dev/null; \
			  md5sum {} >>/var/lib/packages/$(P) " \;

	touch /tmp/timestamp


makedev:

	bzcat MAKEDEV-1.7.bz2 > /dev/MAKEDEV && \
	cd /dev && \
	chmod 754 MAKEDEV && \
	\
	./MAKEDEV -v generic


linux:

	tar -xvjf linux-2.4.19.tar.bz2 && \
	cd linux-2.4.19 && \
	\
	ln -s /static/bin/pwd /bin/pwd && \
	make mrproper && \
	make include/linux/version.h && \
	make symlinks && \
	mkdir /usr/include/asm && \
	cp include/asm/* /usr/include/asm && \
	cp -R include/linux /usr/include && \
	touch /usr/include/linux/autoconf.h && \
	rm /bin/pwd

	make P=linux-2.4.19 log-package


man-pages:

	tar -xvjf man-pages-1.52.tar.bz2 && \
	cd man-pages-1.52 && \
	\
	make install

	rm -rf man-pages-1.52
	make P=man-pages-1.52 log-package


glibc:makedev  linux  man-pages  glibc  gcc

	tar -xvjf glibc-2.2.5.tar.bz2 && \
	cd glibc-2.2.5 && \
	\
	tar -xvjf ../glibc-linuxthreads-2.2.5.tar.bz2 && \
	bzcat ../glibc-2.2.5-2.patch.bz2 | patch -Np1 && \
	touch /etc/ld.so.conf && \
	mkdir ../glibc-build && \
	cd ../glibc-build && \
	../glibc-2.2.5/configure --prefix=/usr --disable-profile \
	    --enable-add-ons --libexecdir=/usr/bin && \
	echo "cross-compiling = no" > configparms && \
	make && \
	make install && \
	make localedata/install-locales

	rm -rf glibc-build
	rm -rf glibc-2.2.5
	make P=glibc-2.2.5 log-package

gcc:

	tar -xvjf gcc-3.2.tar.bz2 && \
	cd gcc-3.2 && \
	\
	bzcat ../gcc-3.2.patch.bz2 | patch -Np1 && \
	mkdir ../gcc-build && \
	cd ../gcc-build && \
	../gcc-3.2/configure --prefix=/usr --enable-shared \
	    --enable-languages=c,c++ --enable-threads=posix \
	    --with-slibdir=/lib --enable-__cxa_atexit \
	    --enable-clocale=gnu && \
	make bootstrap && \
	make install && \
	ln -sf ../usr/bin/cpp /lib && \
	ln -sf ../bin/cpp /usr/lib && \
	ln -sf gcc /usr/bin/cc

	rm -rf gcc-build
	rm -rf gcc-3.2
	make P=gcc-3.2 log-package


zlib:
	tar -xvjf zlib-1.1.4.tar.bz2 && \
	cd zlib-1.1.4 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --shared && \
	make LIBS="libz.so.1.1.4 libz.a" && \
	make LIBS="libz.so.1.1.4 libz.a" install && \
	mv /usr/lib/libz.so.* /lib && \
	ln -sf ../../lib/libz.so.1 /usr/lib/libz.so && \
	cp zlib.3 /usr/share/man/man3

	rm -rf zlib-1.1.4
	make P=zlib-1.1.4 log-package

findutils:

	tar -xvjf findutils-4.1.tar.bz2 && \
	cd findutils-4.1 && \
	\
	bzcat ../findutils-4.1.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make localstatedir=/var/lib/misc libexecdir=/usr/bin && \
	make localstatedir=/var/lib/misc libexecdir=/usr/bin install

	rm -rf findutils-4.1
	make P=findutils-4.1 log-package

gawk:

	tar -xvjf gawk-3.1.1.tar.bz2 && \
	cd gawk-3.1.1 && \
	\
	bzcat ../gawk-3.1.1-2.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --libexecdir=/usr/bin && \
	make && \
	make install

	rm -rf gawk-3.1.1
	make P=gawk-3.1.1 log-package

ncurses:

	tar -xvjf ncurses-5.2.tar.bz2 && \
	cd ncurses-5.2 && \
	\
	bzcat ../ncurses-5.2-2.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --with-shared && \
	make && \
	make install && \
	chmod 755 /usr/lib/*.5.2 && \
	mv /usr/lib/libncurses.so.5* /lib && \
	ln -s libncurses.a /usr/lib/libcurses.a && \
	ln -sf ../../lib/libncurses.so.5 /usr/lib/libncurses.so && \
	ln -sf ../../lib/libncurses.so.5 /usr/lib/libcurses.so

	rm -rf ncurses-5.2
	make P=ncurses-5.2 log-package

vim:

	tar -xvjf vim-6.1.tar.bz2 && \
	cd vim61 && \
	\
	bzcat ../vim-6.1.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make CPPFLAGS=-DSYS_VIMRC_FILE=\\\"/etc/vimrc\\\" && \
	make install && \
	ln -s vim /usr/bin/vi

	rm -rf vim61
	make P=vim-6.1 log-package

bison:

	tar -xvjf bison-1.35.tar.bz2 && \
	cd bison-1.35 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	echo '#!/bin/sh'			 > /usr/bin/yacc
	echo '# Begin /usr/bin/yacc'		>> /usr/bin/yacc
	echo ''					>> /usr/bin/yacc
	echo 'exec /usr/bin/bison -y "$@"'	>> /usr/bin/yacc
	echo ''			5-gcc		>> /usr/bin/yacc
	echo '# End /usr/bin/yacc'		>> /usr/bin/yacc
	chmod 755 /usr/bin/yacc

	rm -rf bison-1.35
	make P=bison-1.35 log-package

less:

	tar -xvjf less-374.tar.bz2 && \
	cd less-374 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --bindir=/bin --sysconfdir=/etc && \
	make && \
	make install

	rm -rf less-374
	make P=less-374 log-package

groff:

	tar -xvjf groff-1.18.tar.bz2 && \
	cd groff-1.18 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make PROCESSEDEXAMPLEFILES="" && \
	make PROCESSEDEXAMPLEFILES="" install && \
	ln -s soelim /usr/bin/zsoelim && \
	ln -s eqn /usr/bin/geqn && \
	ln -s tbl /usr/bin/gtbl

	rm -rf groff-1.18
	make P=groff-1.18 log-package

textutils:

	tar -xvjf textutils-2.1.tar.bz2 && \
	cd textutils-2.1 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install && \
	mv /usr/bin/{cat,head} /bin

	rm -rf textutils-2.1
	make P=textutils-2.1 log-package

sed:

	tar -xvjf sed-3.02.tar.bz2 && \
	cd sed-3.02 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --bindir=/bin && \
	make && \
	make install

	rm -rf sed-3.02
	make P=sed-3.02 log-package

flex:

	tar -xvjf flex-2.5.4a.tar.bz2 && \
	cd flex-2.5.4 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	echo '#!/bin/sh'			 > /usr/bin/lex
	echo '# Begin /usr/bin/lex'		>> /usr/bin/lex
	echo ''					>> /usr/bin/lex
	echo 'exec /usr/bin/flex -l "$$@"'	>> /usr/bin/lex
	echo ''					>> /usr/bin/lex
	echo '# End /usr/bin/lex'		>> /usr/bin/lex
	chmod 755 /usr/bin/lex

	rm -rf flex-2.5.4
	make P=flex-2.5.4a log-package

binutils:

	tar -xvjf binutils-2.13.tar.bz2 && \
	cd binutils-2.13 && \
	\
	mkdir ../binutils-build && \
	cd ../binutils-build && \
	../binutils-2.13/configure --prefix=/usr --enable-shared && \
	make tooldir=/usr && \
	make tooldir=/usr install && \
	make tooldir=/usr install-info && \
	cp ../binutils-2.13/include/libiberty.h /usr/include

	rm -rf binutils-build
	rm -rf binutils-2.13
	make P=binutils-2.13 log-package

fileutils:

	tar -xvjf fileutils-4.1.tar.bz2 && \
	cd fileutils-4.1 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --bindir=/bin && \
	make && \
	make install && \
	ln -sf ../../bin/install /usr/bin

	rm -rf fileutils-4.1
	make P=fileutils-4.1 log-package

sh-utils:

	tar -xvjf sh-utils-2.0.tar.bz2 && \
	cd sh-utils-2.0 && \
	\
	bzcat ../sh-utils-2.0-hostname.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install && \
	mv /usr/bin/{basename,date,echo,false,pwd} /bin && \
	mv /usr/bin/{sleep,stty,su,test,true,uname} /bin && \
	mv /usr/bin/chroot /usr/sbin

	ln -sf test /bin/[

	rm -rf sh-utils-2.0
	make P=sh-utils-2.0 log-package

gettext:

	tar -xvjf gettext-0.11.5.tar.bz2 && \
	cd gettext-0.11.5 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf gettext-0.11.5
	make P=gettext-0.11.2 log-package

net-tools:

	tar -xvjf net-tools-1.60.tar.bz2 && \
	cd net-tools-1.60 && \
	\
	yes "" | make && \
	make update

	rm -rf net-tools-1.60
	make P=net-tools-1.60 log-package

perl:

	tar -xvjf perl-5.8.0.tar.bz2 && \
	cd perl-5.8.0 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure.gnu --prefix=/usr && \
	make && \
	make install

	rm -rf perl-5.8.0
	make P=perl-5.8.0 log-package


linuxthreads:

	tar -xvjf glibc-linuxthreads-2.2.5.tar.bz2 && \
	cd linuxthreads && \
	\
	cd man && \
	make && \
	make install

	rm -rf linuxthreads
	rm -rf linuxthreads_db
	make P=linuxthreads-2.2.5-manpages log-package

m4:

	tar -xvjf m4-1.4.tar.bz2 && \
	cd m4-1.4 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf m4-1.4
	make P=m4-1.4 log-package

texinfo:

	tar -xvjf texinfo-4.2.tar.bz2 && \
	cd texinfo-4.2 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install && \
	make TEXMF=/usr/share/texmf install-tex

	rm -rf texinfo-4.2
	make P=texinfo-4.2 log-package

autoconf:

	tar -xvjf autoconf-2.53.tar.bz2 && \
	cd autoconf-2.53 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf autoconf-2.53
	make P=autoconf-2.53 log-package

automake:

	tar -xvjf automake-1.6.3.tar.bz2 && \
	cd automake-1.6.3 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make install

	rm -rf automake-1.6.3
	make P=automake-1.6.3 log-package

bash:

	tar -xvjf bash-2.05a.tar.bz2 && \
	cd bash-2.05a && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --bindir=/bin && \
	make && \
	make install && \
	ln -sf bash /bin/sh

	rm -rf bash-2.05a
	make P=bash-2.05a log-package

file:

	tar -xvjf file-3.39.tar.bz2 && \
	cd file-3.39 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --datadir=/usr/share/misc && \
	make && \
	make install

	rm -rf file-3.39
	make P=file-3.39 log-package

libtool:

	tar -xvjf libtool-1.4.2.tar.bz2 && \
	cd libtool-1.4.2 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf libtool-1.4.2
	make P=libtool-1.4.2 log-package

bin86:

	tar -xvjf bin86-0.16.3.tar.bz2 && \
	cd bin86-0.16.3 && \
	\
	make && \
	make PREFIX=/usr install

	rm -rf bin86-0.16.3
	make P=bin86-0.16.3 log-package

bzip2:

	tar -xvjf bzip2-1.0.2.tar.bz2 && \
	cd bzip2-1.0.2 && \
	\
	make -f Makefile-libbz2_so && \
	make && \
	make install && \
	cp bzip2-shared /bin/bzip2 && \
	ln -s libbz2.so.1.0 libbz2.so && \
	cp -a libbz2.so* /lib && \
	rm /lib/libbz2.so && \
	ln -s ../../lib/libbz2.so.1.0 /usr/lib/libbz2.so && \
	rm /usr/bin/{bunzip2,bzcat,bzip2} && \
	mv /usr/bin/{bzip2recover,bzless,bzmore} /bin && \
	ln -s bzip2 /bin/bunzip2 && \
	ln -s bzip2 /bin/bzcat

	rm -rf bzip2-1.0.2
	make P=bzip2-1.0.2 log-package

ed:

	tar -xvjf ed-0.2.tar.bz2 && \
	cd ed-0.2 && \
	\
	bzcat ../ed-0.2.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install && \
	mv /usr/bin/{ed,red} /bin

	rm -rf ed-0.2
	make P=ed-0.2 log-package

kbd:

	tar -xvjf kbd-1.06.tar.bz2 && \
	cd kbd-1.06 && \
	\
	bzcat ../kbd-1.06-3.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure && \
	make && \
	make install

	rm -rf kbd-1.06
	make P=kbd-1.06 log-package

diffutils:

	tar -xvjf diffutils-2.8.1.tar.bz2 && \
	cd diffutils-2.8.1 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf diffutils-2.8.1
	make P=diffutils-2.8.1 log-package

e2fsprogs:

	tar -xvjf e2fsprogs-1.27.tar.bz2 && \
	cd e2fsprogs-1.27 && \
	\
	mkdir ../e2fsprogs-build && \
	cd ../e2fsprogs-build && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	../e2fsprogs-1.27/configure --prefix=/usr --with-root-prefix="" \
	    --enable-elf-shlibs && \
	make && \
	make install && \
	make install-libs && \
	install-info /usr/share/info/libext2fs.info /usr/share/info/dir

	rm -rf e2fsprogs-build
	rm -rf e2fsprogs-1.27
	make P=e2fsprogs-1.27 log-package

grep:

	tar -xvjf grep-2.5.tar.bz2 && \
	cd grep-2.5 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --bindir=/bin && \
	make && \
	make install

	rm -rf grep-2.5
	make P=grep-2.5 log-package

gzip:

	tar -xvjf gzip-1.2.4a.tar.bz2 && \
	cd gzip-1.2.4a && \
	\
	bzcat ../gzip-1.2.4b.patch.bz2 | patch -Np1 && \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	cp gzexe.in{,.backup} && \
	sed 's%"BINDIR"%/bin%' gzexe.in.backup > gzexe.in && \
	make && \
	make install && \
	mv /usr/bin/gzip /bin && \
	rm /usr/bin/{gunzip,zcat} && \
	ln -s gzip /bin/gunzip && \
	ln -s gzip /bin/zcat && \
	ln -s gunzip /bin/uncompress

	rm -rf gzip-1.2.4a
	make P=gzip-1.2.4a log-package

man:

	tar -xvjf man-1.5k.tar.bz2 && \
	cd man-1.5k && \
	\
	bzcat ../man-1.5k.patch.bz2 | patch -Np1 && \
	PATH=$$PATH:/usr/bin:/bin \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	    ./configure -default -confdir=/etc && \
	make && \
	make install

	rm -rf man-1.5k
	make P=man-1.5k log-package

lilo:

	tar -xvjf lilo-22.2.tar.bz2 && \
	cd lilo-22.2 && \
	\
	make && \
	make install

	rm -rf lilo-22.2
	make P=lilo-22.2 log-package

make:

	tar -xvjf make-3.79.1.tar.bz2 && \
	cd make-3.79.1 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install && \
	chgrp root /usr/bin/make && \
	chmod 755 /usr/bin/make

	rm -rf make-3.79.1
	make P=make-3.79.1 log-package

modutils:

	tar -xvjf modutils-2.4.19.tar.bz2 && \
	cd modutils-2.4.19 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure && \
	make && \
	make install

	rm -rf modutils-2.4.19
	make P=modutils-2.4.19 log-package

netkit-base:

	tar -xvjf netkit-base-0.17.tar.bz2 && \
	cd netkit-base-0.17 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure && \
	make && \
	make install && \
	cp etc.sample/{services,protocols} /etc

	rm -rf netkit-base-0.17
	make P=netkit-base-0.17 log-package

patch:

	tar -xvjf patch-2.5.4.tar.bz2 && \
	cd patch-2.5.4 && \
	\
	CPPFLAGS=-D_GNU_SOURCE \
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr && \
	make && \
	make install

	rm -rf patch-2.5.4
	make P=patch-2.5.4 log-package

procinfo:

	tar -xvjf procinfo-18.tar.bz2 && \
	cd procinfo-18 && \
	\
	make LDLIBS=-lncurses && \
	make install

	rm -rf procinfo-18
	make P=procinfo-18 log-package

procps:

	tar -xvjf procps-2.0.7.tar.bz2 && \
	cd procps-2.0.7 && \
	\
	bzcat ../procps-2.0.7.patch.bz2 | patch -Np1 && \
	make && \
	make XSCPT="" install && \
	mv /usr/bin/kill /bin

	rm -rf procps-2.0.7
	make P=procps-2.0.7 log-package

psmisc:

	tar -xvjf psmisc-21.tar.bz2 && \
	cd psmisc-21 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr --exec-prefix=/ && \
	make && \
	make install

	rm /usr/share/man/man1/pidof.1

	rm -rf psmisc-21
	make P=psmisc-21 log-package


shadow:

	tar -xvjf shadow-4.0.3.tar.bz2 && \
	cd shadow-4.0.3 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr \
	--libdir=/usr/lib --enable-shared && \
	make && \
	make install && \
	cp etc/{limits,login.access} /etc && \
	sed 's%/var/spool/mail%/var/mail%' \
	etc/login.defs.linux > /etc/login.defs && \
	ln -s vipw /usr/sbin/vigr && \
	rm /bin/vipw && \
	mv /bin/sg /usr/bin && \
	mv /usr/lib/lib{shadow,misc}.so.0* /lib && \
	ln -sf ../../lib/libshadow.so.0 /usr/lib/libshadow.so && \
	ln -sf ../../lib/libmisc.so.0 /usr/lib/libmisc.so

	rm /bin/groups


	rm -rf shadow-4.0.3
	make P=shadow-4.0.3 log-package



sysklogd:

	tar -xvjf sysklogd-1.4.1.tar.bz2 && \
	cd sysklogd-1.4.1 && \
	\
	make && \
	make install

	rm -rf sysklogd-1.4.1
	make P=sysklogd-1.4.1 log-package

sysvinit:

	tar -xvjf sysvinit-2.84.tar.bz2 && \
	cd sysvinit-2.84 && \
	\
	cp src/init.c{,.backup} && \
	sed 's/Sending processes/Sending processes started by init/g' \
	src/init.c.backup > src/init.c && \
	\
	make -C src && \
	make -C src install

	rm -rf sysvinit-2.84
	make P=sysvinit-2.84 log-package

tar:

	tar -xvjf tar-1.13.tar.bz2 && \
	cd tar-1.13 && \
	\
	bzcat ../tar-1.13.patch.bz2 | patch -Np1 && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure --prefix=/usr \
	    --libexecdir=/usr/bin --bindir=/bin && \
	make && \
	make install

	rm -rf tar-1.13
	make P=tar-1.13 log-package

util-linux:

	tar -xvjf util-linux-2.11u.tar.bz2 && \
	cd util-linux-2.11u && \
	\
	cp hwclock/hwclock.c{,.backup} && \
	sed 's%etc/adjtime%var/lib/hwclock/adjtime%' \
	    hwclock/hwclock.c.backup > hwclock/hwclock.c && \
	mkdir -p /var/lib/hwclock && \
	\
	CFLAGS=$(COMPILEFLAGS) \
	CXXFLAGS=$(COMPILEFLAGS) \
	./configure && \
	make HAVE_SLN=yes && \
	make HAVE_SLN=yes install

	rm -rf util-linux-2.11u
	make P=util-linux-2.11u log-package

lfs-bootscripts:

	tar -xvjf lfs-bootscripts-1.10.tar.bz2 && \
	cd lfs-bootscripts-1.10 && \
	\
	cp -a rc.d sysconfig /etc && \
	chown -R root:root /etc/rc.d /etc/sysconfig

	rm -rf lfs-bootscripts-1.10


More information about the lfs-chat mailing list