Commit 353eaad958c94603f94a1d06eed0377d3375dc50
1 parent
9b955491
add document installation, ctatools.pc and automatic libtool reconfiguration
Showing
1 changed file
with
81 additions
and
6 deletions
Makefile.am
| @@ -9,14 +9,89 @@ SUBDIRS = . src pyext test | @@ -9,14 +9,89 @@ SUBDIRS = . src pyext test | ||
| 9 | # | 9 | # |
| 10 | INCLUDES = | 10 | INCLUDES = |
| 11 | 11 | ||
| 12 | -# | 12 | +# Make sure these will be cleaned even when they're not built by default |
| 13 | CLEANFILES = | 13 | CLEANFILES = |
| 14 | 14 | ||
| 15 | -# Models to distribute | ||
| 16 | -models = test/data/crab.xml | 15 | +# Headers to be installed |
| 16 | +include_HEADERS = | ||
| 17 | + | ||
| 18 | +# Headers which are not installed but which are distributed | ||
| 19 | +noinst_HEADERS = | ||
| 20 | + | ||
| 21 | +# Pkgconfig directory | ||
| 22 | +pkgconfigdir = $(libdir)/pkgconfig | ||
| 23 | + | ||
| 24 | +# Files to install in Pkgconfig directory | ||
| 25 | +pkgconfig_DATA = ctatools.pc | ||
| 26 | + | ||
| 27 | +# Manual pages to install | ||
| 28 | +man_MANS = | ||
| 17 | 29 | ||
| 18 | -# Distribute models | ||
| 19 | -EXTRA_DIST = $(models) | ||
| 20 | -modelsdir = $(datadir)/models | 30 | +# Architecture independent data files installed in the package's doc directory |
| 31 | +doc_DATA = \ | ||
| 32 | + AUTHORS \ | ||
| 33 | + ChangeLog \ | ||
| 34 | + COPYING \ | ||
| 35 | + INSTALL \ | ||
| 36 | + LICENSE \ | ||
| 37 | + NEWS \ | ||
| 38 | + README | ||
| 39 | + | ||
| 40 | +# Models installed in the package's model directory | ||
| 41 | +models = test/data/crab.xml | ||
| 42 | +modelsdir = $(datadir)/models | ||
| 21 | models_DATA = $(models) | 43 | models_DATA = $(models) |
| 22 | 44 | ||
| 45 | +# Models to install | ||
| 46 | +# Extra files to be distributed in the tar file | ||
| 47 | +#EXTRA_DIST = $(models) | ||
| 48 | + | ||
| 49 | + | ||
| 50 | +install-data-local: $(HTML_INSTALL_DATA_TARGETS) | ||
| 51 | + | ||
| 52 | +uninstall-local: $(HTML_UNINSTALL_DATA_TARGETS) | ||
| 53 | + | ||
| 54 | + | ||
| 55 | +# Non-Automake subdirectories to distribute | ||
| 56 | +DISTDIRS = doc/html doc/html/images | ||
| 57 | +dist-hook: | ||
| 58 | + ( \ | ||
| 59 | + builddir=`pwd` ; \ | ||
| 60 | + cd $(srcdir) && \ | ||
| 61 | + ( \ | ||
| 62 | + for dir in $(DISTDIRS) ; do \ | ||
| 63 | + find $$dir -depth -print | egrep -v '(~$$)|(/CVS)|(/\.#)|(/\.deps)' \ | ||
| 64 | + | cpio -pdum $$builddir/$(distdir) 2> /dev/null ; \ | ||
| 65 | + done \ | ||
| 66 | + ) \ | ||
| 67 | + ) | ||
| 68 | + | ||
| 69 | + | ||
| 70 | +# | ||
| 71 | +# Additional install rules | ||
| 72 | +# | ||
| 73 | + | ||
| 74 | +# Install HTML files | ||
| 75 | +DOCDIRS = html html/images | ||
| 76 | +HTML_INSTALL_DATA_TARGETS = install-data-html | ||
| 77 | +install-data-html: | ||
| 78 | + $(mkinstalldirs) $(DESTDIR)$(docdir) | ||
| 79 | + @for dir in $(DOCDIRS) ; do \ | ||
| 80 | + $(mkinstalldirs) $(DESTDIR)$(docdir)/$$dir && \ | ||
| 81 | + for file in $(srcdir)/doc/$$dir/*.* ; do \ | ||
| 82 | + echo "$(INSTALL_DATA) $$file $(DESTDIR)$(docdir)/$$dir" ; \ | ||
| 83 | + $(INSTALL_DATA) "$$file" $(DESTDIR)$(docdir)/$$dir ; \ | ||
| 84 | + done ; \ | ||
| 85 | + done | ||
| 86 | + | ||
| 87 | +# Uninstall HTML files | ||
| 88 | +HTML_UNINSTALL_DATA_TARGETS = uninstall-data-html | ||
| 89 | +uninstall-data-html: | ||
| 90 | + for dir in $(DOCDIRS) ; do \ | ||
| 91 | + rm -f -r $(DESTDIR)$(docdir)/$$dir ; \ | ||
| 92 | + done | ||
| 93 | + | ||
| 94 | +# Automatically reconfigure libtool | ||
| 95 | +LIBTOOL_DEPS = @LIBTOOL_DEPS@ | ||
| 96 | +libtool: $(LIBTOOL_DEPS) | ||
| 97 | + $(SHELL) ./config.status --recheck |