From 54cf500266b35beecb9c30b8252e72af9fafbc3e Mon Sep 17 00:00:00 2001 From: Eric Wong Date: Fri, 24 Dec 2010 16:32:28 -0800 Subject: doc: switch to wrongdoc for documentation wrongdoc eliminates JavaScript from our website and also enables us to cut down on our management scripts/code for supporting the project. --- GNUmakefile | 49 +++++++++++++++---------------------------------- 1 file changed, 15 insertions(+), 34 deletions(-) (limited to 'GNUmakefile') diff --git a/GNUmakefile b/GNUmakefile index a4a3301..dd2b8dc 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -1,7 +1,7 @@ all:: test RUBY = ruby RAKE = rake -GIT_URL = git://git.bogomips.org/clogger.git +RSYNC = rsync GIT-VERSION-FILE: .FORCE-GIT-VERSION-FILE @./GIT-VERSION-GEN @@ -43,7 +43,7 @@ test-pure: test: test-ext test-pure -pkg_extra := GIT-VERSION-FILE NEWS ChangeLog +pkg_extra := GIT-VERSION-FILE NEWS ChangeLog LATEST manifest: $(pkg_extra) $(RM) .manifest $(MAKE) .manifest @@ -55,44 +55,25 @@ manifest: $(pkg_extra) cmp $@+ $@ || mv $@+ $@ $(RM) $@+ -NEWS: GIT-VERSION-FILE .manifest - $(RAKE) -s news_rdoc > $@+ - mv $@+ $@ - -SINCE = 0.4.0 -ChangeLog: log_range = $(shell test -n "$(SINCE)" && echo v$(SINCE)..) -ChangeLog: GIT-VERSION-FILE - @echo "ChangeLog from $(GIT_URL) ($(SINCE)..$(GIT_VERSION))" > $@+ - @echo >> $@+ - git log $(log_range) | sed -e 's/^/ /' >> $@+ - mv $@+ $@ +ChangeLog: GIT-VERSION-FILE .wrongdoc.yml + wrongdoc prepare -news_atom := http://clogger.rubyforge.org/NEWS.atom.xml -cgit_atom := http://git.bogomips.org/cgit/clogger.git/atom/?h=master -atom = - -doc: .document NEWS ChangeLog - rdoc -a -t "$(shell sed -ne '1s/^= //p' README)" +doc: .document .wrongdoc.yml + find lib ext -type f -name '*.rbc' -exec rm -f '{}' ';' + $(RM) -r doc + wrongdoc all install -m644 COPYING doc/COPYING - install -m644 $(shell grep '^[A-Z]' .document) doc/ - $(RUBY) -i -p -e \ - '$$_.gsub!("",%q{\&$(call atom,$(cgit_atom))})' \ - doc/ChangeLog.html - $(RUBY) -i -p -e \ - '$$_.gsub!("",%q{\&$(call atom,$(news_atom))})' \ - doc/NEWS.html doc/README.html - $(RAKE) -s news_atom > doc/NEWS.atom.xml - cd doc && ln README.html tmp && mv tmp index.html + install -m644 $(shell grep '^[A-Z]' .document) doc/ # publishes docs to http://clogger.rubyforge.org/ # this preserves timestamps as best as possible to help HTTP caches out # git set-file-times is here: http://git-scm.org/gitwiki/ExampleScripts publish_doc: - git set-file-times - $(RM) -r doc + -git set-file-times $(MAKE) doc - rsync -av doc/ rubyforge.org:/var/www/gforge-projects/clogger/ + -find doc/images -type f | \ + TZ=UTC xargs touch -d '1970-01-01 00:00:03' doc/rdoc.css + $(RSYNC) -av doc/ rubyforge.org:/var/www/gforge-projects/clogger/ git ls-files | xargs touch ifneq ($(VERSION),) @@ -106,10 +87,10 @@ release_changes := release_changes-$(VERSION) release-notes: $(release_notes) release-changes: $(release_changes) $(release_changes): - $(RAKE) -s release_changes > $@+ + wrongdoc release_changes > $@+ $(VISUAL) $@+ && test -s $@+ && mv $@+ $@ $(release_notes): - GIT_URL=$(GIT_URL) $(RAKE) -s release_notes > $@+ + wrongdoc release_notes > $@+ $(VISUAL) $@+ && test -s $@+ && mv $@+ $@ # ensures we're actually on the tagged $(VERSION), only used for release -- cgit v1.2.3-24-ge0c7