Changeset ee668e in git for factory/Makefile.am


Ignore:
Timestamp:
Nov 17, 2011, 5:23:11 PM (12 years ago)
Author:
Jan Engelhardt <jengelh@…>
Branches:
(u'spielwiese', '5b153614cbc72bfa198d75b1e9e33dab2645d9fe')
Children:
b7d64b3fc45a85f34ae6f34e9c227eed2796c70f
Parents:
f0168a594d5a00a74dd169a3d0189411e29989f4
git-author:
Jan Engelhardt <jengelh@medozas.de>2011-11-17 17:23:11+01:00
git-committer:
Oleksandr Motsak <motsak@mathematik.uni-kl.de>2012-01-06 21:09:33+01:00
Message:
factory/build: restore out-of-tree build support

When attempting an OOT build, it fails to find <factory/cplusplus.h>,
because cplusplus.h is always (even in in-tree builds) produced in
"${builddir}", and not "${top_srcdir}/../factory".

Furthermore, one must not rely on the basename of ${top_srcdir}, and
going above ${top_srcdir} is undefined and may lead to spurious build
failures. (Consider a hypothetical chroot on ${top_srcdir}).

Therefore, create a directory include/factory and use -Iinclude such
that <factory/*> yields a buildable state, move all exported header
files there.

Previous OOT build log:

17:22 seven:../factory/obj > make
  CXX    cplusplus.o
  CXXLD  cplusplus
./cplusplus > ./cplusplus.h
../bin/makeheader ../factory.template factory.h
../bin/makeheader ../factoryconf.template factoryconf.h
  YACC   readcf.cc
make  all-am
make[1]: Entering directory `/home/jengelh/obs/zu/home/jengelh/science/singsource/factory/obj'
  CXX    libfactory_a-algext.o
  CXX    libfactory_a-canonicalform.o
In file included from ../cf_factory.h:12:0,
                 from ../canonicalform.cc:7:
../../factory/cf_gmp.h:14:33: fatal error: factory/cplusplus.h: Ingen slik fil eller filkatalog
compilation terminated.
make[1]: *** [libfactory_a-canonicalform.o] Error 1
make[1]: Leaving directory `/home/jengelh/obs/zu/home/jengelh/science/singsource/factory/obj'
make: *** [all] Error 2
File:
1 edited

Legend:

Unmodified
Added
Removed
  • factory/Makefile.am

    rf0168a5 ree668e  
    11ACLOCAL_AMFLAGS = -I ../m4
    22
     3SUBDIRS = include/factory
     4
    35CXXTEMPLFLAGS      =  --no-exceptions ## -fno-implicit-templates
    46
    5 AM_CPPFLAGS = -I${top_srcdir} -I${top_srcdir}/.. -I${top_builddir} -I${top_builddir}/.. -I${srcdir} ${GMP_CFLAGS} ${NTL_CFLAGS}
     7AM_CPPFLAGS = -Iinclude -I${srcdir}/include ${GMP_CFLAGS} ${NTL_CFLAGS}
    68
    79lib_LTLIBRARIES = libfactory.la libfactory_g.la
     
    108110nodist_libfactory_g_la_SOURCES = cplusplus.h factory.h factoryconf.h
    109111
    110 
    111112# factory header files
    112113factory_headers = \
     
    182183noinst_HEADERS = $(factory_headers)
    183184
    184 libfactory_includedir=$(includedir)/factory
    185 
    186 nobase_libfactory_include_HEADERS = \
    187     cf_gmp.h $(templateincl)
     185libfactory_includedir = ${includedir}/factory
    188186
    189187nodist_libfactory_include_HEADERS = cplusplus.h factory.h factoryconf.h
     
    253251                templates/ftmpl_matrix.cc
    254252
    255 templateincl =  templates/ftmpl_array.h \
    256                 templates/ftmpl_factor.h \
    257                 templates/ftmpl_list.h \
    258                 templates/ftmpl_matrix.h
    259 
    260253# header templates
    261254hdrtemplsrc =   factoryconf.template \
     
    316309
    317310cplusplus.h: cplusplus
    318         ${abs_builddir}/cplusplus > ${abs_builddir}/cplusplus.h
     311        ./cplusplus >$@
     312        cp $@ include/factory/
    319313
    320314.template.h:
    321315        ${srcdir}/bin/makeheader $< $@
     316        cp $@ include/factory/
    322317
    323318# factory/gfops.cc has the gftables path hardcoded in, so we create a
Note: See TracChangeset for help on using the changeset viewer.