From 319f10b1f20170adf7efa05938b6bb23584c4729 Mon Sep 17 00:00:00 2001 From: Dave Tang Date: Mon, 22 Jun 2026 20:12:06 +0900 Subject: GNU Make notes --- examples/sge/Makefile | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 examples/sge/Makefile (limited to 'examples/sge/Makefile') diff --git a/examples/sge/Makefile b/examples/sge/Makefile new file mode 100644 index 0000000..e0baff6 --- /dev/null +++ b/examples/sge/Makefile @@ -0,0 +1,25 @@ +.PHONY: all +SHELL := /bin/bash + +FILES := a.txt b.txt c.txt d.txt +all: $(FILES) merged.txt 3.txt + +%.txt: + @echo "Generating: $@" + sleep 5 + echo $(basename $@) > $@ + +merged.txt: $(FILES) + cat $^ | sort > $@ + +1.txt: job1.sh + qsub $< + +2.txt: job2.sh 1.txt + qsub -hold_jid job1 $< + +3.txt: job3.sh 2.txt + qsub -hold_jid job2 $< + +clean: + rm -rf *.txt *.log -- cgit v1.3.1