Eu finalmente consegui consertar o Makefile. Eu acho que funciona bem. Obviamente, não é um repositório profissional, mas faz o trabalho. O Makefile:
-include name
all: download
PHONY: all, download, upload, getFiles
DIFFFLAGS = -uNr
.ONESHELL:
getFiles:
rm .tmp -r
mkdir .tmp
(ssh $(user)@$(HOST) "tar c ") | tar xv -C .tmp
download: getFiles
diff $(DIFFFLAGS) program .tmp/roboty | patch -p1 -d program
upload: getFiles
diff $(DIFFFLAGS) .tmp/roboty program | (ssh $(user)@$(HOST) "umask 070 && patch -p1")
patch-extern:
diff $(DIFFFLAGS) program program-workplace | patch -p1 -d program
patch-local:
diff $(DIFFFLAGS) program program-workplace | patch -p1 -dR program-workplace
backup:
tar cf backup.tar program-workplace
.ONESHELL:
clear:
rm 'find program-workplace/ -name "*~"'
rm 'find program-workplace/ -name "*.class"'