Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Improve testing whether srcdir equals builddir.

git-svn-id: https://svn.r-project.org/R/trunk@13570 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information...
commit a437d9e6ab0c055a29943c68db55843173465ec7 1 parent abd8c3f
hornik authored
View
1  Makeconf.in
@@ -10,6 +10,7 @@ AWK = @AWK@
BITMAP_LIBS = @BITMAP_LIBS@
BLAS = @BLAS@
BLAS_LIBS = @BLAS_LIBS@
+BUILDDIR_IS_SRCDIR = @BUILDDIR_IS_SRCDIR@
CC = @CC@
CFLAGS = @CFLAGS@
CPICFLAGS = @CPICFLAGS@
View
4 Makefile.in
@@ -42,7 +42,7 @@ libtool: $(LIBTOOL_DEPS)
$(SHELL) ./config.status --recheck
R: Makefile
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
for f in $(INSTFILES); do \
$(INSTALL_DATA) $(srcdir)/$${f} $(top_builddir); \
done; \
@@ -154,7 +154,7 @@ clean:
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@); \
done
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
distclean: clean
View
4 afm/Makefile.in
@@ -31,7 +31,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(SHELL) ./config.status
R: Makefile
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-sources; \
fi
@@ -52,7 +52,7 @@ uninstall:
mostlyclean:
clean:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
distclean: clean
View
14 configure.in
@@ -198,7 +198,18 @@ AC_ARG_WITH(tk-config,
## use_libtool=${withval},
## use_libtool=yes)
## </FIXME>
-AM_CONDITIONAL(USE_LIBTOOL, test "${use_libtool}" = yes)
+AM_CONDITIONAL(USE_LIBTOOL, test "${use_libtool}" = yes)
+
+### Check whether we build in srcdir
+AC_PATH_PROG(GETWD, pwd, pwd)
+AC_MSG_CHECKING([whether builddir is srcdir])
+if test "`cd ${srcdir} && ${GETWD}`" = "`${GETWD}`"; then
+ BUILDDIR_IS_SRCDIR=yes
+else
+ BUILDDIR_IS_SRCDIR=no
+fi
+AC_SUBST(BUILDDIR_IS_SRCDIR)
+AC_MSG_RESULT([${BUILDDIR_IS_SRCDIR}])
### C compiler.
@@ -243,7 +254,6 @@ R_PROG_AR
R_PROG_ECHO_N
R_PROG_INSTALL
AC_PATH_PROG(JAVAC, javac)
-AC_PATH_PROG(GETWD, pwd, pwd)
## Libtool
AM_DISABLE_STATIC
View
4 doc/html/Makefile.in
@@ -38,7 +38,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(SHELL) ./config.status
R: Makefile $(OBJECTS)
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-sources; \
fi
@for d in $(SUBDIRS); do \
@@ -84,7 +84,7 @@ clean:
@for d in $(SUBDIRS); do \
(cd $${d} && $(MAKE) $@); \
done
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
@rm -f $(CLEANFILES) $(OBJECTS)
View
4 doc/html/search/Makefile.in
@@ -44,7 +44,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(SHELL) ./config.status
R: Makefile $(OBJECTS) @MAINTAINER_MODE_TRUE@ $(OBJECTS_JAVA)
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-sources; \
fi
@@ -82,7 +82,7 @@ uninstall:
mostlyclean:
clean:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f $(INSTFILES); \
fi
@rm -f $(OBJECTS)
View
8 doc/manual/Makefile.in
@@ -58,7 +58,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(SHELL) ./config.status
R: Makefile
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-tex; \
fi
@@ -137,7 +137,7 @@ version.texi: Makefile $(top_srcdir)/VERSION $(top_srcdir)/date-stamp
echo "@set VERSION $${v}" > $@)
R-intro.dvi: stamp-images-eps $(texiincludes)
stamp-images-eps:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-images-eps; \
fi
@touch $@
@@ -191,7 +191,7 @@ R-data.pdf: $(texiincludes)
R-exts.pdf: $(texiincludes)
R-intro.pdf: stamp-images-pdf $(texiincludes)
stamp-images-pdf:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-images-pdf; \
fi
@touch $@
@@ -272,7 +272,7 @@ uninstall-pdf:
mostlyclean: clean
clean:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -rf Rd.sty images; \
fi
@-rm -f *.aux *.cp *.cps *.dvi *.fn *.fns *.html *.info* \
View
4 etc/Makefile.in
@@ -48,7 +48,7 @@ R: $(OBJECTS)
$(OBJECTS): $(top_builddir)/config.status
install: installdirs install-gnome
- @echo "installing etc ..."
+ @echo "installing $(subdir) ..."
@for f in $(OBJECTS) $(EXPORTFILE); do \
$(INSTALL_DATA) $${f} $(rhome)/etc; \
done
@@ -75,7 +75,7 @@ uninstall:
mostlyclean: clean
clean:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -f *.pl $(GNOME_IF_FILES); \
fi
@rm -f $(EXPORTFILE)
View
4 share/Makefile.in
@@ -27,7 +27,7 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
$(SHELL) ./config.status
R:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
$(MAKE) rhome=$(top_builddir) install-sources; \
fi
@@ -60,7 +60,7 @@ uninstall:
mostlyclean:
clean:
- @if test "`cd $(srcdir) && $(GETWD)`" != "`$(GETWD)`" ; then \
+ @if test "$(BUILDDIR_IS_SRCDIR)" = no ; then \
rm -rf $(SUBDIRS); \
fi
distclean:
Please sign in to comment.
Something went wrong with that request. Please try again.