mirror of
https://github.com/fosslinux/live-bootstrap.git
synced 2026-03-27 05:26:31 +01:00
Swap sed and make.
This allows to use makefile rather than kaem script for building sed. Makefiles for musl and mes are unified into one makefile with some conditional code.
This commit is contained in:
parent
3ed5daa5aa
commit
b9079045db
8 changed files with 37 additions and 50 deletions
|
|
@ -16,40 +16,17 @@ cp ${distfiles}/${pkg}.tar.gz ../src/
|
|||
gunzip -f ../src/${pkg}.tar.gz
|
||||
tar xf ../src/${pkg}.tar
|
||||
cd ${pkg}
|
||||
cp ../../mk/main.mk Makefile
|
||||
|
||||
# Create config.h
|
||||
catm config.h
|
||||
|
||||
# Compile
|
||||
# Build
|
||||
make -f Makefile LIBC=mes
|
||||
|
||||
## 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 -DHAVE_ALLOCA_H -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/regexp.c
|
||||
tcc -c -I . -I lib sed/fmt.c
|
||||
tcc -c -I . -I lib -DPACKAGE=\"sed\" -DVERSION=\"4.0.9\" sed/sed.c
|
||||
|
||||
# Link
|
||||
tcc -static -o ${bindir}/sed -L lib lib/libsed.a compile.o execute.o regexp.o fmt.o sed.o -lsed
|
||||
|
||||
# Test
|
||||
sed --version
|
||||
# Install
|
||||
cp sed/sed ${prefix}/bin/sed
|
||||
chmod 755 ${prefix}/bin/sed
|
||||
|
||||
cd ../..
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue