Aqbanking cannot be build from git with out-of-source build directory
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: Entering directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types' make: *** No rule to make target 'transaction.c', needed by 'transaction.lo'. Stop. make: Leaving directory '/home/cs/org/hbci/aqbanking-clone3/build/src/libs/aqbanking/types' Makefile:664: recipe for target 'all-recursive' failed make: *** [all-recursive] Error 1 make: 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: Entering directory '/home/cs/org/hbci/aqbanking-clone2/build/src/libs/aqbanking/backendsupport' make: *** 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...
#1 Updated by martin almost 2 years ago
- Status changed from New to Feedback
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.
#2 Updated by cstimming almost 2 years 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 almost 2 years 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?