Use gnu sed's '-i' flag style. FreeBSD/OSX's sed usage is different.

Since we generally build release on Linux platforms (for jenkins, etc),
let's move back to gnu sed.
This commit is contained in:
Jordan Sissel 2014-02-19 02:24:16 +00:00
parent 8eba2e340d
commit 126680a50d

View file

@ -288,7 +288,7 @@ build/flatgems: | build vendor/bundle
$(QUIET)rsync -a $(VENDOR_DIR)/gems/user_agent_parser-*/vendor/ua-parser $@/vendor
$(QUIET)rsync -a $(VENDOR_DIR)/gems/aws-sdk-*/ca-bundle.crt $@/root/
@# A lame hack to work around the aws-sdk bug (LOGSTASH-1718)
sed -i "" -e "s@SRC = ROOT + '/lib/aws'@SRC = ROOT + 'aws'@" $@/lib/aws/core.rb
sed -i -e "s@SRC = ROOT + '/lib/aws'@SRC = ROOT + 'aws'@" $@/lib/aws/core.rb
flatjar-test:
@ -351,19 +351,19 @@ build/docs/tutorials/getting-started-with-logstash.xml: docs/tutorials/getting-s
# bluecloth gem doesn't work on jruby. Use ruby.
build/docs/inputs/%.html: lib/logstash/inputs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/inputs
$(QUIET)ruby docs/docgen.rb -o build/docs $<
$(QUIET)sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i "" -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
build/docs/filters/%.html: lib/logstash/filters/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/filters
$(QUIET)ruby docs/docgen.rb -o build/docs $<
$(QUIET)sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i "" -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
build/docs/outputs/%.html: lib/logstash/outputs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/outputs
$(QUIET)ruby docs/docgen.rb -o build/docs $<
$(QUIET)sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i "" -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
build/docs/codecs/%.html: lib/logstash/codecs/%.rb docs/docgen.rb docs/plugin-doc.html.erb | build/docs/codecs
$(QUIET)ruby docs/docgen.rb -o build/docs $<
$(QUIET)sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
build/docs/%: docs/% lib/logstash/version.rb Makefile
@echo "Copying $< (to $@)"
@ -372,8 +372,8 @@ build/docs/%: docs/% lib/logstash/version.rb Makefile
$(QUIET)case "$(suffix $<)" in \
.gz|.bz2|.png|.jpg) ;; \
*) \
sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@ ; \
sed -i "" -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@ ; \
sed -i -e 's/%VERSION%/$(VERSION)/g' $@ ; \
sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@ ; \
;; \
esac
@ -381,8 +381,8 @@ build/docs/index.html: $(addprefix build/docs/,$(subst lib/logstash/,,$(subst .r
build/docs/index.html: docs/generate_index.rb lib/logstash/version.rb docs/index.html.erb Makefile
@echo "Building documentation index.html"
$(QUIET)ruby $< build/docs > $@
$(QUIET)sed -i "" -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i "" -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
$(QUIET)sed -i -e 's/%VERSION%/$(VERSION)/g' $@
$(QUIET)sed -i -e 's/%ELASTICSEARCH_VERSION%/$(ELASTICSEARCH_VERSION)/g' $@
.PHONY: patterns
patterns:
@ -453,8 +453,8 @@ prepare-tarball:
@echo "=> Preparing tarball"
$(QUIET)$(MAKE) $(WORKDIR)
$(QUIET)rsync -a --relative bin lib spec locales patterns vendor/bundle/jruby vendor/geoip vendor/jar vendor/kibana vendor/ua-parser vendor/collectd LICENSE README.md --exclude 'vendor/bundle/jruby/1.9/cache' --exclude 'vendor/bundle/jruby/1.9/gems/*/doc' --exclude 'vendor/jar/elasticsearch-$(ELASTICSEARCH_VERSION).tar.gz' $(WORKDIR)
$(QUIET)sed -i "" -e 's/^LOGSTASH_VERSION = .*/LOGSTASH_VERSION = "$(VERSION)"/' $(WORKDIR)/lib/logstash/version.rb
$(QUIET)sed -i "" -e 's/%JRUBY_VERSION%/$(JRUBY_VERSION)/' $(WORKDIR)/bin/logstash.bat
$(QUIET)sed -i -e 's/^LOGSTASH_VERSION = .*/LOGSTASH_VERSION = "$(VERSION)"/' $(WORKDIR)/lib/logstash/version.rb
$(QUIET)sed -i -e 's/%JRUBY_VERSION%/$(JRUBY_VERSION)/' $(WORKDIR)/bin/logstash.bat
.PHONY: tarball
tarball: | build/logstash-$(VERSION).tar.gz