-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
35 lines (25 loc) · 1.2 KB
/
Makefile
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
26
27
28
29
30
31
32
33
34
################################################################################
### Standard Makefile intro
################################################################################
# Important check
MAKEFLAGS+=--warn-undefined-variables
# Causes the commands in a recipe to be issued in the same shell (beware cd commands not executed in a subshell!)
.ONESHELL:
SHELL:=/bin/bash
# When using ONESHELL, we want to exit on error (-e) and error if a command fails in a pipe (-o pipefail)
# When overriding .SHELLFLAGS one must always add a tailing `-c` as this is the default setting of Make.
.SHELLFLAGS:=-e -o pipefail -c
# Invoke the all target when no target is explicitly specified.
.DEFAULT_GOAL:=help
# Delete targets if their recipe exits with a non-zero exit code.
.DELETE_ON_ERROR:
################################################################################
### The actual Makefile
################################################################################
# Rule to generate .tsv files from .tsv.gz files
%.tsv: %.tsv.gz
gunzip -c $< > $@
# Rule to download .tsv.gz files using wget
import/%.tsv.gz:
mkdir -p import
wget --timestamping -P import "https://datasets.imdbws.com/$*.tsv.gz"