Skip to content

Commit

Permalink
Fix typo and add PHONY in section Static Pattern Rules and Filter
Browse files Browse the repository at this point in the history
  • Loading branch information
CastielWong committed May 3, 2020
1 parent eb93080 commit b7e9438
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions index.md
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,15 @@ obj_files = foo.elc bar.o lose.o
src_files = foo.el bar.c lose.c

all: $(obj_files)
.PHONY: all

$(filter %.o,$(obj_files)): %.o: %.c
echo "target: " $@ "prereq: " $<
echo "target: $@ prereq: $<"
$(filter %.elc,$(obj_files)): %.elc: %.el
echo "target: " $@ "prereq: " $<
echo "target: $@ prereq: $<"

%.c %.el:
touch %@
touch $@

clean:
rm -f $(src_files)
Expand Down

0 comments on commit b7e9438

Please sign in to comment.