Skip to content

Commit

Permalink
Convert all documentation files to AsciiDoc and rename ccache.txt to …
Browse files Browse the repository at this point in the history
…manual.txt
  • Loading branch information
jrosdahl committed Apr 28, 2010
1 parent d0c58fe commit 40af60c
Show file tree
Hide file tree
Showing 7 changed files with 133 additions and 104 deletions.
4 changes: 3 additions & 1 deletion .gitignore
@@ -1,10 +1,12 @@
*.html
*.o
*.xml
*~
.deps
Makefile
NEWS.html
autom4te.cache
ccache
ccache-*.tar.*
ccache.1
ccache.html
ccache.xml
Expand Down
68 changes: 0 additions & 68 deletions INSTALL

This file was deleted.

72 changes: 72 additions & 0 deletions INSTALL.txt
@@ -0,0 +1,72 @@
ccache installation
===================


Building code from a release archive
------------------------------------

Prerequisites
~~~~~~~~~~~~~

To build ccache, you need:

- A C compiler (for instance GCC)

It is also recommended that you have:

- zlib <http://www.zlib.net> (if you don't have zlib installed, ccache will
use a bundled copy)


Installation
~~~~~~~~~~~~

To compile and install ccache, run these commands:

./configure
make
make install

You may set the installation directory and other parameters by options to
``./configure''. To see them, run ``./configure --help''.

There are two ways to use ccache. You can either prefix your compilation
commands with ``ccache'' or you can create a symbolic link (named as your
compiler) to ccache. The first method is most convenient if you just want to
try out ccache or wish to use it for some specific projects. The second method
is most useful for when you wish to use ccache for all your compilations.

To install for usage by the first method just copy ccache to somewhere in your
path.

To install for the second method, do something like this:

cp ccache /usr/local/bin/
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/cc
ln -s ccache /usr/local/bin/c++

And so forth. This will work as long as ``/usr/local/bin'' comes before the
path to the compiler (which is usually in ``/usr/bin''). After installing you
may wish to run ``which gcc'' to make sure that the correct link is being used.

NOTE: Do not use a hard link, use a symbolic link. A hard link will cause
``interesting'' problems.


Building code from the source code repository
---------------------------------------------

In addition to the prerequisites mentioned above, you also need:

- AsciiDoc (http://www.methods.co.nz/asciidoc/) to build the documentation.
- Autoconf (http://www.gnu.org/software/autoconf/)

To debug and run the performance test suite you'll also need:

- Perl (http://www.perl.org/)
- Python (http://www.python.org/)

Run "./autogen.sh" and then follow the steps mentioned under "Installation"
above.
27 changes: 11 additions & 16 deletions Makefile.in
Expand Up @@ -14,10 +14,6 @@ CPPFLAGS = @CPPFLAGS@ -I.
LDFLAGS = @LDFLAGS@
EXEEXT = @EXEEXT@

ASCIIDOC = asciidoc
XSLTPROC = xsltproc
MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl

libs = @LIBS@ -lm

sources = \
Expand All @@ -32,29 +28,22 @@ headers = \

objs = $(all_sources:.c=.o)

files_to_clean = $(objs) *~ ccache$(EXEEXT) ccache.1
generated_docs = ccache.1 INSTALL.html manual.html NEWS.html README.html

files_to_clean = $(objs) ccache$(EXEEXT) *~

.PHONY: all
all: ccache$(EXEEXT)

.PHONY: docs
docs: ccache.1 ccache.html NEWS.html
docs: $(generated_docs)

ccache$(EXEEXT): $(objs)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(objs) $(libs)

ccache.xml: ccache.txt
$(ASCIIDOC) -d manpage -b docbook $<

ccache.html: ccache.txt
$(ASCIIDOC) -a toc -b xhtml11 $<

ccache.1: ccache.xml
ccache.1: manual.xml
$(XSLTPROC) --nonet $(MANPAGE_XSL) $<

NEWS.html: NEWS.txt
$(ASCIIDOC) -a toc -b xhtml11 $<

.PHONY: install
install: all
$(installcmd) -d $(DESTDIR)$(bindir)
Expand Down Expand Up @@ -88,4 +77,10 @@ installcheck:
.c.o:
$(CC) $(CFLAGS) $(CPPFLAGS) -c -o $@ $<

.txt.html:
$(ASCIIDOC) -a toc -b xhtml11 $<

.txt.xml: manual.txt
$(ASCIIDOC) -d manpage -b docbook $<

@include_dev_mk@
33 changes: 20 additions & 13 deletions README → README.txt
@@ -1,7 +1,8 @@
CCACHE
======
ccache README
=============

ABOUT

About
-----

ccache is a compiler cache. It speeds up recompilation of C/C++ code by caching
Expand All @@ -13,21 +14,27 @@ Please see the manual page and documentation at http://ccache.samba.org for
more information.


INSTALLATION
Documentation
-------------

See the ccache(1) man page. It's also avaiable as manual.txt and manual.html.


Installation
------------

See the INSTALL file.
See INSTALL.txt or INSTALL.html.


WEB SITE
Web site
--------

The main ccache web site is here:

http://ccache.samba.org


MAILING LIST
Mailing list
------------

There is a mailing list for discussing usage and development of ccache:
Expand All @@ -37,7 +44,7 @@ There is a mailing list for discussing usage and development of ccache:
Anyone is welcome to join.


BUG REPORTS
Bug reports
-----------

To submit a bug report or to search for existing reports, please visit this web
Expand All @@ -46,7 +53,7 @@ page:
http://ccache.samba.org/bugs.html


SOURCE CODE REPOSITORY
Source code repository
----------------------

To get the very latest version of ccache directly from the source code
Expand All @@ -59,17 +66,17 @@ You can also browse the repository:
http://gitweb.samba.org/?p=ccache.git


HISTORY
History
-------

ccache was originally written by Andrew Tridgell and is currently maintained by
Joel Rosdahl. ccache started out as a re-implementation of Erik Thiele's
"compilercache" (see http://www.erikyyy.de/compilercache/) in C.
Joel Rosdahl. ccache started out as a reimplementation of Erik Thiele's
``compilercache'' (see http://www.erikyyy.de/compilercache/) in C.

See also the NEWS file.


COPYRIGHT
Copyright
---------

Copyright (C) 2002-2007 Andrew Tridgell
Expand Down
24 changes: 22 additions & 2 deletions dev.mk.in
@@ -1,17 +1,28 @@
# GNU make syntax reigns in this file.

CFLAGS += -Werror
CPPFLAGS += -MD -MP -MF .deps/$(subst .._,,$(subst /,_,$<)).d

ASCIIDOC = asciidoc
XSLTPROC = xsltproc
MANPAGE_XSL = /etc/asciidoc/docbook-xsl/manpage.xsl

version = $(shell sed -n 's/^\#define CCACHE_VERSION "\(.*\)"/\1/p' \
$(srcdir)/ccache.h)
dist_dir = ccache-$(version)
dist_archive_tar_bz2 = ccache-$(version).tar.bz2
dist_archive_tar_gz = ccache-$(version).tar.gz

generated_docs = ccache.1 INSTALL.html manual.html NEWS.html README.html
built_dist_files = $(generated_docs)

files_to_clean += $(dist_archive_tar_bz2) $(dist_archive_tar_gz) .deps/*
files_to_clean += $(built_dist_files)

source_dist_files = \
$(sources) $(headers) zlib/*.c zlib/*.h \
config.h.in configure configure-dev dev.mk.in install-sh Makefile.in \
test.sh COPYING INSTALL NEWS README
built_dist_files = ccache.1
test.sh COPYING INSTALL.txt NEWS.txt README.txt
dist_files = \
$(addprefix $(srcdir)/, $(source_dist_files)) \
$(built_dist_files)
Expand Down Expand Up @@ -49,6 +60,15 @@ distcheck: $(dist_archive_tar_bz2)
$(MAKE) installcheck) && \
rm -rf $$tmpdir

.PHONY: docs
docs: $(generated_docs)

%.html: %.txt
$(ASCIIDOC) -a toc -b xhtml11 $<

%.xml: %.txt
$(ASCIIDOC) -d manpage -b docbook $<

.PHONY: check-syntax
check-syntax:
$(CC) @CPPFLAGS@ -I. $(CFLAGS) -S -o /dev/null $(CHK_SOURCES)
Expand Down
9 changes: 5 additions & 4 deletions ccache.txt → manual.txt
Expand Up @@ -64,10 +64,11 @@ To install for usage by the first method just make sure *ccache* is in your path

To install for the second method, do something like this:

ln -s /usr/local/bin/ccache /usr/local/bin/gcc
ln -s /usr/local/bin/ccache /usr/local/bin/g++
ln -s /usr/local/bin/ccache /usr/local/bin/cc
ln -s /usr/local/bin/ccache /usr/local/bin/c++
cp ccache /usr/local/bin/
ln -s ccache /usr/local/bin/gcc
ln -s ccache /usr/local/bin/g++
ln -s ccache /usr/local/bin/cc
ln -s ccache /usr/local/bin/c++

And so forth. This will work as long as +/usr/local/bin+ comes before the path
to the compiler (which is usually in +/usr/bin+). After installing you may wish
Expand Down

0 comments on commit 40af60c

Please sign in to comment.