# HG changeset patch # User Giulio Moro # Date 1464970166 -3600 # Node ID ccfcf1303f12c751d308ebb86ee213b49df04adc # Parent bd54819ccfa7b7cd46471ee9277e490e7c34c4f3 make run (and similar) run from within the project folder diff -r bd54819ccfa7 -r ccfcf1303f12 Makefile --- a/Makefile Fri Jun 03 17:01:36 2016 +0100 +++ b/Makefile Fri Jun 03 17:09:26 2016 +0100 @@ -187,19 +187,20 @@ runfg: run run: stop Bela - echo "Running $(RUN_COMMAND)" - $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND)" + @cd $(PROJECT_DIR) && $(RUN_COMMAND) runscreen: stop $(OUTPUT_FILE) - echo "Running $(RUN_COMMAND) in a screen" - screen -S $(SCREEN_NAME) -d -m $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND) in a screen" + @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -d -m $(RUN_COMMAND) runscreenfg: stop $(OUTPUT_FILE) - echo "Running $(RUN_COMMAND) in a screen" - screen -S $(SCREEN_NAME) -m $(RUN_COMMAND) + @echo "Running $(RUN_COMMAND) in a screen" + @cd $(PROJECT_DIR) && screen -S $(SCREEN_NAME) -m $(RUN_COMMAND) FIFO_NAME=/tmp/belafifo runscreenfifo: stop $(OUTPUT_FILE) @echo "Running $(RUN_COMMAND), piping output to $(FIFO_NAME)" @rm -rf $(FIFO_NAME) @mkfifo $(FIFO_NAME) + @cd $(PROJECT_DIR) @screen -S $(SCREEN_NAME) -d -m stdbuf -e 0 -i 0 -o 0 bash -c "$(RUN_COMMAND) &> $(FIFO_NAME)" @cat /tmp/belafifo