From: Michael R. Crusoe <crusoe@debian.org>
Subject: Enable better use of sub-make
Forwarded: https://github.com/trinityrnaseq/Inchworm/pull/1
and https://github.com/trinityrnaseq/trinity_ext_sample_data/pull/2
and https://github.com/trinityrnaseq/trinityrnaseq/pull/1091
--- trinityrnaseq.orig/Inchworm/Makefile
+++ trinityrnaseq/Inchworm/Makefile
@@ -1,8 +1,8 @@
 all:
 	mkdir -p build
-	cd build && cmake -DCMAKE_INSTALL_PREFIX="" ../ && make DESTDIR=../ install
+	cd build && cmake -DCMAKE_INSTALL_PREFIX="" ../ && $(MAKE) DESTDIR=../ install
 
 clean:
 	@echo cleaning
-	(cd build && make clean) || :
+	(cd build && $(MAKE) clean) || :
 	rm -rf ./build ./bin
--- trinityrnaseq.orig/Makefile
+++ trinityrnaseq/Makefile
@@ -60,19 +60,19 @@
 
 
 test_trinity:
-	cd sample_data/test_Trinity_Assembly && make test
+	cd sample_data/test_Trinity_Assembly && $(MAKE) test
 
 
 # note 'test_all': ** this is for a more advanced installation including devel features **
 
 test_all:
-	cd sample_data/ && make test_all
+	cd sample_data/ && $(MAKE) test_all
 	./__pull_trinity_ext_sample_data.sh
-	cd trinity_ext_sample_data/ && make test
+	cd trinity_ext_sample_data/ && $(MAKE) test
 
 test_clean:
-	cd sample_data/ && make clean
-	cd trinity_ext_sample_data/ && make clean
+	cd sample_data/ && $(MAKE) clean
+	cd trinity_ext_sample_data/ && $(MAKE) clean
 
 ###################################################################
 
--- trinityrnaseq.orig/sample_data/Makefile
+++ trinityrnaseq/sample_data/Makefile
@@ -3,7 +3,7 @@
 test_all: test_trin_assembly
 
 test_trin_assembly:
-	cd test_Trinity_Assembly && make test_all
+	cd test_Trinity_Assembly && $(MAKE) test_all
 
 
 clean:
--- trinityrnaseq.orig/trinity-plugins/Makefile
+++ trinityrnaseq/trinity-plugins/Makefile
@@ -51,8 +51,8 @@
 	rm -f ./Trimmomatic # rm symlink
 	cd slclust && $(MAKE) clean
 	cd COLLECTL && rm -rf ${COLLECTL_CODE} && rm -f collectl
-	cd htslib && make clean
-	cd bamsifter && make clean
+	cd htslib && $(MAKE) clean
+	cd bamsifter && $(MAKE) clean
 	rm -f ./htslib.ok
 	@echo "\n\n** Done cleaning plugins area **"
 
--- trinityrnaseq.orig/trinity_ext_sample_data/test_SuperTranscript/Makefile
+++ trinityrnaseq/trinity_ext_sample_data/test_SuperTranscript/Makefile
@@ -1,9 +1,9 @@
 test:
 	./runMe.sh
-	cd indiv_tests && make test
+	cd indiv_tests && $(MAKE) test
 	@touch test
 
 clean:
 	./cleanMe.sh
-	cd indiv_tests && make clean
+	cd indiv_tests && $(MAKE) clean
 
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/10M/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/drosoph_denovo.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/10M/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/drosoph_denovo.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/Annotations/Drosoph_coding.cdna SAMPLES=misc_tests/drosoph_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/Annotations/Drosoph_coding.cdna SAMPLES=misc_tests/drosoph_ref.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/MOUSE_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/mouse_denovo.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/MOUSE_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/mouse_denovo.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/regev_genome_portal/RESOURCES/mouse/mm9/Annotations/mm9_ucsc_genomeStudio_genes/mm9_ucsc_genomeStudio_genes.gtf.trans.fa SAMPLES=misc_tests/mouse_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/regev_genome_portal/RESOURCES/mouse/mm9/Annotations/mm9_ucsc_genomeStudio_genes/mm9_ucsc_genomeStudio_genes.gtf.trans.fa SAMPLES=misc_tests/mouse_ref.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/SCHIZO_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel_trinity/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/schizo_denovo.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/SCHIZO_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel_trinity/trinity_out_dir/Trinity.fasta SAMPLES=misc_tests/schizo_denovo.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/PAIRED_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/home/unix/bhaas/utilities/schizo/SP2_GeneDB.290110.prot_coding.cds.nr SAMPLES=misc_tests/schizo_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/home/unix/bhaas/utilities/schizo/SP2_GeneDB.290110.prot_coding.cds.nr SAMPLES=misc_tests/schizo_ref.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/10M/trinity_out_dir/Trinity.fasta SAMPLES=drosoph.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/10M/trinity_out_dir/Trinity.fasta SAMPLES=drosoph.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Drosoph_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/Annotations/Drosoph_coding.cdna SAMPLES=misc_tests/drosoph_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/DROSOPHILA/Annotations/Drosoph_coding.cdna SAMPLES=misc_tests/drosoph_ref.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/MOUSE_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel/trinity_out_dir/Trinity.fasta SAMPLES=mouse.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/MOUSE_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel/trinity_out_dir/Trinity.fasta SAMPLES=mouse.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Mouse_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/regev_genome_portal/RESOURCES/mouse/mm9/Annotations/mm9_ucsc_genomeStudio_genes/mm9_ucsc_genomeStudio_genes.gtf.trans.fa SAMPLES=misc_tests/mouse_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/regev_genome_portal/RESOURCES/mouse/mm9/Annotations/mm9_ucsc_genomeStudio_genes/mm9_ucsc_genomeStudio_genes.gtf.trans.fa SAMPLES=misc_tests/mouse_ref.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_denovo.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_denovo.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/SCHIZO_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel_trinity/trinity_out_dir/Trinity.fasta SAMPLES=schizo.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/seq/RNASEQ/TRINITY_DEVEL_DATA/SCHIZO_RNASEQ_METHODS_ANALYSIS/10M/SS_trin_test/run_devel_trinity/trinity_out_dir/Trinity.fasta SAMPLES=schizo.samples.txt
--- trinityrnaseq.orig/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_ref.sh
+++ trinityrnaseq/trinity_ext_sample_data/test_align_and_estimate_abundance/SINGLE_END_ABUNDANCE_ESTIMATION/misc_tests/test_Schizo_ref.sh
@@ -1 +1,2 @@
-make TRINITY_FASTA=/home/unix/bhaas/utilities/schizo/SP2_GeneDB.290110.prot_coding.cds.nr SAMPLES=misc_tests/schizo_ref.samples.txt
+MAKE=${MAKE:-make}
+${MAKE} TRINITY_FASTA=/home/unix/bhaas/utilities/schizo/SP2_GeneDB.290110.prot_coding.cds.nr SAMPLES=misc_tests/schizo_ref.samples.txt
