Skip to content

Commit

Permalink
Merge pull request #155 from mavit/make-pc-url
Browse files Browse the repository at this point in the history
Prevent mangled URL in .pc file
  • Loading branch information
amaanq authored Aug 2, 2023
2 parents 6c8329e + 6542346 commit e8d1bc4
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,11 @@ ifeq (, $(PARSER_NAME))
endif

ifeq (, $(PARSER_URL))
PARSER_URL := $(subst :,/,$(PARSER_REPO_URL))
PARSER_URL := $(subst .git,,$(PARSER_REPO_URL))
ifeq ($(shell echo $(PARSER_URL) | grep '^[a-z][-+.0-9a-z]*://'),)
PARSER_URL := $(subst :,/,$(PARSER_URL))
PARSER_URL := $(subst git@,https://,$(PARSER_URL))
PARSER_URL := $(subst .git,,$(PARSER_URL))
endif
endif

UPPER_PARSER_NAME := $(shell echo $(PARSER_NAME) | tr a-z A-Z )
Expand Down

0 comments on commit e8d1bc4

Please sign in to comment.