about summary refs log tree commit homepage
diff options
context:
space:
mode:
authorEric Wong <normalperson@yhbt.net>2010-05-27 19:30:52 +0000
committerEric Wong <normalperson@yhbt.net>2010-05-27 19:33:38 +0000
commit744cb76719a0b1659c7358878457eb2f1b003d4d (patch)
treeb98bb926538eda8ea0560cfd6f72a1d21acf378e
parentc297d48713553e57cf880f29d67dc97c3a2ebe0e (diff)
downloadruby_io_splice-744cb76719a0b1659c7358878457eb2f1b003d4d.tar.gz
-rw-r--r--GNUmakefile28
-rw-r--r--local.mk.sample55
2 files changed, 30 insertions, 53 deletions
diff --git a/GNUmakefile b/GNUmakefile
index 63b9cf3..f0baf71 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -3,6 +3,7 @@ all::
 RUBY = ruby
 RAKE = rake
 GIT_URL = git://git.bogomips.org/ruby_io_splice.git
+RSYNC = rsync
 
 GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE
         @./GIT-VERSION-GEN
@@ -40,7 +41,7 @@ manifest: $(pkg_extra)
 
 .manifest:
         (git ls-files && \
-         for i in $@ $(pkg_extra) $(man1_paths); \
+         for i in $@ $(pkg_extra); \
          do echo $$i; done) | LC_ALL=C sort > $@+
         cmp $@+ $@ || mv $@+ $@
         $(RM) $@+
@@ -86,6 +87,31 @@ doc: .document NEWS ChangeLog
         $(RAKE) -s news_atom > doc/NEWS.atom.xml
         cd doc && ln README.html tmp && mv tmp index.html
 
+latest: NEWS
+        @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<
+
+# publishes docs to http://bogomips.org/ruby_io_splice/,
+publish_doc:
+        -git set-file-times
+        $(RM) -r doc ChangeLog NEWS
+        $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
+        awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' \
+          NEWS > doc/LATEST
+        find doc/images doc/js -type f | \
+                TZ=UTC xargs touch -d '1970-01-01 00:00:01' doc/rdoc.css
+        $(MAKE) doc_gz
+        chmod 644 $$(find doc -type f)
+        $(RSYNC) -av doc/ bogomips.org:/srv/bogomips/ruby_io_splice/
+        git ls-files | xargs touch
+
+# Create gzip variants of the same timestamp as the original so nginx
+# "gzip_static on" can serve the gzipped versions directly.
+doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
+doc_gz:
+        touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
+        for i in $(docs); do \
+          gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
+
 ifneq ($(VERSION),)
 rfproject := qrp
 rfpackage := io_splice
diff --git a/local.mk.sample b/local.mk.sample
index 04e46c0..a809d91 100644
--- a/local.mk.sample
+++ b/local.mk.sample
@@ -1,64 +1,15 @@
-# this is a sample local.mk file, feel free to modify it for your needs
-# GNUmakefile will source local.mk in the top-level source tree
-# if it is present.
-#
-# This is depends on a bunch of GNU-isms from bash, touch.
-
-RSYNC = rsync
 DLEXT := so
-gems :=
 
 # Avoid loading rubygems to speed up tests because gmake is
 # fork+exec heavy with Ruby.
 prefix = $(HOME)
+
 ifeq ($(r19),)
   RUBY := $(prefix)/bin/ruby
-  gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.8/gems/,$(gems))
+  RAKE := $(prefix)/bin/rake
 else
   prefix := $(prefix)/ruby-1.9
   export PATH := $(prefix)/bin:$(PATH)
   RUBY := $(prefix)/bin/ruby --disable-gems
-  gem_paths := $(addprefix $(prefix)/lib/ruby/gems/1.9.1/gems/,$(gems))
+  RAKE := $(prefix)/bin/rake
 endif
-
-ifdef gem_paths
-  sp :=
-  sp +=
-  export RUBYLIB := $(subst $(sp),:,$(addsuffix /lib,$(gem_paths)))
-endif
-
-# pipefail is THE reason to use bash (v3+) or never revisions of ksh93
-# SHELL := /bin/bash -e -o pipefail
-SHELL := /bin/ksh93 -e -o pipefail
-
-# trace execution of tests
-# TRACER = strace -f -o $(t_pfx).strace -s 100000
-TRACER = /usr/bin/time -v -o $(t_pfx).time
-
-latest: NEWS
-        @awk 'BEGIN{RS="=== ";ORS=""}NR==2{sub(/\n$$/,"");print RS""$$0 }' $<
-
-# publishes docs to http://bogomips.org/ruby_io_splice/
-publish_doc:
-        -git set-file-times
-        $(RM) -r doc ChangeLog NEWS
-        $(MAKE) doc LOG_VERSION=$(shell git tag -l | tail -1)
-        $(MAKE) -s latest > doc/LATEST
-        find doc/images doc/js -type f | \
-                TZ=UTC xargs touch -d '1970-01-01 00:00:00' doc/rdoc.css
-        $(MAKE) doc_gz
-        chmod 644 $$(find doc -type f)
-        $(RSYNC) -av doc/ dcvr:/srv/bogomips/ruby_io_splice/
-        git ls-files | xargs touch
-
-# Create gzip variants of the same timestamp as the original so nginx
-# "gzip_static on" can serve the gzipped versions directly.
-doc_gz: docs = $(shell find doc -type f ! -regex '^.*\.\(gif\|jpg\|png\|gz\)$$')
-doc_gz:
-        touch doc/NEWS.atom.xml -d "$$(awk 'NR==1{print $$4,$$5,$$6}' NEWS)"
-        for i in $(docs); do \
-          gzip --rsyncable -9 < $$i > $$i.gz; touch -r $$i $$i.gz; done
-
-# launches any of the following shells with RUBYLIB set
-irb sh bash ksh:
-        $@