Build diffutils 2.7.

This commit is contained in:
Andrius Štikonas 2021-01-11 20:52:52 +00:00
parent 238e9359b0
commit c4528a0dac
3 changed files with 50 additions and 0 deletions

View File

@ -95,6 +95,15 @@ popd
cp "$(basename $url .tar).kaem" tmp/after
cp "../sources/$(basename $url)" tmp/after
# diffutils 2.7
url=https://ftp.gnu.org/gnu/diffutils/diffutils-2.7.tar.gz
pushd ../sources
wget --continue "$url"
popd
cp "$(basename $url .tar.gz).kaem" tmp/after
cp "../sources/$(basename $url)" tmp/after
# General cleanup
find tmp -name .git -exec rm -rf \;

View File

@ -63,3 +63,10 @@ cd ..
cd gzip-1.2.4
kaem --file ../gzip-1.2.4.kaem
cd ..
# Part 10: diffutils
/after/bin/gunzip diffutils-2.7.tar.gz
/after/bin/tar xf diffutils-2.7.tar
cd diffutils-2.7
kaem --file ../diffutils-2.7.kaem
cd ..

34
sysa/diffutils-2.7.kaem Executable file
View File

@ -0,0 +1,34 @@
#!/bin/sh
set -ex
# Variables
bindir=/after/bin
# Touch config.h file
catm config.h
# Compile
tcc -c -I. -DNULL_DEVICE=\"/dev/null\" cmp.c
tcc -c -I. cmpbuf.c
tcc -c -I. error.c
tcc -c -I. getopt.c
tcc -c -I. getopt1.c
tcc -c -I. xmalloc.c
tcc -c -I. version.c
tcc -c -I. diff.c
tcc -c -I. analyze.c
tcc -c -I. -DHAVE_DIRENT_H dir.c
tcc -c -I. io.c
tcc -c -I. -DHAVE_DUP2 -DHAVE_FORK=0 util.c
tcc -c -I. context.c
tcc -c -I. ed.c
tcc -c -I. ifdef.c
tcc -c -I. normal.c
tcc -c -I. side.c
tcc -c -I. fnmatch.c
tcc -c -I. regex.c
# Link
tcc -o ${bindir}/cmp cmp.o cmpbuf.o error.o getopt.o getopt1.o xmalloc.o version.o
tcc -o ${bindir}/diff diff.o analyze.o cmpbuf.o dir.o io.o util.o context.o ed.o ifdef.o normal.o side.o fnmatch.o getopt.o getopt1.o regex.o version.o