Skip to content

Commit

Permalink
ext(gumbo): avoid Gnu-isms in the Makefile
Browse files Browse the repository at this point in the history
The wildcard and patsubst functions, as well as $^, don't work in BSD
make. Let's just inline everything to make it simple and portable.

Related to #2298
  • Loading branch information
flavorjones committed Aug 3, 2021
1 parent 2e7ab22 commit 1159a9b
Showing 1 changed file with 19 additions and 2 deletions.
21 changes: 19 additions & 2 deletions gumbo-parser/src/Makefile
Expand Up @@ -7,10 +7,27 @@ CFLAGS += -std=c99 -Wall
# allow the ENV var to override this
RANLIB ?= ranlib

gumbo_objs := $(patsubst %.c,%.o,$(wildcard *.c))
gumbo_objs := \
ascii.o \
attribute.o \
char_ref.o \
error.o \
foreign_attrs.o \
parser.o \
string_buffer.o \
string_piece.o \
svg_attrs.o \
svg_tags.o \
tag.o \
tag_lookup.o \
token_buffer.o \
tokenizer.o \
utf8.o \
util.o \
vector.o

libgumbo.a: $(gumbo_objs)
$(AR) $(ARFLAGS) $@ $^
$(AR) $(ARFLAGS) $@ $(gumbo_objs)
- ($(RANLIB) $@ || true) >/dev/null 2>&1

clean:
Expand Down

0 comments on commit 1159a9b

Please sign in to comment.