1
0

more cleaning!!!

This commit is contained in:
dtb
2022-09-18 20:40:56 -04:00
parent 3b9ff7ddb4
commit 473cbc8123
8 changed files with 62 additions and 90 deletions

View File

@@ -1,28 +1,17 @@
all: echo
TARGETS = echo
all: $(TARGETS)
%: %.c
$(CC) -o $@ $@.c
clean:
rm -rf ../dist/echo ../dist/echo.tar ../dist/echo.tar.gz echo
rm -f $(TARGETS)
dist: ../dist/echo.tar.gz
sane: echo.c ../include/sysexits.h
sane: echo.c ../sysexits/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
../sysexits/sysexits.h:
$(MAKE) -C ../sysexits sysexits.h
.PHONY: all clean sane