true(1)
This commit is contained in:
parent
e27110d9e9
commit
d7eb2b3d43
6
Makefile
6
Makefile
@ -35,6 +35,7 @@ cleanprograms:
|
|||||||
$(RM) bin/rlencode
|
$(RM) bin/rlencode
|
||||||
$(RM) bin/roll
|
$(RM) bin/roll
|
||||||
$(RM) bin/tail
|
$(RM) bin/tail
|
||||||
|
$(RM) bin/true
|
||||||
|
|
||||||
libraries: libio libshell stdbool sysexits
|
libraries: libio libshell stdbool sysexits
|
||||||
|
|
||||||
@ -56,7 +57,7 @@ sysexits_bin: src/sysexits.c
|
|||||||
sysexits: sysexits_bin
|
sysexits: sysexits_bin
|
||||||
bin/sysexits >include/sysexits.h
|
bin/sysexits >include/sysexits.h
|
||||||
|
|
||||||
programs: echo false id lowercase nonzero simexec sleep streq str
|
programs: echo false id lowercase nonzero roll simexec sleep streq str true
|
||||||
|
|
||||||
calculate: libstr sysexits src/calculate.c
|
calculate: libstr sysexits src/calculate.c
|
||||||
$(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c
|
$(CC) $(CFLAGS) -o src/calculate.o -c src/calculate.c
|
||||||
@ -136,6 +137,9 @@ tail.o: libio src/tail.c
|
|||||||
tail: libio tail.o
|
tail: libio tail.o
|
||||||
$(CC) $(CFLAGS) -o bin/tail build/libio.o build/tail.o
|
$(CC) $(CFLAGS) -o bin/tail build/libio.o build/tail.o
|
||||||
|
|
||||||
|
true: src/true.c
|
||||||
|
$(CC) $(CFLAGS) -o bin/true src/true.c
|
||||||
|
|
||||||
usefulmacros: include/usefulmacros.h
|
usefulmacros: include/usefulmacros.h
|
||||||
|
|
||||||
which: libshell src/which.c
|
which: libshell src/which.c
|
||||||
|
14
bin/cscript
14
bin/cscript
@ -1,14 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
set -e
|
|
||||||
|
|
||||||
TMPDIR="/tmp/cscript/"
|
|
||||||
TMPSRC="$TMPDIR/script.c"
|
|
||||||
TMPOUT="$TMPDIR/a.out"
|
|
||||||
|
|
||||||
[ -d "$TMPDIR" ] || mkdir -p "$TMPDIR"
|
|
||||||
|
|
||||||
printf "%s" "$1" >"$TMPSRC"
|
|
||||||
|
|
||||||
cc -o "$TMPOUT" "$TMPSRC"
|
|
||||||
|
|
||||||
dd bs=1 2>/dev/null | "$TMPOUT"
|
|
1
src/true.c
Normal file
1
src/true.c
Normal file
@ -0,0 +1 @@
|
|||||||
|
int main(){ return 0; }
|
Loading…
Reference in New Issue
Block a user