diff options
Diffstat (limited to 'build.mk')
| -rw-r--r-- | build.mk | 16 |
1 files changed, 13 insertions, 3 deletions
@@ -6,13 +6,23 @@ # - rules to run tests before installing # - build and run in chroot # + arc ?= $(notdir $(url)) -dir ?= $(basename $(basename $(arc))) configure_cmd ?= ./configure build_cmd ?= make install_cmd ?= sudo make install uninstall_cmd ?= sudo make uninstall +ifdef git_url + fetch_cmd = git clone --depth=1 $(git_url) + extract_cmd = : + dir ?= $(notdir $(git_url)) +else + fetch_cmd = curl -L $(url) -o $(arc) + extract_cmd = gunzip < $(arc) | tar xf - + dir ?= $(basename $(basename $(arc))) +endif + clean: rm -rf .install .build .configure .extract .fetch $(dir) @@ -43,9 +53,9 @@ fetch: .fetch @touch $@ .extract: .fetch - gunzip < $(arc) | tar xf - + $(extract_cmd) @touch $@ .fetch: - curl -L $(url) -o $(arc) + $(fetch_cmd) @touch $@ |
