Project

General

Profile

Bug #155

Aqbanking cannot be build from git with out-of-source build directory

Added by cstimming 21 days ago. Updated 21 days ago.

Status:
Feedback
Priority:
Normal
Category:
AqBanking
Start date:
10/31/2019
Due date:
Betriebssystem:
andere
AqBanking-Version:
5.99.43
Anwendung:
andere
Version der Anwendung:

Description

To reproduce:

git clone aqbanking # ... start with a new empty clone
cd aqbanking
ACLOCAL_FLAGS="-I $GWEN_PREFIX/share/aclocal" make -f Makefile.cvs
mkdir build && cd build
../configure PKG_CONFIG_PATH=$GWEN_PREFIX/lib/pkgconfig
make

Expected result: Compiling processes as usual.
Observed result instead:
make[5]: Entering directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types'
make[5]: *** No rule to make target 'transaction.c', needed by 'transaction.lo'.  Stop.
make[5]: Leaving directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types'
Makefile:664: recipe for target 'all-recursive' failed
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking'

One could get a little bit further by prepending the list of XML files in the "typefiles" definition in Makefile.am by $(srcdir)/ each, see attached diff for the first two Makefile.am. However, this looks ugly anyway, and it also doesn't work for all cases, as the next error cannot be fixed by this addition:
make[5]: Entering directory '/home/cs/org/hbci/aqbanking-clone2/build/src/libs/aqbanking/backendsupport'
make[5]: *** No rule to make target 'jobqueue.c', needed by 'jobqueue.lo'.  Stop.

@Martin: Maybe typemaker2 needs more settings about this situation with the XML files in the srcdir, but the C files in the builddir? As a first step, I think it's ok to put the generated C files in the srcdir, too, but nevertheless the out-of-srcdir build should start to work...

initial-out-of-srcdir-build.diff Magnifier (1.59 KB) cstimming, 10/31/2019 12:41 PM

History

#1 Updated by martin 21 days ago

  • Status changed from New to Feedback

Hi,

the typemaker2-generated files are distributed with AqBanking, so being able to generate them out-of-source doesn't seem to be necessary.
To (re)generate the typemaker2 files the following steps are required:

make typedefs
make typefiles

The "typedefs" target generates ony the *.tm2 files which resolve possible curcular dependencies between typemaker2-generated files.

The "typefiles" target actually generates the source files.

After those steps the rest should be buildable out-of-source.

Regards
Martin

#2 Updated by cstimming 21 days ago

  • Subject changed from Aqbanking cannot be build in out-of-source build directory to Aqbanking cannot be build from git with out-of-source build directory

Ok, you're right, my question asks for building from git in out-of-srcdir form. The distributed tarball would work, indeed.

My use case is that I have multiple build dirs based on one srcdir, especially a windows build and a linux build. It is very convenient to run both compiles from one single srcdir. Enabling out-of-srcdir build would be one simple solution to achieve this.

However, having to run "make typedefs; make typefiles" requires an in-srcdir setup of configure, because otherwise I cannot run make there.

#3 Updated by martin 21 days ago

Currently, I don't see how this could be done.

Even if you make typemaker2 read its source files from SRCDIR (by adjusting Makefile.am to insert $(SRCDIR) before typefiles) and write to BUILDDIR (BTW: typemaker2 accepts a parameter "--destfolder=PARAM") the destination files would be written to BUILDDIR.

But how would you get gcc/make to compile those files generated in BUILDDIR? Wouldn't gcc/make look in $(SRCDIR) for source files?

Also available in: Atom PDF