1
0

independ echo

This commit is contained in:
dtb
2022-09-16 10:56:10 -04:00
parent 980b4bae35
commit bf073593c8
4 changed files with 35 additions and 5 deletions

28
echo/Makefile Normal file
View File

@@ -0,0 +1,28 @@
all: echo
clean:
rm -rf ../dist/echo ../dist/echo.tar ../dist/echo.tar.gz echo
dist: ../dist/echo.tar.gz
sane: echo.c ../include/sysexits.h
$(CC) -DDONT_USE_SYSTEM_SYSEXITS -o echo echo.c
echo: echo.c
$(CC) -o echo echo.c
../dist/echo: echo
mkdir -p ../dist/echo.tmp/bin/ ../dist/echo.tmp/share/man/man1/
cp echo ../dist/echo.tmp/bin/echo
cp echo.1 ../dist/echo.tmp/share/man/man1/echo.1
mv ../dist/echo.tmp ../dist/echo
../dist/echo.tar: ../dist/echo
cd ../dist/echo && pax -w -x ustar . >../echo.tar.tmp
mv ../dist/echo.tar.tmp ../dist/echo.tar
../dist/echo.tar.gz: ../dist/echo.tar
gzip -c <../dist/echo.tar >../dist/echo.tar.gz.tmp
mv ../dist/echo.tar.gz.tmp ../dist/echo.tar.gz
.PHONY: all clean sane