"No rule to make target" but I think I have a pattern rule for it
<p>I'm having an issue with a makefile that I'm writing for a data processing pipeline. It's saying that there is no rule to make a target, but I don't understand why because I have such a rule. Here is the makefile:</p>

<pre><code>  1 ifdef $(BROAD)
  2     target=$(MARK)_peaks.broadPeak
  3 else
  4     target=$(MARK)_peaks.narrowPeak
  5 endif
  6 
  7 all: $(target)
  8 
  9 $(MARK)_peaks.broadPeak : $(MARK).filtered.bam $(INPUT).filtered.bam
 10     macs2 callpeak -g $(GSIZE) -q 0.05 -c $(INPUT).filtered.bam -t $(MARK).filtered.bam -f BAM -n $(MA    RK) -B --broad
 11 
 12 $(MARK)_peaks.narrowPeak : $(MARK).filtered.bam $(INPUT).filtered.bam
 13     macs2 callpeak -g $(GSIZE) -q 0.01 -c $(INPUT).filtered.bam -t $(MARK).filtered.bam -f BAM -n $(MA    RK) -B 
 14 
 15 %.filtered.bam : %.duplicate-marked.bam
 16     samtools view -b -q 15 $&lt; &gt; $@
 17 
 18 %.duplicate-marked.bam : %.sorted.bam
 19     picard-tools MarkDuplicates INPUT=$&lt; OUTPUT=$@ METRICS_FILE=output.dup_metrics REMOVE_DUPLICATES=f    alse ASSUME_SORTED=true VALIDATION_STRINGENCY=SILENT
</code></pre>

<p>And the output with debugging on is:</p>

<pre><code>$ make --debug=verbose --dry-run -f chipseq-pe.makefile MARK=H3K27me3 INPUT=input ASSEMBLY=/home/ckern/galGal4.dna_sm.fa GSIZE=1.057e9 BROAD=Y
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
PARTICULAR PURPOSE.

This program built for x86_64-pc-linux-gnu
Reading makefiles...
Reading makefile `chipseq-pe.makefile'...
Updating goal targets....
Considering target file `all'.
 File `all' does not exist.
  Considering target file `H3K27me3_peaks.narrowPeak'.
   File `H3K27me3_peaks.narrowPeak' does not exist.
    Considering target file `H3K27me3.filtered.bam'.
     File `H3K27me3.filtered.bam' does not exist.
     Finished prerequisites of target file `H3K27me3.filtered.bam'.
    Must remake target `H3K27me3.filtered.bam'.
make: *** No rule to make target `H3K27me3.filtered.bam', needed by `H3K27me3_peaks.narrowPeak'.  Stop.
</code></pre>

<p>I have a pattern rule to make any *.filtered.bam file, so I don't understand why it's saying there is no rule to make that target.</p>