! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
can't build xfce4-dev-tools in an alternate location
Status:
RESOLVED: FIXED
Product:
Xfce4-dev-tools
Component:
General

Comments

Description Norm Jacobs 2014-05-21 21:46:51 CEST
Created attachment 5493 
fix xdt-autogen dependency in scripts/Makefile.am

While trying to build xfce4-dev-tools on Solaris and Linux, I found that I was unable to build in a location other than the source directory.  The GNU auto* tools are designed so that software can be unpacked in one location and built in a separate location.

To reproduce this perform the following:

    $ git clone git://git.xfce.org/xfce/xfce4-dev-tools
    $ mkdir -p build/$(uname -s)-$(uname -p)
    $ cd xfce-4-dev-tools
    $ NOCONFIGURE=true ./autogen.sh
    $ cd ../build/$(uname -s)-$(uname -p)
    $ ../../xfce4-dev-tools/configure
    $ make

Making all in m4macros
make[1]: Entering directory `/tmp/test/build/Linux-x86_64/m4macros'
make[1]: Nothing to be done for `all'.
make[1]: Leaving directory `/tmp/test/build/Linux-x86_64/m4macros'
Making all in scripts
make[1]: Entering directory `/tmp/test/build/Linux-x86_64/scripts'
make[1]: *** No rule to make target `../../../xfce4-dev-tools/scripts/xdt-autogen.in', needed by `xdt-autogen'.  Stop.
make[1]: Leaving directory `/tmp/test/build/Linux-x86_64/scripts'
make: *** [all-recursive] Error 1


When it gets to building in the 'scripts' directory, it can't make the $(srcdir)/xdt-autogen.in target because it was generated in the current directory by configure, which is not the source directory.  This appears to have been initially checked in this way.

The fix is to remove $(srcdir) from the name of the dependency in the xdt-autogen target in scripts/Makefile.am.

I have attached a patch.
Comment 1 Ash Charles 2014-05-25 22:46:13 CEST
Shucks---I should have searched for this bug report before trying to make a similar patch!  I've attached my version of the patch here where I kept a reference to $(builddir).  I'm not super familiar with autotools so I don't know if this would be necessary.  Either way, both patches work for me :).

diff --git a/scripts/Makefile.am b/scripts/Makefile.am
index f2f0600..8d7ea97 100644
--- a/scripts/Makefile.am
+++ b/scripts/Makefile.am
@@ -10,7 +10,7 @@ bin_SCRIPTS =                                                         \
        xdt-autogen                                                     \
        xdt-commit

-xdt-autogen: Makefile $(srcdir)/xdt-autogen.in
+xdt-autogen: Makefile $(builddir)/xdt-autogen.in
        rm -f xdt-autogen xdt-autogen.gen
        sed -e 's,\@DATADIR\@,$(datadir),g' \
                xdt-autogen.in \
-- 
1.8.3.2
Comment 2 Jannis Pohlmann editbugs 2014-07-27 17:12:40 CEST
Fixed in master:

commit e01becaeafa9c2373fa08ef9bdbb181e5af05718
Author: Jannis Pohlmann <jannis@xfce.org>
Date:   Sun Jul 27 17:03:42 2014 +0200

    Fix out of source building (bug #10899)
    
    Depending on files generated during build via $(srcdir) breaks builds
    that take place outside the source directory. This commit fixes one such
    mistake in scripts/Makefile.am that refers to $(srcdir)/xdt-autogen.in.

Bug #10899

Reported by:
Norm Jacobs
Reported on: 2014-05-21
Last modified on: 2014-07-27

People

Assignee:
Xfce Bug Triage
CC List:
2 users

Version

Version:
4.10.0

Attachments

Additional information