I need to write a simple makefile to launch a program. This program need two input parameter and An output which depend on input file I have all the inputs on RAW/ directory. The basename of the file are the same but I need two files R1 and R2.
RDIR=RAW OUTDIR=FINAL RFILES:=$(wildcard $(RDIR)/*_R1_001.fastq.gz) OUTFILE=$(patsubst %_R1_001.fastq.gz,%_R2_001.fastq.gz,$(RFILES)) OUTKAL=$(patsubst $(RDIR)/%_R1_001.fastq.gz,$(OUTDIR)/%,$(RFILES)) .PHONY: clean all all: $(OUTFILE) $(RFILES) $(OUTDIR) $(OUTKAL) $(OUTFILE): $(RFILES) -echo $ FINAL/A -echo "tools -i " $" $@ $(OUTDIR): mkdir -p $(OUTDIR) clean:: $(RM) -rf $(OUTDIR)
What is the simple way to do a comand like this
`tools A_R1_001.fastq.gz -b "A_R2_001.fastq.gz" > FINAL/A`
So how can combine this patsubst?