Merge pull request #605 from pmelange/olsrd-bison-3-7-1-changes

olsrd: migrate to using bison 3.7.1
This commit is contained in:
Moritz Warning 2020-08-28 14:40:04 +02:00 committed by GitHub
commit b309086fa2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 17 additions and 1 deletions

View File

@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
PKG_NAME:=olsrd
PKG_SOURCE_DATE:=2020-06-18
PKG_RELEASE:=2
PKG_RELEASE:=3
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/OLSR/olsrd.git

View File

@ -0,0 +1,16 @@
--- a/src/cfgparser/local.mk
+++ b/src/cfgparser/local.mk
@@ -74,12 +74,8 @@ $(C)oparse.c: $(C)oparse.y $(C)olsrd_conf.h $(C)Makefile
ifeq ($(VERBOSE),0)
@echo "[BISON] $@"
endif
- $(MAKECMDPREFIX)$(BISON) -d -o "$@-tmp" "$<"
- $(MAKECMDPREFIX)sed -e 's/register //' \
- -e '/^#line/s/$(call quote,$@-tmp)/$(call quote,$@)/' \
- < "$@-tmp" >"$@"
- $(MAKECMDPREFIX)mv "$(subst .c,.h,$@-tmp)" "$(subst .c,.h,$@)"
- $(MAKECMDPREFIX)$(RM) "$@-tmp" "$(subst .c,.h,$@-tmp)"
+ $(MAKECMDPREFIX)$(BISON) -d -o "$@" "$<"
+ $(MAKECMDPREFIX)sed -e 's/register //' "$@" > "$@.o" && mv "$@.o" "$@"
$(C)oparse.o: CFLAGS := $(filter-out -Wunreachable-code,$(CFLAGS))