Skip to content

Commit

Permalink
simple 第21版: 函数patsubst
Browse files Browse the repository at this point in the history
Signed-off-by: guyongqiangx <[email protected]>
  • Loading branch information
guyongqiangx committed Dec 11, 2020
1 parent 2ccd6ea commit 6def98f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Makefile/2-simple/Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
.PHONY: all

objects = main1.o foo.o main2.o bar.o
result = $(filter-out main%.o, $(objects))
mixed = foo.c bar.c main.o
objects := $(patsubst %.c, %.o, $(mixed))

all:
@echo $(result)
@echo $(objects)

0 comments on commit 6def98f

Please sign in to comment.