summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-16 07:20:19 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2009-09-16 07:20:19 +0000
commit99b41f385825f48d81195ebe19ddd189472c98c3 (patch)
tree0d8bc6281f150f9442daab451db9434855c8d8dc
parent193a7db4e25beeb1b7932581323848258400cc34 (diff)
* configure.in (CAPITARGET): enable iff doxygen is available.
* configure.in (INSTALLDOC): enable if rdoc or doxygen are enabled. * common.mk (docs): target to make documents. * Makefile.in, win32/Makefile.sub (install-{all,nodoc}): trigger by $(INSTALLDOC) from install. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@24956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--ChangeLog11
-rw-r--r--Makefile.in3
-rw-r--r--common.mk24
-rw-r--r--configure.in12
-rw-r--r--win32/Makefile.sub23
5 files changed, 60 insertions, 13 deletions
diff --git a/ChangeLog b/ChangeLog
index 54b1df5221..a507ceea19 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,14 @@
+Wed Sep 16 16:20:17 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
+
+ * configure.in (CAPITARGET): enable iff doxygen is available.
+
+ * configure.in (INSTALLDOC): enable if rdoc or doxygen are enabled.
+
+ * common.mk (docs): target to make documents.
+
+ * Makefile.in, win32/Makefile.sub (install-{all,nodoc}): trigger
+ by $(INSTALLDOC) from install.
+
Wed Sep 16 13:39:10 2009 Marc-Andre Lafortune <ruby-core@marc-andre.ca>
* lib/matrix.rb (determinant): Bug fix where determinant failed on
diff --git a/Makefile.in b/Makefile.in
index 5843ed030d..d7e1ab3da4 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -34,7 +34,8 @@ ruby_version = @ruby_version@
TESTUI = console
TESTS =
-RDOCTARGET = @RDOCTARGET@
+INSTALLDOC = @INSTALLDOC@
+DOCTARGETS = @RDOCTARGET@ @CAPITARGET@
EXTOUT = @EXTOUT@
arch_hdrdir = $(EXTOUT)/include/$(arch)
diff --git a/common.mk b/common.mk
index baee680205..4c37b93e39 100644
--- a/common.mk
+++ b/common.mk
@@ -124,7 +124,7 @@ BOOTSTRAPRUBY = $(BASERUBY)
COMPILE_PRELUDE = $(MINIRUBY) -I$(srcdir) -I. -rrbconfig $(srcdir)/tool/compile_prelude.rb
-all: encs exts main $(RDOCTARGET)
+all: encs exts main docs
main: encs exts
@$(RUNCMD) $(MKMAIN_CMD) $(MAKE)
@@ -172,15 +172,14 @@ $(STATIC_RUBY)$(EXEEXT): $(MAINOBJ) $(DLDOBJS) $(EXTOBJS) $(LIBRUBY_A)
ruby.imp: $(EXPORTOBJS)
@$(NM) -Pgp $(EXPORTOBJS) | awk 'BEGIN{print "#!"}; $$2~/^[BD]$$/{print $$1}' | sort -u -o $@
-install: install-$(RDOCTARGET)
-install-rdoc: install-all
-doc-all: rdoc capi
+install: install-$(INSTALLDOC)
+docs: $(DOCTARGETS)
-install-all: doc-all pre-install-all do-install-all post-install-all
-pre-install-all:: install-prereq
+install-all: doc pre-install-all do-install-all post-install-all
+pre-install-all:: pre-install-local pre-install-ext pre-install-doc
do-install-all: $(PROGRAM)
$(INSTRUBY) --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)"
-post-install-all::
+post-install-all:: post-install-local post-install-ext post-install-doc
@$(NULLCMD)
install-nodoc: pre-install-nodoc do-install-nodoc post-install-nodoc
@@ -256,9 +255,14 @@ post-install-capi::
@$(NULLCMD)
what-where: no-install
-no-install: no-install-nodoc no-install-doc
+no-install: no-install-$(INSTALLDOC)
what-where-all: no-install-all
-no-install-all: no-install-nodoc
+no-install-all: pre-no-install-all dont-install-all post-no-install-all
+pre-no-install-all:: pre-no-install-local pre-no-install-ext pre-no-install-doc
+dont-install-all: $(PROGRAM)
+ $(INSTRUBY) -n --make="$(MAKE)" $(INSTRUBY_ARGS) --install=all --rdoc-output="$(RDOCOUT)"
+post-no-install-all:: post-no-install-local post-no-install-ext post-no-install-doc
+ @$(NULLCMD)
what-where-nodoc: no-install-nodoc
no-install-nodoc: pre-no-install-nodoc dont-install-nodoc post-no-install-nodoc
@@ -360,7 +364,7 @@ CLEAR_INSTALLED_LIST = clear-installed-list
install-prereq: $(CLEAR_INSTALLED_LIST) PHONY
clear-installed-list: PHONY
- @exit > $(INSTALLED_LIST)
+ @set MAKE="$(MAKE)" > $(INSTALLED_LIST)
clean: clean-ext clean-local clean-enc clean-golf clean-rdoc clean-extout
clean-local:: PHONY
diff --git a/configure.in b/configure.in
index bcddb89a81..4fe7e3248c 100644
--- a/configure.in
+++ b/configure.in
@@ -343,6 +343,12 @@ AC_SUBST(MAKEDIRS)
AC_CHECK_TOOL(DOT, dot)
AC_CHECK_TOOL(DOXYGEN, doxygen)
+if test x"$DOXYGEN" = x; then
+ CAPITARGET=nodoc
+else
+ CAPITARGET=capi
+fi
+AC_SUBST(CAPITARGET)
# checks for UNIX variants that set C preprocessor variables
AC_USE_SYSTEM_EXTENSIONS
@@ -2119,6 +2125,12 @@ else
fi
AC_SUBST(RDOCTARGET)
+case "$RDOCTARGET:$CAPITARGET" in
+ when(nodoc:nodoc) INSTALLDOC=nodoc;;
+ when(*) INSTALLDOC=all;;
+esac
+AC_SUBST(INSTALLDOC)
+
if test "$rb_with_pthread" = "yes"; then
THREAD_MODEL=pthread
fi
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 21a354312c..a46a02216b 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -150,8 +150,27 @@ TESTUI = console
!ifndef TESTS
TESTS =
!endif
-!ifndef RDOCTARGET
-RDOCTARGET = rdoc
+!ifndef CAPITARGET
+! ifdef DOXYGEN
+CAPITARGET = capi
+! else
+CAPITARGET = nodoc
+! endif
+!endif
+!ifndef DOCTARGETS
+! if "$(RDOCTARGET)" == "rdoc"
+DOCTARGETS = $(DOCTARGETS) rdoc
+! endif
+! if "$(CAPITARGET)" == "capi"
+DOCTARGETS = $(DOCTARGETS) capi
+! endif
+!ifndef INSTALLDOC
+! if "$(DOCTARGETS)" != ""
+INSTALLDOC = all
+! else
+INSTALLDOC = nodoc
+DOCTARGETS = nodoc
+! endif
!endif
OUTFLAG = -Fe