Mercurial > hg > early-roguelike
changeset 47:2a59cf36ae38
rogue5: Add chroot support to the autotools system.
author | elwin |
---|---|
date | Fri, 07 Oct 2011 21:19:14 +0000 |
parents | af6b05e86747 |
children | ea960351de17 |
files | rogue5/Makefile.in rogue5/configure.ac |
diffstat | 2 files changed, 29 insertions(+), 5 deletions(-) [+] |
line wrap: on
line diff
--- a/rogue5/Makefile.in Fri Oct 07 06:15:48 2011 +0000 +++ b/rogue5/Makefile.in Fri Oct 07 21:19:14 2011 +0000 @@ -87,7 +87,7 @@ CHMOD=chmod -DESTDIR= +DESTDIR=@DESTDIR@ prefix=@prefix@ exec_prefix=@exec_prefix@ @@ -214,14 +214,17 @@ $(CHMOD) 0464 $(DESTDIR)$(LOGFILE) ; \ $(CHMOD) 0775 $(DESTDIR)$(SAVEDIR) ; \ fi - -if test -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi - -if test ! -d $(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi + -if test -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(man6dir)/$(PROGRAM).6 ; fi + -if test ! -d $(DESTDIR)$(man6dir) ; then $(INSTALL) -m 0644 rogue.6 $(DESTDIR)$(mandir)/$(PROGRAM).6 ; fi -$(INSTALL) -m 0644 rogue.doc $(DESTDIR)$(docdir)/$(PROGRAM).doc -$(INSTALL) -m 0644 rogue.html $(DESTDIR)$(docdir)/$(PROGRAM).html -$(INSTALL) -m 0644 rogue.cat $(DESTDIR)$(docdir)/$(PROGRAM).cat -$(INSTALL) -m 0644 LICENSE.TXT $(DESTDIR)$(docdir)/LICENSE.TXT -$(INSTALL) -m 0644 rogue.me $(DESTDIR)$(docdir)/$(PROGRAM).me - -if test ! -f $(DESTDIR)$(LOCKFILE) ; then $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; $(RM) $(DESTDIR)$(LOCKFILE) ; fi + -if test "x$(LOCKFILE)" != "x" -a ! -f $(DESTDIR)$(LOCKFILE) ; then \ + $(INSTALL) -m 0666 test $(DESTDIR)$(LOCKFILE) ; \ + $(RM) $(DESTDIR)$(LOCKFILE) ; \ + fi -$(RM) test uninstall:
--- a/rogue5/configure.ac Fri Oct 07 06:15:48 2011 +0000 +++ b/rogue5/configure.ac Fri Oct 07 21:19:14 2011 +0000 @@ -40,7 +40,7 @@ AC_CHECK_PROG([TBL], [tbl], [tbl],) AC_CHECK_PROG([SED], [sed], [sed],) -AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue"] ) +AC_ARG_WITH(program-name, AC_HELP_STRING([--with-program-name=NAME],[alternate executable name]),[progname="$withval" ], [progname="rogue5"] ) PROGRAM=$progname AC_SUBST(PROGRAM) @@ -149,6 +149,27 @@ AC_SUBST(SAVEDIR) +AC_ARG_ENABLE([destdir],[AC_HELP_STRING([--enable-destdir=DESTDIR], [chroot to install into])],[],[]) +AC_MSG_CHECKING([for chrooted install]) +if test "x$enable_destdir" = "xno" ; then +DESTDIR= +elif test "x$enable_destdir" = "xyes" ; then +DESTDIR= +elif test "x$enable_destdir" = "x" ; then +DESTDIR= +else +DESTDIR=$enable_destdir +fi + +if test "x$DESTDIR" != "x" ; then +AC_DEFINE_UNQUOTED([DESTDIR], ["$DESTDIR"], [Define to a chroot to install into]) +AC_MSG_RESULT([$DESTDIR]) +else +AC_MSG_RESULT([disabled]) +fi + +AC_SUBST(DESTDIR) + AC_ARG_ENABLE([wizardmode],[AC_HELP_STRING([--enable-wizardmode], [enable availability of wizard mode @<:@default=no@:>@])],[],[]) AC_MSG_CHECKING([if wizard mode is enabled]) if test "x$enable_wizardmode" = "xno" ; then