PATCH: Overhaul documentation installation
Mark Mitchell
mark at codesourcery.com
Sat Dec 24 08:45:52 UTC 2005
As per discussion on IRC, this patch overhauls how documentation is
installed. We now use the GNU Coding Standards required locations,
leveraging the machinery in csl-docbook for installation.
I also fixed a makefile bug for examples/example1. There was a
dependency on "libs" there. But, that dependency did not fire because
the examples Makefile fragment was read too early; variables in rules
are expanded when the rule is read.
IIUC, Stefan is going to work on a rule to install the documentation
back into the source directory, for use in making source
distributions.
Applied.
--
Mark Mitchell
CodeSourcery, LLC
mark at codesourcery.com
2005-12-24 Mark Mitchell <mark at codesourcery.com>
* GNUmakefile.in (PACKAGE_TARNAME): New variable.
(PACKAGE_VERSION): Likewise.
(pkgdatadir): Likewise.
(datarootdir): Likewise.
(docdir): Use it.
(htmldir): New variable.
(pdfdir): Likewise.
(pdf_manuals): Likewise.
(html_manuals): Likewise.
(doc): Depend on html, pdf.
(html): New target.
(pdf): Likewise.
(install): Depend on install-pdf, install-html.
(install-pdf): New target.
(install-html): Likewise.
* configure.ac (AC_INIT): Set PACKAGE_TARNAME, correct
PACKAGE_NAME.
* doc/GNUmakefile.in: Adjust for improvements to csl-docbook,
toplevel GNUmakefile.
* examples/GNUmakefile.inc.in (examples/example1$(EXEEXT)): Depend
on $(libs).
(install): Use $(pkgdatadir).
* src/vsip/GNUmakefile.inc.in (libs): Make it a variable, not a
target.
* vendor/GNUmakefile.inc.in (libs): Likewise.
Index: GNUmakefile.in
===================================================================
RCS file: /home/cvs/Repository/vpp/GNUmakefile.in,v
retrieving revision 1.34
diff -c -5 -p -r1.34 GNUmakefile.in
*** GNUmakefile.in 22 Dec 2005 16:31:40 -0000 1.34
--- GNUmakefile.in 24 Dec 2005 08:40:24 -0000
*************** srcdir := @srcdir@
*** 32,52 ****
# perform actions needed by maintainers.
maintainer_mode := @maintainer_mode@
### Installation ###
# Order matters for the various directory variables, as autoconf makes some
# of the variables depend on the values of others.
prefix := @prefix@
exec_prefix := @exec_prefix@
datadir := @datadir@
includedir := @includedir@
libdir := @libdir@
! docdir := $(prefix)/doc/vsip
suffix :=
- INSTALL := @INSTALL@
- INSTALL_DATA := @INSTALL_DATA@
### Compilation ###
# The path to the archiver.
AR := @AR@
--- 32,67 ----
# perform actions needed by maintainers.
maintainer_mode := @maintainer_mode@
### Installation ###
+ PACKAGE_TARNAME := @PACKAGE_TARNAME@
+ PACKAGE_VERSION := @PACKAGE_VERSION@
+ INSTALL := @INSTALL@
+ INSTALL_DATA := @INSTALL_DATA@
+
# Order matters for the various directory variables, as autoconf makes some
# of the variables depend on the values of others.
prefix := @prefix@
exec_prefix := @exec_prefix@
datadir := @datadir@
includedir := @includedir@
libdir := @libdir@
! # The directory for putting data that is specific to this package.
! # This is not a standard variable name.
! pkgdatadir := $(datadir)/$(PACKAGE_TARNAME)
!
! # Documentation directories. According to the GNU Coding Standards,
! # Autoconf has @...@ variables for some of these, but Autoconf 2.59,
! # installed on CodeSourcery's sytems, does not, so we set these by
! # hand, using the defaults specified in the GNU Coding Standards.
! datarootdir := $(prefix)/share
! docdir := $(datarootdir)/doc/$(PACKAGE_TARNAME)
! htmldir := $(docdir)
! pdfdir := $(docdir)
!
suffix :=
### Compilation ###
# The path to the archiver.
AR := @AR@
*************** endif
*** 115,137 ****
########################################################################
# Variables in this section may be appended to (with +=) by
# subdirectory Makefile fragments.
cxx_sources :=
!
! # The subdirectories in which we can find sub-Makefiles.
subdirs := \
apps \
benchmarks \
doc \
- examples \
src \
src/vsip \
tests \
tools \
! vendor
########################################################################
# Included Files
########################################################################
--- 130,162 ----
########################################################################
# Variables in this section may be appended to (with +=) by
# subdirectory Makefile fragments.
+ # C++ source files, relative to $srcdir.
cxx_sources :=
! # Libraries, relative to $objdir.
! libs :=
! # PDF documentation, relative to $objdir.
! pdf_manuals :=
! # HTML documentation, relative to $objdir.
! html_manuals :=
!
! # The subdirectories in which we can find sub-Makefiles. The
! # "examples" directory must be last because some of the targets there
! # depend on $(libs), and $(libs) will not be full initialized until
! # all other subdirectories have been processed.
subdirs := \
apps \
benchmarks \
doc \
src \
src/vsip \
tests \
tools \
! vendor \
! examples
########################################################################
# Included Files
########################################################################
*************** vsipsxr: vsip.syn
*** 244,270 ****
.FORCE:
.PHONY: all
all::
- .PHONY: libs
- libs::
-
.PHONY: depend
depend::
.PHONY: doc
! doc::
.PHONY: check
check::
.PHONY: clean
clean::
.PHONY: install
! install::
# Include automatically generated dependency files.
ifeq (,$(filter $(MAKECMDGOALS), depend doc clean))
include $(deps)
endif
--- 269,308 ----
.FORCE:
.PHONY: all
all::
.PHONY: depend
depend::
.PHONY: doc
! doc:: html pdf
!
! .PHONY: html
! html:: $(html_manuals)
!
! .PHONY: pdf
! pdf:: $(pdf_manuals)
.PHONY: check
check::
.PHONY: clean
clean::
.PHONY: install
! install:: install-pdf install-html
!
! .PHONY: install-pdf
! install-pdf:: $(foreach f,$(pdf_manuals),install-pdf-$(notdir $(f)))
!
! $(foreach f,$(pdf_manuals),$(eval $(call install_pdf_template,$(f))))
!
! .PHONY: install-html
! install-html: $(foreach f,$(html_manuals),install-html-$(notdir $(f)))
!
! $(foreach f,$(html_manuals),$(eval $(call install_html_template,$(f))))
# Include automatically generated dependency files.
ifeq (,$(filter $(MAKECMDGOALS), depend doc clean))
include $(deps)
endif
Index: configure.ac
===================================================================
RCS file: /home/cvs/Repository/vpp/configure.ac,v
retrieving revision 1.65
diff -c -5 -p -r1.65 configure.ac
*** configure.ac 23 Dec 2005 19:32:38 -0000 1.65
--- configure.ac 24 Dec 2005 08:40:24 -0000
*************** dnl
*** 9,19 ****
dnl ------------------------------------------------------------------
dnl Autoconf initialization
dnl ------------------------------------------------------------------
AC_PREREQ(2.56)
AC_REVISION($Revision: 1.65 $)
! AC_INIT(VSIPL++, 1.0, vsipl++ at codesourcery.com)
######################################################################
# Configure command line arguments.
######################################################################
--- 9,19 ----
dnl ------------------------------------------------------------------
dnl Autoconf initialization
dnl ------------------------------------------------------------------
AC_PREREQ(2.56)
AC_REVISION($Revision: 1.65 $)
! AC_INIT(Sourcery VSIPL++, 1.0, vsipl++ at codesourcery.com, sourceryvsipl++)
######################################################################
# Configure command line arguments.
######################################################################
Index: doc/GNUmakefile.inc.in
===================================================================
RCS file: /home/cvs/Repository/vpp/doc/GNUmakefile.inc.in,v
retrieving revision 1.11
diff -c -5 -p -r1.11 GNUmakefile.inc.in
*** doc/GNUmakefile.inc.in 23 Dec 2005 16:24:11 -0000 1.11
--- doc/GNUmakefile.inc.in 24 Dec 2005 08:40:24 -0000
*************** doc_pdf_manuals := \
*** 16,35 ****
doc/quickstart/quickstart.pdf \
doc/tutorial/tutorial.pdf
doc_html_manuals := $(doc_pdf_manuals:%.pdf=%.html)
doc_manuals := $(doc_pdf_manuals) $(doc_html_manuals)
tutorial_images := \
$(wildcard $(srcdir)/doc/tutorial/images/*.png) \
$(wildcard $(srcdir)/doc/tutorial/images/callouts/*.png) \
########################################################################
# Rules
########################################################################
- doc:: $(doc_html_manuals) $(doc_pdf_manuals)
-
ifdef DOXYGEN
doc:: doc/html/index.html
endif
$(doc_manuals): \
--- 16,36 ----
doc/quickstart/quickstart.pdf \
doc/tutorial/tutorial.pdf
doc_html_manuals := $(doc_pdf_manuals:%.pdf=%.html)
doc_manuals := $(doc_pdf_manuals) $(doc_html_manuals)
+ pdf_manuals += $(doc_pdf_manuals)
+ html_manuals += $(doc_html_manuals)
+
tutorial_images := \
$(wildcard $(srcdir)/doc/tutorial/images/*.png) \
$(wildcard $(srcdir)/doc/tutorial/images/callouts/*.png) \
########################################################################
# Rules
########################################################################
ifdef DOXYGEN
doc:: doc/html/index.html
endif
$(doc_manuals): \
*************** $(doc_manuals): \
*** 38,81 ****
doc/html/index.html:
$(DOXYGEN) doc/Doxyfile
doc/tutorial/tutorial.html: \
! $(patsubst $(srcdir)/doc/tutorial/%,doc/tutorial/html/%,$(tutorial_images))
! doc/tutorial/html/images/%.png: $(srcdir)/doc/tutorial/images/%.png
mkdir -p $(@D)
cp $< $@
clean::
! rm -f $(doc_manuals)
rm -rf doc/html
-
- # Install the manuals.
- install::
- $(INSTALL) -d $(docdir)
- for f in $(doc_pdf_manuals); do \
- if test -r $$f; then \
- $(INSTALL_DATA) $$f $(docdir); \
- fi; \
- done
- # HTML manuals go in their own subdirectories.
- for dir in quickstart tutorial; do \
- if test -r doc/$$dir/html/index.html; then \
- $(INSTALL) -d $(docdir)/html/$$dir; \
- $(INSTALL_DATA) doc/$$dir/html/*.html \
- $(docdir)/html/$$dir; \
- $(INSTALL_DATA) doc/$$dir/html/*.css \
- $(docdir)/html/$$dir; \
- fi; \
- if test -d doc/$$dir/html/images; then \
- $(INSTALL) -d $(docdir)/html/$$dir/images; \
- $(INSTALL_DATA) doc/$$dir/html/images/*.png \
- $(docdir)/html/$$dir/images; \
- fi; \
- if test -d doc/$$dir/html/images/callouts; then \
- $(INSTALL) -d \
- $(docdir)/html/$$dir/images/callouts; \
- $(INSTALL_DATA) doc/$$dir/html/images/callouts/*.png \
- $(docdir)/html/$$dir/images/callouts; \
- fi; \
- done
--- 39,52 ----
doc/html/index.html:
$(DOXYGEN) doc/Doxyfile
doc/tutorial/tutorial.html: \
! $(patsubst $(srcdir)/doc/tutorial/%,doc/tutorial/tutorial.html/%,$(tutorial_images))
! doc/tutorial/tutorial.html/images/%.png: $(srcdir)/doc/tutorial/images/%.png
mkdir -p $(@D)
cp $< $@
clean::
! rm -rf $(doc_manuals)
rm -rf doc/html
Index: examples/GNUmakefile.inc.in
===================================================================
RCS file: /home/cvs/Repository/vpp/examples/GNUmakefile.inc.in,v
retrieving revision 1.5
diff -c -5 -p -r1.5 GNUmakefile.inc.in
*** examples/GNUmakefile.inc.in 1 Dec 2005 14:43:17 -0000 1.5
--- examples/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000
*************** cxx_sources += $(examples_cxx_sources)
*** 24,34 ****
# Rules
########################################################################
all:: examples/example1$(EXEEXT)
! examples/example1$(EXEEXT): examples/example1.$(OBJEXT) libs
$(CXX) $(LDFLAGS) -o $@ $< -Lsrc/vsip -lvsip $(LIBS)
install::
! $(INSTALL) -d $(datadir)/vsip
! $(INSTALL_DATA) $(examples_cxx_sources) $(datadir)/vsip
--- 24,34 ----
# Rules
########################################################################
all:: examples/example1$(EXEEXT)
! examples/example1$(EXEEXT): examples/example1.$(OBJEXT) $(libs)
$(CXX) $(LDFLAGS) -o $@ $< -Lsrc/vsip -lvsip $(LIBS)
install::
! $(INSTALL) -d $(pkgdatadir)
! $(INSTALL_DATA) $(examples_cxx_sources) $(pkgdatadir)
Index: src/vsip/GNUmakefile.inc.in
===================================================================
RCS file: /home/cvs/Repository/vpp/src/vsip/GNUmakefile.inc.in,v
retrieving revision 1.11
diff -c -5 -p -r1.11 GNUmakefile.inc.in
*** src/vsip/GNUmakefile.inc.in 22 Dec 2005 16:31:40 -0000 1.11
--- src/vsip/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000
*************** ifdef VSIP_IMPL_HAVE_SAL
*** 23,40 ****
src_vsip_cxx_sources += $(srcdir)/src/vsip/impl/sal.cpp
endif
src_vsip_cxx_objects := $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(src_vsip_cxx_sources))
cxx_sources += $(src_vsip_cxx_sources)
########################################################################
# Rules
########################################################################
all:: src/vsip/libvsip.a
- libs:: src/vsip/libvsip.a
-
clean::
rm -f src/vsip/libvsip.a
src/vsip/libvsip.a: $(src_vsip_cxx_objects)
$(AR) rc $@ $^ || rm -f $@
--- 23,39 ----
src_vsip_cxx_sources += $(srcdir)/src/vsip/impl/sal.cpp
endif
src_vsip_cxx_objects := $(patsubst $(srcdir)/%.cpp, %.$(OBJEXT), $(src_vsip_cxx_sources))
cxx_sources += $(src_vsip_cxx_sources)
+ libs += src/vsip/libvsip.a
########################################################################
# Rules
########################################################################
all:: src/vsip/libvsip.a
clean::
rm -f src/vsip/libvsip.a
src/vsip/libvsip.a: $(src_vsip_cxx_objects)
$(AR) rc $@ $^ || rm -f $@
Index: vendor/GNUmakefile.inc.in
===================================================================
RCS file: /home/cvs/Repository/vpp/vendor/GNUmakefile.inc.in,v
retrieving revision 1.6
diff -c -5 -p -r1.6 GNUmakefile.inc.in
*** vendor/GNUmakefile.inc.in 23 Dec 2005 19:32:38 -0000 1.6
--- vendor/GNUmakefile.inc.in 24 Dec 2005 08:40:28 -0000
*************** vendor_LIBS := \
*** 40,50 ****
########################################################################
ifdef USE_BUILTIN_ATLAS
all:: $(vendor_LIBS)
! libs:: $(vendor_LIBS)
$(vendor_ATLAS_LIBS):
@echo "Building ATLAS (see atlas.build.log)"
@$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1
--- 40,50 ----
########################################################################
ifdef USE_BUILTIN_ATLAS
all:: $(vendor_LIBS)
! libs += $(vendor_LIBS)
$(vendor_ATLAS_LIBS):
@echo "Building ATLAS (see atlas.build.log)"
@$(MAKE) -C vendor/atlas build > atlas.build.log 2>&1
*************** endif
*** 105,115 ****
vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE)
all:: $(vendor_FFTW_LIBS)
! libs:: $(vendor_FFTW_LIBS)
clean::
@echo "Cleaning FFTW (see fftw.clean.log)"
@for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \
echo "$(MAKE) -C $$ldir clean "; \
--- 105,115 ----
vendor_FFTW_LIBS := $(LIBFFTW_FLOAT) $(LIBFFTW_DOUBLE) $(LIBFFTW_LONG_DOUBLE)
all:: $(vendor_FFTW_LIBS)
! libs += $(vendor_FFTW_LIBS)
clean::
@echo "Cleaning FFTW (see fftw.clean.log)"
@for ldir in $(subst /.libs/,,$(dir $(vendor_FFTW_LIBS))); do \
echo "$(MAKE) -C $$ldir clean "; \
More information about the vsipl++
mailing list