Makefile now debugged

This commit is contained in:
tth 2018-12-05 16:38:03 +01:00
parent 9729f5ee02
commit 2c702e667e
3 changed files with 17 additions and 2 deletions

3
.gitignore vendored
View File

@ -1,2 +1,5 @@
a.out a.out
*.o
fake-values

View File

@ -0,0 +1,12 @@
#
# must be run with gnu make
#
CC = gcc
funcs.o: funcs.c funcs.h Makefile
gcc -Wall -c $<
fake-values: fake-values.c funcs.o Makefile
gcc -Wall $< funcs.o -o $@

View File

@ -3,11 +3,11 @@
DATAFILE=/tmp/fake-datafile DATAFILE=/tmp/fake-datafile
> ${DATAFILE} > ${DATAFILE}
for s in $(seq 0 20) for s in $(seq 1 20)
do do
v=$(./fake-values 2> /dev/null) v=$(./fake-values 2> /dev/null)
echo $s $v | tee -a ${DATAFILE} echo $s $v | tee -a ${DATAFILE}
done done
awk '{print "> " $2}' < ${DATAFILE} awk '{print NR " " $2}' < ${DATAFILE}