Makefile: Check for already opened ttyUSBx

If two ttyUSBx interfaces are read from by ts at the same time,
some letters arrive at one terminal and others in the second one.
Therefore only one terminal should be open at all times.
This commit is contained in:
Christina Quast
2015-04-13 22:09:50 +02:00
parent de68867402
commit c63da3f6d5

View File

@@ -184,7 +184,7 @@ program:
SERIAL ?= /dev/ttyUSB0
log:
stty -F $(SERIAL) 115200
sed -u "s/\r//" $(SERIAL) | ts
lsof $(SERIAL) && echo "log is already opened" || ( sed -u "s/\r//" $(SERIAL) | ts )
clean:
-rm -fR $(OBJ)/*.o $(BIN)/*.bin $(BIN)/*.elf $(BIN)/*.elf.txt $(BIN)/*.map $(BIN)/*.lst