From 04058d7b8199e2919ce63cb4b917999ba126c532 Mon Sep 17 00:00:00 2001 From: Martin Nilsson <mani@lysator.liu.se> Date: Mon, 25 Jul 2005 03:55:36 +0200 Subject: [PATCH] Users compiling from CVS should be on their own regarding documentation. Changed to the less annoying behaviour of complaining of lack of documentation when exporting instead of installing. Rev: Makefile:1.152 Rev: bin/install.pike:1.161 Rev: src/Makefile.in:1.408 --- Makefile | 21 ++++++++++++++++++--- bin/install.pike | 43 ++++++++++++++++++++++++++++++++++--------- src/Makefile.in | 39 +-------------------------------------- 3 files changed, 53 insertions(+), 50 deletions(-) diff --git a/Makefile b/Makefile index 59af4497a5..5484206b0b 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ # -# $Id: Makefile,v 1.151 2005/07/08 17:59:17 grubba Exp $ +# $Id: Makefile,v 1.152 2005/07/25 01:55:36 nilsson Exp $ # # Meta Makefile # @@ -207,13 +207,15 @@ install: bin/pike @$(DO_MAKE) "METATARGET=install" _make_in_builddir install_nodoc: bin/pike - @$(DO_MAKE) "METATARGET=install_nodoc" _make_in_builddir + @INSTALLARGS="--no-autodoc $(INSTALLARGS)" + @$(DO_MAKE) "METATARGET=install" _make_in_builddir install_interactive: bin/pike @$(DO_MAKE) "METATARGET=install_interactive" _make_in_builddir install_interactive_nodoc: bin/pike - @$(DO_MAKE) "METATARGET=install_interactive_nodoc" _make_in_builddir + @INSTALLARGS="--no-audodoc $(INSTALLARGS)" + @$(DO_MAKE) "METATARGET=install_interactive" _make_in_builddir tinstall: bin/pike @$(DO_MAKE) "METATARGET=tinstall" _make_in_builddir @@ -269,6 +271,19 @@ source: "OS=source" "LIMITED_TARGETS=yes" "METATARGET=source" _make_in_builddir export: + @if [ -f "$(BUILDDIR)/autodoc.xml" ]; then : ; else \ + echo ; \ + echo 'No documentation source built!'; \ + echo 'Type "make doc" to make a documentation source file'; \ + echo 'or "make export_nodoc" to install without a documentation'; \ + echo 'source.' ; \ + echo ; \ + exit 1; \ + fi + @$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \ + "OS=source" "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir + +export_nodoc: @$(DO_MAKE) "CONFIGUREARGS=--disable-binary $(CONFIGUREARGS)" \ "OS=source" "LIMITED_TARGETS=yes" "METATARGET=export" _make_in_builddir diff --git a/bin/install.pike b/bin/install.pike index fde336bfb6..94a137b60e 100644 --- a/bin/install.pike +++ b/bin/install.pike @@ -2,7 +2,7 @@ // Pike installer and exporter. // -// $Id: install.pike,v 1.160 2005/07/22 20:26:27 nilsson Exp $ +// $Id: install.pike,v 1.161 2005/07/25 01:55:36 nilsson Exp $ #define USE_GTK @@ -903,6 +903,22 @@ int install_file(string from, return ret; } +// Install the file if it exists, but don't complain if it doesn't. +int try_install_file(string from, + string to, + void|int mode, + void|int dump) +{ + if(file_stat(from)) { + if(query_num_arg()==2) + return install_file(from, to); + else + return install_file(from, to, mode, dump); + } + return 0; +} + + void create_file(string dest, string content) { status("Creating", dest); @@ -921,7 +937,7 @@ string stripslash(string s) } -void install_dir(string from, string to,int dump) +void install_dir(string from, string to, int dump) { from=stripslash(from); to=stripslash(to); @@ -953,6 +969,15 @@ void install_dir(string from, string to,int dump) } } +// Install the file if it exists, but don't complain if it doesn't. +void try_install_dir(string from, + string to, + int dump) +{ + if(file_stat(from)) + install_dir(from, to, dump); +} + void install_header_files(string from, string to) { installed_files++; @@ -2417,22 +2442,22 @@ void do_install() if (!no_autodoc) { // install the core extracted autodocs - install_file(combine_path(vars->TMP_BUILDDIR, "autodoc.xml"), - combine_path(doc_prefix, "src", "core_autodoc.xml")); + try_install_file(combine_path(vars->TMP_BUILDDIR, "autodoc.xml"), + combine_path(doc_prefix, "src", "core_autodoc.xml")); // create a directory for extracted module documentation if(!export) mkdirhier(combine_path(doc_prefix, "src", "extracted")); - install_dir(combine_path(vars->TMP_BUILDDIR, "doc_build", "images"), + try_install_dir(combine_path(vars->TMP_BUILDDIR, "doc_build", "images"), combine_path(doc_prefix, "src", "images"), 0); - install_dir(combine_path(vars->DOCDIR_SRC, "presentation"), + try_install_dir(combine_path(vars->DOCDIR_SRC, "presentation"), combine_path(doc_prefix, "src", "presentation"), 0); - install_dir(combine_path(vars->DOCDIR_SRC, "src_images"), + try_install_dir(combine_path(vars->DOCDIR_SRC, "src_images"), combine_path(doc_prefix, "src", "src_images"), 0); - install_dir(combine_path(vars->DOCDIR_SRC, "structure"), + try_install_dir(combine_path(vars->DOCDIR_SRC, "structure"), combine_path(doc_prefix, "src", "structure"), 0); - install_file(combine_path(vars->DOCDIR_SRC,"Makefile"), + try_install_file(combine_path(vars->DOCDIR_SRC,"Makefile"), combine_path(doc_prefix, "src", "Makefile")); } else if(!export) { diff --git a/src/Makefile.in b/src/Makefile.in index d57a7a7b81..3eea6a181c 100644 --- a/src/Makefile.in +++ b/src/Makefile.in @@ -1,5 +1,5 @@ # -# $Id: Makefile.in,v 1.407 2005/04/09 03:09:15 nilsson Exp $ +# $Id: Makefile.in,v 1.408 2005/07/25 01:55:36 nilsson Exp $ # # This line is needed on some machines. @@ -527,15 +527,6 @@ force : # install install: pike tools - @if [ -f autodoc.xml ]; then : ; else \ - echo ; \ - echo 'No documentation source built!'; \ - echo 'Type "make doc" to make a documentation source file'; \ - echo 'or "make install_nodoc" to install without a documentation'; \ - echo 'source.' ; \ - echo ; \ - exit 1; \ - fi @$(RUNPIKE) $(TMP_BINDIR)/install.pike \ exec_prefix="$(exec_prefix)" lib_prefix="$(lib_prefix)" \ TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ @@ -545,26 +536,7 @@ install: pike tools fakeroot="$(buildroot)" PIKE_MODULE_RELOC="$(PIKE_MODULE_RELOC)" \ $(INSTALLARGS) -install_nodoc: pike tools - @$(RUNPIKE) $(TMP_BINDIR)/install.pike \ - exec_prefix="$(exec_prefix)" lib_prefix="$(lib_prefix)" \ - TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ - SRCDIR="$(SRCDIR)" prefix="$(prefix)" DOCDIR_SRC="$(DOCDIR_SRC)" \ - MANDIR_SRC="$(MANDIR_SRC)" \ - man_prefix="$(man_prefix)" pike_name=$(pike_name) \ - fakeroot="$(buildroot)" PIKE_MODULE_RELOC="$(PIKE_MODULE_RELOC)" \ - --no-autodoc $(INSTALLARGS) - install_interactive: pike tools - @if [ -f autodoc.xml ]; then : ; else \ - echo ; \ - echo 'No documentation source built!'; \ - echo 'Type "make doc" to make a documentation source file'; \ - echo 'or "make install_interactive_nodoc" to install without a'; \ - echo 'documentation source.' ; \ - echo ; \ - exit 1; \ - fi @$(RUNPIKE) $(TMP_BINDIR)/install.pike --interactive \ exec_prefix="$(exec_prefix)" prefix=$(prefix) \ TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ @@ -572,15 +544,6 @@ install_interactive: pike tools MANDIR_SRC="$(MANDIR_SRC)" \ fakeroot="$(buildroot)" PIKE_MODULE_RELOC="$(PIKE_MODULE_RELOC)" -install_interactive_nodoc: pike tools - @$(RUNPIKE) $(TMP_BINDIR)/install.pike --interactive \ - exec_prefix="$(exec_prefix)" prefix=$(prefix) \ - TMP_LIBDIR="$(TMP_LIBDIR)" LIBDIR_SRC="$(LIBDIR_SRC)" \ - SRCDIR="$(SRCDIR)" DOCDIR_SRC="$(DOCDIR_SRC)" \ - MANDIR_SRC="$(MANDIR_SRC)" \ - fakeroot="$(buildroot)" PIKE_MODULE_RELOC="$(PIKE_MODULE_RELOC)" \ - --no-autodoc - # tidy up a bit tidy: -rm -f *.fail *.o *.obj *.pp *.protos core y.output y.tab.c y.tab.h -- GitLab