logo

utils-std

Collection of commonly available Unix tools
commit: 1cab789b9c76b456f011015a9dadf01ea24e1d91
parent a49b8b759cad50d7b325cd9c66bd5d0b0473bf2f
Author: Haelwenn (lanodan) Monnier <contact@hacktivis.me>
Date:   Sat, 20 Apr 2024 19:01:57 +0200

makeless.sh: new

Diffstat:

MREADME.md4+++-
Amakeless-regen.sh20++++++++++++++++++++
Amakeless.sh47+++++++++++++++++++++++++++++++++++++++++++++++
3 files changed, 70 insertions(+), 1 deletion(-)

diff --git a/README.md b/README.md @@ -23,7 +23,9 @@ Tested on Linux(musl), FreeBSD, NetBSD, OpenBSD: <https://builds.sr.ht/~lanodan/ - Reimplementing OS-specific utilities like [util-linux](https://www.kernel.org/pub/linux/utils/util-linux/) ## Dependencies -- POSIX System +- C99 Compiler + POSIX C Library +- POSIX Shell +- POSIX Make (optional, see `makeless.sh`) - (optional, test) ATF: <https://github.com/jmmv/atf> - (optional, test) Kyua: <https://github.com/jmmv/kyua> - (optional, test) bwrap: <https://github.com/containers/bubblewrap/> For safely overlaying false files on the root filesystem diff --git a/makeless-regen.sh b/makeless-regen.sh @@ -0,0 +1,20 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +# SPDX-License-Identifier: MPL-2.0 + +make clean +( + printf '#!/bin/sh +# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +# SPDX-License-Identifier: MPL-2.0 +# Generated using ./makeless-regen.sh +# Intended to make it easier to bootstrap a working system, not for regular usage +: ${CC:=cc} +: ${CFLAGS:=-Os -Wall} +: ${M4:=m4} + +set -ex + +' + make -n CC='$$CC' CFLAGS='$$CFLAGS' LDFLAGS='$$LDFLAGS' LDSTATIC='$$LDSTATIC' M4='$$M4' | grep -vF .c.gcov +)> makeless.sh diff --git a/makeless.sh b/makeless.sh @@ -0,0 +1,47 @@ +#!/bin/sh +# SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me> +# SPDX-License-Identifier: MPL-2.0 +# Generated using ./makeless-regen.sh +# Intended to make it easier to bootstrap a working system, not for regular usage +: ${CC:=cc} +: ${CFLAGS:=-Os -Wall} +: ${M4:=m4} + +set -ex + +$CC -std=c99 $CFLAGS -o cmd/arch cmd/arch.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/base64 cmd/base64.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/basename cmd/basename.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/cat cmd/cat.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/chmod cmd/chmod.c lib/mode.c lib/symbolize_mode.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/chroot cmd/chroot.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/date cmd/date.c lib/iso_parse.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/df cmd/df.c lib/humanize.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/dirname cmd/dirname.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/echo cmd/echo.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/env cmd/env.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/false cmd/false.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/id cmd/id.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/link cmd/link.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/logname cmd/logname.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/mkdir cmd/mkdir.c lib/mode.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/nice cmd/nice.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/nohup cmd/nohup.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/nproc cmd/nproc.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/pathchk cmd/pathchk.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/pwd cmd/pwd.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/realpath cmd/realpath.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/rm cmd/rm.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/rmdir cmd/rmdir.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/seq cmd/seq.c -lm $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/sleep cmd/sleep.c lib/strtodur.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/strings cmd/strings.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/sync cmd/sync.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/tee cmd/tee.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/time cmd/time.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/touch cmd/touch.c lib/iso_parse.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/true cmd/true.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/tty cmd/tty.c $LDFLAGS $LDSTATIC +$CC -std=c99 $CFLAGS -o cmd/unlink cmd/unlink.c $LDFLAGS $LDSTATIC +$M4 cmd/date.1.in > build/cmd/date.1 +$M4 cmd/touch.1.in > build/cmd/touch.1