Hi,

At Thu, 29 Dec 2005 09:21:37 +0900,
Mathieu Bouchard wrote in [ruby-core:07016]:
> > |Surely the build target should be listed as a dependency of the install 
> > |target in the makefile?
> > It might make you compile the whole things, which may include nasty
> > instructions, in the root privilege.  Is it OK for you?
> 
> How is the current "make install" any more secure than that?

I don't think it's nice idea too.  Instead, what about other
targets, so that you can do `make all sys-install'?


Index: Makefile.in =================================================================== RCS file: /src/ruby/Makefile.in,v retrieving revision 1.77 diff -U2 -p -r1.77 Makefile.in --- Makefile.in 19 Dec 2005 14:31:09 -0000 1.77 +++ Makefile.in 29 Dec 2005 01:28:17 -0000 @@ -83,4 +83,5 @@ RANLIB = @RANLIB@ OBJEXT = @OBJEXT@ MANTYPE = @MANTYPE@ +SUDO = @SUDO@ #### End of variables Index: common.mk =================================================================== RCS file: /src/ruby/common.mk,v retrieving revision 1.22 diff -U2 -p -r1.22 common.mk --- common.mk 27 Dec 2005 05:40:04 -0000 1.22 +++ common.mk 29 Dec 2005 01:28:18 -0000 @@ -106,4 +106,21 @@ install-man: $(RBCONFIG) $(MINIRUBY) $(srcdir)/instruby.rb $(SCRIPT_ARGS) --install=man --mantype="$(MANTYPE)" +sys-install: + $(SUDO) $(MAKE) $(MFLAGS) install +sys-install-all: + $(SUDO) $(MAKE) $(MFLAGS) install-all +sys-install-nodoc: + $(SUDO) $(MAKE) $(MFLAGS) install-nodoc +sys-install-local: + $(SUDO) $(MAKE) $(MFLAGS) install-local +sys-install-ext: + $(SUDO) $(MAKE) $(MFLAGS) install-ext +sys-install-bin: + $(SUDO) $(MAKE) $(MFLAGS) install-bin +sys-install-lib: + $(SUDO) $(MAKE) $(MFLAGS) install-lib +sys-install-man: + $(SUDO) $(MAKE) $(MFLAGS) install-man + what-where-all no-install-all: no-install no-install-doc what-where no-install: no-install-local no-install-ext Index: configure.in =================================================================== RCS file: /src/ruby/configure.in,v retrieving revision 1.294 diff -U2 -p -r1.294 configure.in --- configure.in 27 Dec 2005 11:52:54 -0000 1.294 +++ configure.in 29 Dec 2005 01:28:18 -0000 @@ -198,4 +198,7 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_INSTALL +if test x"${build}" = x"${host}"; then + AC_CHECK_TOOL(SUDO, sudo) +fi # checks for UNIX variants that set C preprocessor variables
-- Nobu Nakada