Simplify make-3.80 build script.

This commit is contained in:
Andrius Štikonas 2022-04-09 16:21:44 +01:00
parent b2e8e0fea0
commit ef799e567b
3 changed files with 3 additions and 43 deletions

View File

@ -1 +1 @@
178ecd6f29f93270356b46b18e472bfcddeee187c92c9ebeb818d62f2bf4a6b3 /usr/bin/make
28627851f50c7337e145bd2677e95bcc1abbe2b9ee784da19f49df700b2c6ac2 /usr/bin/make

View File

@ -17,9 +17,6 @@ cd ${pkg}
# Create .h files
catm config.h
# Patch
patch -Np0 -i ../../patches/mes-libc.patch
# Compile
tcc -c getopt.c
tcc -c getopt1.c
@ -32,7 +29,7 @@ tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART expand.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DFILE_TIMESTAMP_HI_RES=0 file.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -Dvfork=fork function.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART implicit.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DHAVE_DUP2 -Dvfork=fork job.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DHAVE_DUP2 -DHAVE_STRCHR -Dvfork=fork job.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DLOCALEDIR=\"/fake-locale\" -DPACKAGE=\"fake-make\" -DHAVE_MKTEMP -DHAVE_GETCWD main.c
tcc -c -I. -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DHAVE_STRERROR -DHAVE_VPRINTF misc.c
tcc -c -I. -Iglob -DHAVE_INTTYPES_H -DHAVE_SA_RESTART -DINCLUDEDIR=\"${PREFIX}/include\" read.c
@ -49,7 +46,7 @@ tcc -c -Iglob -DSTDC_HEADERS glob/fnmatch.c
tcc -c -Iglob -DHAVE_STRDUP -DHAVE_DIRENT_H glob/glob.c
# Link
tcc -o ${bindir}/make getopt.o getopt1.o ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o implicit.o job.o main.o misc.o read.o remake.o rule.o signame.o variable.o version.o vpath.o remake.o rule.o signame.o variable.o version.o vpath.o hash.o remote-stub.o getloadavg.o fnmatch.o glob.o
tcc -o ${bindir}/make getopt.o getopt1.o ar.o arscan.o commands.o default.o dir.o expand.o file.o function.o implicit.o job.o main.o misc.o read.o remake.o rule.o signame.o variable.o version.o vpath.o hash.o remote-stub.o getloadavg.o fnmatch.o glob.o
# Test
make --version

View File

@ -1,37 +0,0 @@
SPDX-FileCopyrightText: 2021 Andrius Štikonas <andrius@stikonas.eu>
SPDX-FileCopyrightText: 2021 fosslinux <fosslinux@aussies.space>
SPDX-License-Identifier: GPL-2.0-or-later
Two incompatibilities:
* mes libc does not provide string.h
* lseek is not provided by mes libc
Both of these functions are unused later.
diff --color -ru job.c job.c
--- job.c 2021-01-14 10:26:42.457657979 +1100
+++ job.c 2021-01-14 10:27:03.332776801 +1100
@@ -28,8 +28,6 @@
#include "variable.h"
#include "debug.h"
-#include <string.h>
-
/* Default shell to use. */
#ifdef WINDOWS32
char *default_shell = "sh.exe";
diff --color -ru make.h make.h
--- make.h 2021-01-14 10:26:42.456657974 +1100
+++ make.h 2021-01-14 10:26:51.154707480 +1100
@@ -467,9 +467,6 @@
#if !defined (__GNU_LIBRARY__) && !defined (POSIX) && !defined (_POSIX_VERSION) && !defined(WINDOWS32)
extern long int atol ();
-# ifndef VMS
-extern long int lseek ();
-# endif
#endif /* Not GNU C library or POSIX. */