aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTaylor C. Richberger <Taywee@gmx.com>2016-05-06 16:04:30 -0600
committerTaylor C. Richberger <Taywee@gmx.com>2016-05-06 16:04:30 -0600
commitd619e095c21ba623aac577f9572bc8acd59a5d16 (patch)
treeadcb2a1decc72cccbd08ef104d423d02e786229e
parentbump version (diff)
downloadargs.hxx-d619e095c21ba623aac577f9572bc8acd59a5d16.tar.xz
improve installation and documentation1.2.4
-rw-r--r--Doxyfile8
-rw-r--r--Makefile33
-rw-r--r--README.md23
3 files changed, 49 insertions, 15 deletions
diff --git a/Doxyfile b/Doxyfile
index 46023c9..c3dd00e 100644
--- a/Doxyfile
+++ b/Doxyfile
@@ -38,7 +38,7 @@ PROJECT_NAME = "args"
# could be handy for archiving the generated documentation or if some version
# control system is used.
-PROJECT_NUMBER = 1.2.3
+PROJECT_NUMBER = 1.2.4
# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
@@ -58,7 +58,7 @@ PROJECT_LOGO =
# entered, it will be relative to the location where doxygen was started. If
# left blank the current directory will be used.
-OUTPUT_DIRECTORY =
+OUTPUT_DIRECTORY = doc
# If the CREATE_SUBDIRS tag is set to YES then doxygen will create 4096 sub-
# directories (in 2 levels) under the output directory of each output format and
@@ -822,7 +822,7 @@ EXCLUDE_SYMLINKS = NO
# Note that the wildcards are matched against the file with absolute path, so to
# exclude all test directories for example use the pattern */test/*
-EXCLUDE_PATTERNS =
+EXCLUDE_PATTERNS = catch.hpp
# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names
# (namespaces, classes, functions, etc.) that should be excluded from the
@@ -1819,7 +1819,7 @@ RTF_SOURCE_CODE = NO
# classes and files.
# The default value is: NO.
-GENERATE_MAN = NO
+GENERATE_MAN = YES
# The MAN_OUTPUT tag is used to specify where the man pages will be put. If a
# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of
diff --git a/Makefile b/Makefile
index 42bce87..adf8a1f 100644
--- a/Makefile
+++ b/Makefile
@@ -2,7 +2,7 @@ OS = $(shell uname -s)
CC ?= cc
CXX ?= c++
-DESTDIR ?= /usr
+DESTDIR ?= /usr/local
FLAGS += -std=c++11
ifdef DEBUG
FLAGS += -ggdb -O0
@@ -19,7 +19,7 @@ OBJECTS = $(SOURCES:.cxx=.o)
DEPENDENCIES= $(SOURCES:.cxx=.d)
EXECUTABLE = test
-.PHONY: all clean pages runtests
+.PHONY: all clean pages runtests uninstall install installman
all: $(EXECUTABLE)
@@ -28,16 +28,33 @@ all: $(EXECUTABLE)
$(EXECUTABLE): $(OBJECTS)
$(CXX) -o $@ $(OBJECTS) $(LDFLAGS)
-clean:
- rm $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES)
+uninstall:
+ -rm $(DESTDIR)/include/args.hxx
+ -rmdir $(DESTDIR)/include
+ -rm $(DESTDIR)/share/man/man3/args_*.3.bz2
+ -rmdir -p $(DESTDIR)/share/man/man3
-%.o: %.cxx
- $(CXX) $< -o $@ $(CFLAGS)
+install:
+ mkdir -p $(DESTDIR)/include
+ cp args.hxx $(DESTDIR)/include
+
+installman: doc/man
+ mkdir -p $(DESTDIR)/share/man/man3
+ cp doc/man/man3/*.3.bz2 $(DESTDIR)/share/man/man3
+
+clean:
+ rm -rv $(EXECUTABLE) $(OBJECTS) $(DEPENDENCIES) doc
pages:
doxygen Doxyfile
- cp -rv html/* .
- rm -r html
+ cp -rv doc/html/* .
+
+man:
+ doxygen Doxyfile
+ bzip2 doc/man/man3/*.3
runtests: test
./test
+
+%.o: %.cxx
+ $(CXX) $< -o $@ $(CFLAGS)
diff --git a/README.md b/README.md
index 1b0d15a..e77505e 100644
--- a/README.md
+++ b/README.md
@@ -78,9 +78,26 @@ There are tons of things this library does not do!
# How do I use it?
-Just copy the header into your source tree, or put it somewhere that your
-compiler can see. As long as you can `#include "args.hxx"` and use c++11, you
-should be good to go.
+```shell
+sudo make install
+```
+
+Or, to install it somewhere special (default is `/usr/local`):
+
+```shell
+sudo make install DESTDIR=/opt/mydir
+```
+
+You can also copy the file into your source tree, if you want to be absolutely
+sure you keep a stable API between projects.
+
+## I also want man pages
+
+```shell
+sudo make installman
+```
+
+This requires Doxygen
# Examples