Build m4-1.4.
This commit is contained in:
parent
c1395e6a4d
commit
54a39c2e33
|
@ -133,6 +133,9 @@ get_file https://ftp.gnu.org/gnu/make/make-3.80.tar.gz
|
||||||
# bzip2 1.0.8
|
# bzip2 1.0.8
|
||||||
get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
|
get_file ftp://sourceware.org/pub/bzip2/bzip2-1.0.8.tar.gz
|
||||||
|
|
||||||
|
# m4 1.4
|
||||||
|
get_file https://ftp.gnu.org/gnu/m4/m4-1.4.tar.gz
|
||||||
|
|
||||||
# General cleanup
|
# General cleanup
|
||||||
find tmp -name .git -exec rm -rf \;
|
find tmp -name .git -exec rm -rf \;
|
||||||
|
|
||||||
|
|
|
@ -96,3 +96,10 @@ cd ..
|
||||||
cd bzip2-1.0.8
|
cd bzip2-1.0.8
|
||||||
kaem --file ../bzip2-1.0.8.kaem
|
kaem --file ../bzip2-1.0.8.kaem
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
|
# Part 15: m4
|
||||||
|
/after/bin/gunzip m4-1.4.tar.gz
|
||||||
|
/after/bin/tar xf m4-1.4.tar
|
||||||
|
cd m4-1.4
|
||||||
|
kaem --file ../m4-1.4.kaem
|
||||||
|
cd ..
|
||||||
|
|
|
@ -0,0 +1,14 @@
|
||||||
|
#!/bin/sh
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
/after/bin/patch -Np0 -i ../patches/m4-1.4/m4-signal-include.patch
|
||||||
|
cp ../m4-1.4.mk Makefile
|
||||||
|
/after/bin/make
|
||||||
|
|
||||||
|
# Install
|
||||||
|
/after/bin/cp m4 /after/bin/m4
|
||||||
|
/after/bin/chmod 755 /after/bin/m4
|
||||||
|
|
||||||
|
# Test
|
||||||
|
/after/bin/m4 --version
|
|
@ -0,0 +1,29 @@
|
||||||
|
PRODUCT = m4
|
||||||
|
VERSION = 1.4
|
||||||
|
|
||||||
|
CC = tcc
|
||||||
|
LD = tcc
|
||||||
|
AR = tcc -ar
|
||||||
|
|
||||||
|
CFLAGS = -I lib \
|
||||||
|
-DPRODUCT=\"$(PRODUCT)\" \
|
||||||
|
-DVERSION=\"$(VERSION)\"
|
||||||
|
-DHAVE_SIGCONTEXT=0
|
||||||
|
|
||||||
|
LDFLAGS = -L . -lm4
|
||||||
|
|
||||||
|
.PHONY: all
|
||||||
|
|
||||||
|
LIB_SRC = regex getopt getopt1 error obstack xmalloc xstrdup
|
||||||
|
LIB_OBJECTS = $(addprefix lib/, $(addsuffix .o, $(LIB_SRC)))
|
||||||
|
|
||||||
|
M4_SRC = m4 builtin debug eval format freeze input macro output path symtab
|
||||||
|
M4_OBJ = $(addprefix src/, $(addsuffix .o, $(M4_SRC)))
|
||||||
|
|
||||||
|
all: m4
|
||||||
|
|
||||||
|
m4: libm4.a $(M4_OBJ)
|
||||||
|
$(CC) $(CFLAGS) $^ $(LDFLAGS) -o $@
|
||||||
|
|
||||||
|
libm4.a: $(LIB_OBJECTS)
|
||||||
|
$(AR) cr $@ $(LIB_OBJECTS)
|
|
@ -0,0 +1,12 @@
|
||||||
|
diff -r -U3 m4-1.4/src/m4.c m4-1.4-patched/src/m4.c
|
||||||
|
--- src/m4.c 1994-11-02 03:14:28.000000000 +0000
|
||||||
|
+++ src/m4.c 2021-01-15 00:19:21.947654461 +0000
|
||||||
|
@@ -19,7 +19,7 @@
|
||||||
|
#include "m4.h"
|
||||||
|
|
||||||
|
#include <getopt.h>
|
||||||
|
-#include <sys/signal.h>
|
||||||
|
+#include <signal.h>
|
||||||
|
|
||||||
|
static void usage _((int));
|
||||||
|
|
Loading…
Reference in New Issue