summaryrefslogtreecommitdiff
path: root/examples/sge/Makefile
blob: e0baff64a5ec5d03ade491d54a614dbf0e0a3c80 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
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