Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix build on systems with Perl > 5.12.0 (Ubuntu 11.10 Oneiric, Mac OS…

… X) due to split() incompatibility

thanks mauke from #perl on freenode!
from http://perldoc.perl.org/perl5140delta.html
"split() no longer modifies @_ when called in scalar or void context. In void context it now produces a "Useless use of split" warning. This was also a perl 5.12.0 change that missed the perldelta."
  • Loading branch information...
commit 32667e1043f7f4c54de669ca8ab079c5f5d2ca43 1 parent 6600084
@cce cce authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  global_header.mk
View
2  global_header.mk
@@ -4,7 +4,7 @@
#endef
define thrift_template
-XTARGET := $(shell perl -e '@val = split("\/","$(2)"); $$last = pop(@val);split("\\.",$$last);print "$(1)/"."gen-cpp/"."@_[0]"."_types.cpp\n"' )
+XTARGET := $(shell perl -e '$$_ = $$ARGV[1]; s{^.*/}{}; s{\..*}{}; print "$$ARGV[0]/gen-cpp/$${_}_types.cpp\n"' '$(1)' '$(2)')
ifneq ($$(XBUILT_SOURCES),)
XBUILT_SOURCES := $$(XBUILT_SOURCES) $$(XTARGET)
Please sign in to comment.
Something went wrong with that request. Please try again.