Update sed to 4.0.7.

This commit is contained in:
Andrius Štikonas 2021-01-11 18:57:12 +01:00
parent 4b88b5a6f0
commit 58b85adbf9
7 changed files with 46 additions and 26 deletions

6
.gitmodules vendored
View File

@ -22,6 +22,6 @@
[submodule "sysa/tcc-0.9.27"]
path = sysa/tcc-0.9.27
url = git://repo.or.cz/tinycc.git
[submodule "sysa/sed-1.18"]
path = sysa/sed-1.18
url = git://git.savannah.gnu.org/sed/sed-history.git
[submodule "sysa/sed-4.0.7"]
path = sysa/sed-4.0.7
url = https://git.savannah.gnu.org/git/sed/sed-history.git

View File

@ -75,9 +75,9 @@ popd
mkdir -p ../sources
# sed 1.18
cp sed-1.18.kaem tmp/after
cp -r sed-1.18 tmp/after
# sed 4.0.7
cp sed-4.0.7.kaem tmp/after
cp -r sed-4.0.7 tmp/after
# General cleanup
find tmp -name .git -exec rm -rf \;

View File

@ -49,6 +49,6 @@ kaem --file mes.kaem
kaem --file tcc.kaem
# Part 7: sed
cd sed-1.18
kaem --file ../sed-1.18.kaem
cd sed-4.0.7
kaem --file ../sed-4.0.7.kaem
cd ..

@ -1 +0,0 @@
Subproject commit cff4df55786bae5f4f0c042a13d30cd1a962040c

View File

@ -1,17 +0,0 @@
#!/bin/sh
set -ex
# Variables
bindir=/after/bin
# Compile
tcc -c getopt1.c
tcc -c getopt.c
tcc -c regex.c
tcc -c utils.c
tcc -c -Dalloca alloca.c
tcc -c -DHAVE_BCOPY sed.c
# Link
tcc -static -o ${bindir}/sed alloca.o getopt1.o getopt.o regex.o sed.o utils.o

1
sysa/sed-4.0.7 Submodule

@ -0,0 +1 @@
Subproject commit b8fb156db0eedfd28db3340b418591e8fcab08bc

37
sysa/sed-4.0.7.kaem Executable file
View File

@ -0,0 +1,37 @@
#!/bin/sh
set -ex
# Variables
bindir=/after/bin
catm config.h
# Compile
## libsed.a
cd lib
tcc -c getopt1.c
tcc -c -I .. getopt.c
tcc -c -I .. -DENABLE_NLS=0 utils.c
cp regex_.h regex.h
tcc -c -I . regex.c
tcc -c obstack.c
tcc -c strverscmp.c
tcc -c getline.c
tcc -c -DHAVE_FCNTL_H mkstemp.c
tcc -ar cr libsed.a getopt1.o getopt.o utils.o regex.o obstack.o strverscmp.o getline.o mkstemp.o
cd ..
## sed
tcc -c -I . -I lib -DSED_FEATURE_VERSION=\"4.0\" sed/compile.c
tcc -c -I . -I lib sed/execute.c
tcc -c -I . -I lib sed/regex.c
tcc -c -I . -I lib sed/fmt.c
tcc -c -I . -I lib -DPACKAGE=\"sed\" -DVERSION=\"4.0.7\" sed/sed.c
# Link
tcc -static -o ${bindir}/sed -L lib lib/libsed.a compile.o execute.o regex.o fmt.o sed.o -lsed