Build grep-2.4.

This commit is contained in:
Andrius Štikonas 2021-01-20 19:05:10 +00:00
parent 996e6f7c10
commit 089b6d6020
5 changed files with 55 additions and 2 deletions

View file

@ -0,0 +1,23 @@
#!/bin/sh
set -ex
cd build
# Extract
gunzip ../src/${pkg}.tar.gz
tar xf ../src/${pkg}.tar
cd ${pkg}
cp ../../mk/main.mk Makefile
# Build
make
# Install
cp grep /after/bin/grep
chmod 755 /after/bin/grep
# Test
grep --version
cd ../..

21
sysa/grep-2.4/mk/main.mk Normal file
View file

@ -0,0 +1,21 @@
PACKAGE=grep
VERSION=2.4
CC = tcc
LD = tcc
AR = tcc -ar
CFLAGS = -DPACKAGE=\"$(PACKAGE)\" \
-DVERSION=\"$(VERSION)\" \
-DHAVE_DIRENT_H=1 \
-DHAVE_UNISTD_H=1
.PHONY: all
GREP_SRC = grep dfa kwset obstack regex stpcpy savedir getopt getopt1 search grepmat
GREP_OBJECTS = $(addprefix src/, $(addsuffix .o, $(GREP_SRC)))
all: grep
grep: $(GREP_OBJECTS)
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@

View file