Skip to content

Commit

Permalink
fix build on systems with Perl > 5.12.0 (Ubuntu 11.10 Oneiric, Mac OS…
Browse files Browse the repository at this point in the history
… 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
cce committed Oct 28, 2011
1 parent 6600084 commit 32667e1
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion global_header.mk
Expand Up @@ -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)
Expand Down

0 comments on commit 32667e1

Please sign in to comment.