summaryrefslogtreecommitdiff
path: root/biology/bedtools/files/patch-Makefile
blob: 7dac9b0f8b5996c5361d015c21f468490eaae64d (plain) (blame)
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
35
36
37
38
39
40
41
42
43
44
--- Makefile.orig	2021-01-23 19:33:26 UTC
+++ Makefile
@@ -4,7 +4,8 @@
 # (c) 2009 Aaron Quinlan
 # ==========================
 
-SHELL := /bin/bash -e
+# Use sh for portability and avoid bash extensions in shell commands
+SHELL := /bin/sh -e
 
 VERSION_FILE=./src/utils/version/version_git.h
 RELEASED_VERSION_FILE=./src/utils/version/version_release.txt
@@ -21,7 +22,8 @@ OBJ_DIR	= obj
 BIN_DIR	= bin
 SRC_DIR	= src
 
-CXX     = g++
+# Default if not provided via the environment or make args
+CXX     ?= g++
 
 ifeq ($(DEBUG),1)
 BT_CPPFLAGS = -DDEBUG -D_DEBUG -D_FILE_OFFSET_BITS=64 -DWITH_HTS_CB_API $(INCLUDES)
@@ -41,7 +43,8 @@ endif
 BT_LDFLAGS =
 BT_LIBS    = -lz -lm -lbz2 -llzma -lpthread
 
-prefix ?= /usr/local
+# Default if not provided via the environment or make args
+PREFIX ?= /usr/local
 
 SUBDIRS = $(SRC_DIR)/annotateBed \
 		  $(SRC_DIR)/bamToBed \
@@ -197,9 +200,9 @@ $(BIN_DIR)/intersectBed: | $(BIN_DIR)
 .PHONY: all
 
 install: all
-	mkdir -p $(DESTDIR)$(prefix)/bin
+	mkdir -p $(DESTDIR)$(PREFIX)/bin
 	for file in bin/* ; do \
-		cp -f $$file $(DESTDIR)$(prefix)/bin; \
+		cp -f $$file $(DESTDIR)$(PREFIX)/bin; \
 	done
 
 print_banner: