Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0168168

Browse files
authored
Merge pull request #22 from ii14/fix_makefile_lrexlib
Make PCRE_DIR optional
2 parents 3aaa850 + 8b2797f commit 0168168

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Makefile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,14 +13,16 @@ export LUA_PATH
1313

1414
export LUA_CPATH = deps/lib/lua/$(LUA_VERSION)/?.so
1515

16-
PCRE_DIR =
16+
ifdef PCRE_DIR
17+
LREXLIB_PCRE_FLAGS = PCRE_DIR=$(PCRE_DIR)
18+
endif
1719
# Example for MacOS installed via Homebrew:
1820
# PCRE_DIR = /opt/homebrew/Cellar/pcre/8.45
1921

2022
LUAROCKS = luarocks --lua-version=$(LUA_VERSION) --tree=deps
2123

2224
deps:
23-
$(LUAROCKS) install lrexlib-pcre PCRE_DIR=$(PCRE_DIR)
25+
$(LUAROCKS) install lrexlib-pcre $(LREXLIB_PCRE_FLAGS)
2426
$(LUAROCKS) install inspect
2527
$(LUAROCKS) install net-url
2628
$(LUAROCKS) install jsonschema
@@ -32,5 +34,3 @@ test: deps
3234
.PHONY: clean
3335
clean:
3436
$(RM) -rf deps
35-
36-

0 commit comments

Comments
 (0)