use cp and mkdir -p instead of install within source tree
authorAntoine Jacoutot <ajacoutot openbsd org>
Wed, 25 Apr 2012 18:04:07 +0000 (19:04 +0100)
committerSimon McVittie <simon.mcvittie@collabora.co.uk>
Wed, 25 Apr 2012 18:12:03 +0000 (19:12 +0100)
$(INSTALL) and $(INSTALL_DATA) try to change ownerships to root:bin when
copying tests to builddir. Presumably this is a difference in behaviour
between GNU and BSD install(1): the one in GNU coreutils doesn't try-and-fail
to change ownership if you're not root.

[Commit message added by smcv]

Bug: https://bugs.freedesktop.org/show_bug.cgi?id=48127
Reviewed-by: Simon McVittie <simon.mcvittie@collabora.co.uk>
test/Makefile.am

index 55610c1..207a525 100644 (file)
@@ -296,14 +296,14 @@ EXTRA_DIST += $(static_data)
 ## copy tests to builddir so that generated tests and static tests
 ## are all in one place.
 all-local:
-       $(AM_V_at)$(INSTALL) -d data/valid-config-files/session.d
+       $(AM_V_at)$(MKDIR_P) data/valid-config-files/session.d
        $(AM_V_at)set -e && \
        if test $(srcdir) = . || test $(srcdir) -ef .; then \
                echo '-- No need to copy test data as srcdir = builddir'; \
        else \
                for F in $(static_data); do \
-                       $(INSTALL) -d $${F%/*}; \
-                       $(INSTALL_DATA) $(srcdir)/$$F $$F; \
+                       $(MKDIR_P) $${F%/*}; \
+                       cp $(srcdir)/$$F $$F; \
                done; \
        fi
 
@@ -324,9 +324,9 @@ noinst_DATA = $(imported_data)
 CLEANFILES = $(noinst_DATA)
 
 data/valid-config-files/session.conf: $(top_builddir)/bus/session.conf
-       $(AM_V_at)$(INSTALL) -d data/valid-config-files
-       $(AM_V_GEN)$(INSTALL_DATA) $< $@
+       $(AM_V_at)$(MKDIR_P) data/valid-config-files
+       $(AM_V_GEN)cp $< $@
 
 data/valid-config-files/system.conf: $(top_builddir)/bus/system.conf
-       $(AM_V_at)$(INSTALL) -d data/valid-config-files
-       $(AM_V_GEN)$(INSTALL_DATA) $< $@
+       $(AM_V_at)$(MKDIR_P) data/valid-config-files
+       $(AM_V_GEN)cp $< $@