Add documentation to C++ and Python Package

For C++ doc:
/usr/share/doc/ortools
ref: https://www.debian.org/doc/manuals/debian-reference/debian-reference.en.txt

For Python doc:
ref: https://www.python.org/dev/peps/pep-0427/#the-data-directory
ref: https://www.python.org/dev/peps/pep-0491/#install-paths
/!\ Please not bdist_wheel command ignore MANIFEST.in and
 there is no 'doc_dir' option in class Distribution cf.
https://github.com/pypa/setuptools/blob/master/setuptools/dist.py
This commit is contained in:
Corentin Le Molgat
2018-05-31 11:49:48 +02:00
parent 9b55324fd2
commit efc46ca1bf
3 changed files with 15 additions and 5 deletions

View File

@@ -840,8 +840,9 @@ rcc: $(BIN_DIR)/$(basename $(notdir $(EX)))$E
# ref: https://www.gnu.org/prep/standards/html_node/DESTDIR.html
install_dirs:
-$(MKDIR) "$(DESTDIR)$(prefix)"
-$(MKDIR) "$(DESTDIR)$(prefix)$Slib"
-$(MKDIR) "$(DESTDIR)$(prefix)$Sinclude"
-$(MKDIR) "$(DESTDIR)$(prefix)$Slib"
-$(MKDIR) "$(DESTDIR)$(prefix)$Sbin"
-$(DELREC) "$(DESTDIR)$(prefix)$Sinclude$Sortools"
$(MKDIR) "$(DESTDIR)$(prefix)$Sinclude$Sortools"
$(MKDIR) "$(DESTDIR)$(prefix)$Sinclude$Sortools$Salgorithms"
@@ -856,7 +857,7 @@ install_dirs:
$(MKDIR) "$(DESTDIR)$(prefix)$Sinclude$Sortools$Sutil"
.PHONY: install_cc # Install C++ OR-Tools to $(DESTDIR)$(prefix)
install_cc: install_libortools install_third_party
install_cc: install_libortools install_third_party install_doc
install_libortools: ortoolslibs install_dirs
$(COPY) LICENSE-2.0.txt "$(DESTDIR)$(prefix)"
@@ -878,7 +879,7 @@ install_libortools: ortoolslibs install_dirs
$(COPY) ortools$Sutil$S*.h "$(DESTDIR)$(prefix)$Sinclude$Sortools$Sutil"
$(COPY) $(LIB_DIR)$S$(LIB_PREFIX)ortools.$L "$(DESTDIR)$(prefix)$Slib"
install_third_party:
install_third_party: install_dirs
ifeq ($(UNIX_GFLAGS_DIR),$(OR_TOOLS_TOP)/dependencies/install)
$(COPYREC) dependencies$Sinstall$Sinclude$Sgflags "$(DESTDIR)$(prefix)$Sinclude"
$(COPYREC) dependencies$Sinstall$Slib$Slibgflags* "$(DESTDIR)$(prefix)$Slib"
@@ -904,6 +905,14 @@ ifeq ($(UNIX_CBC_DIR),$(OR_TOOLS_TOP)/dependencies/install)
$(COPYREC) dependencies$Sinstall$Sbin$Sclp "$(DESTDIR)$(prefix)$Sbin"
endif
install_doc:
-$(DELREC) "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools"
-$(MKDIR_P) "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools"
-$(MKDIR) "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat"
-$(MKDIR) "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat$Sdoc"
#$(COPY) ortools$Ssat$S*.md "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat"
$(COPY) ortools$Ssat$Sdoc$S*.md "$(DESTDIR)$(prefix)$Sshare$Sdoc$Sortools$Ssat$Sdoc"
.PHONY: detect_cc # Show variables used to build C++ OR-Tools.
detect_cc:
@echo Relevant info for the C++ build: