diff options
author | Stuart Rackham <srackham@methods.co.nz> | 2008-12-12 13:07:07 +1300 |
---|---|---|
committer | Stuart Rackham <srackham@methods.co.nz> | 2008-12-12 13:07:07 +1300 |
commit | d767df6d0ad5e9015121036091d0f79bab26d528 (patch) | |
tree | d283fde96ad1a3dcbbd1a050aa0452a0e6cfc41b | |
parent | 4946ca399208c6b694eb47b5305807a934da59ec (diff) | |
download | asciidoc-py3-d767df6d0ad5e9015121036091d0f79bab26d528.tar.gz |
Replaced install.sh with Ben Walton's autoconf scripts.
-rw-r--r-- | MANIFEST | 3 | ||||
-rw-r--r-- | Makefile.in | 107 | ||||
-rw-r--r-- | configure.ac | 11 | ||||
-rwxr-xr-x | install.sh | 55 | ||||
l--------- | uninstall.sh | 1 |
5 files changed, 120 insertions, 57 deletions
@@ -63,7 +63,8 @@ images/smallnew.png images/tiger.png images/highlighter.png INSTALL -install.sh +configure.ac +Makefile.in uninstall.sh INSTALL.txt javascripts/ASCIIMathML.js diff --git a/Makefile.in b/Makefile.in new file mode 100644 index 0000000..678ff40 --- /dev/null +++ b/Makefile.in @@ -0,0 +1,107 @@ +INSTALL = @INSTALL@ +INSTALL_PROG = @INSTALL_PROGRAM@ +INSTALL_DATA = @INSTALL_DATA@ + +SED = @SED@ +LN_S = @LN_S@ + +prefix = @prefix@ +exec_prefix = @exec_prefix@ +bindir = @bindir@ +datadir = @datadir@ +sysconfdir = @sysconfdir@ +datarootdir = @datarootdir@ +mandir=@mandir@ +srcdir = @srcdir@ + +VPATH = @srcdir@ + +ASCIIDOCCONF = $(sysconfdir)/asciidoc + +prog = asciidoc.py a2x +progdir = $(bindir) + +vimdir = @sysconfdir@/vim + +manp = $(wildcard doc/*.1) +manpdir = $(mandir)/man1 + +conf = $(wildcard *.conf) +confdir = $(ASCIIDOCCONF) + +filters = $(wildcard filters/*.py) +filtersdir = $(ASCIIDOCCONF)/filters + +docbook = $(wildcard docbook-xsl/*xsl) +docbookdir = $(ASCIIDOCCONF)/docbook-xsl + +dblatex = $(wildcard dblatex/*.xsl) $(wildcard dblatex/*.sty) +dblatexdir = $(ASCIIDOCCONF)/dblatex + +css = $(wildcard stylesheets/*.css) +cssdir = $(ASCIIDOCCONF)/stylesheets + +js = $(wildcard javascripts/*.js) +jsdir = $(ASCIIDOCCONF)/javascripts + +callouts = $(wildcard images/icons/callouts/*) +calloutsdir = $(ASCIIDOCCONF)/images/icons/callouts + +icons = $(wildcard images/icons/*.png) images/icons/README +iconsdir = $(ASCIIDOCCONF)/images/icons + +doc = $(wildcard README*) $(wildcard BUGS*) $(wildcard INSTALL*) +docdir = $(datadir)/doc/asciidoc + +DATATARGETS = manp conf filters docbook dblatex css js callouts icons +PROGTARGETS = prog +TARGETS = $(DATATARGETS) $(PROGTARGETS) doc + +INSTDIRS = $(TARGETS:%=%dir) + +.PHONY: $(TARGETS) + +all: build + +# create directories used during the install +$(INSTDIRS): + $(INSTALL) -d $(DESTDIR)/$($@) + +$(PROGTARGETS): % : %dir + $(INSTALL_PROG) $($@) $(DESTDIR)/$($<)/ + +$(DATATARGETS): % : %dir + $(INSTALL_DATA) $($@) $(DESTDIR)/$($<)/ + +vim: + $(INSTALL) -d $(DESTDIR)/$(vimdir)/syntax + $(INSTALL_DATA) vim/syntax/asciidoc.vim $(DESTDIR)/$(vimdir)/syntax/ + $(INSTALL) -d $(DESTDIR)/$(vimdir)/ftdetect + $(INSTALL_DATA) vim/ftdetect/asciidoc_filetype.vim \ + $(DESTDIR)/$(vimdir)/ftdetect/ + +docs: docdir + $(INSTALL_DATA) $(doc) $(DESTDIR)/$(docdir) + $(INSTALL) -d $(DESTDIR)/$(docdir)/examples/website + ( cd examples/website; \ + cp -R * $(DESTDIR)/$(docdir)/examples/website ) + +linkpy: + (cd $(DESTDIR)/$(progdir); $(LN_S) asciidoc.py asciidoc) + +fixconfpath: + @for f in $(prog); do \ + echo "Fixing CONF_DIR in $$f"; \ + $(SED) "s#^CONF_DIR = '.*'#CONF_DIR = '$(ASCIIDOCCONF)'#; s#^CONF_DIR=.*#CONF_DIR=$(ASCIIDOCCONF)#" $$f > $$f.out; \ + mv $$f.out $$f; \ + done + + +build: fixconfpath + +install: $(PROGTARGETS) $(DATATARGETS) linkpy docs + +install-vim: vim + +test: + @echo "Nothing to see here...Move along."
\ No newline at end of file diff --git a/configure.ac b/configure.ac new file mode 100644 index 0000000..6de4c79 --- /dev/null +++ b/configure.ac @@ -0,0 +1,11 @@ +AC_INIT(asciidoc, 8.2.7) + +AC_CONFIG_FILES(Makefile) + +AC_PROG_SED + +AC_PROG_LN_S + +AC_PROG_INSTALL + +AC_OUTPUT diff --git a/install.sh b/install.sh deleted file mode 100755 index 43f8950..0000000 --- a/install.sh +++ /dev/null @@ -1,55 +0,0 @@ -#!/bin/sh -# -# AsciiDoc canonical installer/uninstaller. -# Definative packager's guide. -# Documented in INSTALL file. -# -# NOTE: If you change the CONFDIR (the global asciidoc(1) configuration file -# directory) then you will also need to change the CONF_DIR constant definition -# values in both a2x and asciiidoc.py scripts. - -CONFDIR=/etc/asciidoc -BINDIR=/usr/local/bin -MANDIR=/usr/local/man -VIM_CONFDIR=/etc/vim - -if [ `basename $0` = uninstall.sh ]; then - rm $BINDIR/asciidoc - rm $BINDIR/a2x - rm $MANDIR/man1/asciidoc.1 - rm $MANDIR/man1/a2x.1 - rm -rf $CONFDIR - rm -f $VIM_CONFDIR/syntax/asciidoc.vim - rm -f $VIM_CONFDIR/ftdetect/asciidoc_filetype.vim -else - install asciidoc.py $BINDIR/asciidoc - install a2x $BINDIR/a2x - install -d $MANDIR/man1 - install doc/*.1 $MANDIR/man1 - install -d $CONFDIR/filters \ - $CONFDIR/docbook-xsl \ - $CONFDIR/dblatex \ - $CONFDIR/stylesheets \ - $CONFDIR/javascripts \ - $CONFDIR/images/icons/callouts - install -m 644 *.conf $CONFDIR - install filters/*.py $CONFDIR/filters - install -m 644 filters/*.conf $CONFDIR/filters - install -m 644 docbook-xsl/*.xsl $CONFDIR/docbook-xsl - install -m 644 dblatex/*.xsl $CONFDIR/dblatex - install -m 644 dblatex/*.sty $CONFDIR/dblatex - install -m 644 stylesheets/*.css $CONFDIR/stylesheets - install -m 644 javascripts/*.js $CONFDIR/javascripts - install -m 644 images/icons/callouts/* $CONFDIR/images/icons/callouts - install -m 644 images/icons/README images/icons/*.png $CONFDIR/images/icons - if [ -d $VIM_CONFDIR ]; then - install -d $VIM_CONFDIR/syntax - install -m 644 vim/syntax/asciidoc.vim \ - $VIM_CONFDIR/syntax/asciidoc.vim - install -d $VIM_CONFDIR/ftdetect - install -m 644 vim/ftdetect/asciidoc_filetype.vim \ - $VIM_CONFDIR/ftdetect/asciidoc_filetype.vim - fi -fi - -# vim: set et ts=4 sw=4 sts=4: diff --git a/uninstall.sh b/uninstall.sh deleted file mode 120000 index 61e71e2..0000000 --- a/uninstall.sh +++ /dev/null @@ -1 +0,0 @@ -install.sh
\ No newline at end of file |