Hello All,
I am relatively new to the autoconf, automake, libtool tools, and am
converting a project over to using them. I have a question relating to
creating a proper Makefile.am to run a 'make dist' from, and although I
have read through the online manuals numerous times, I can't quite
figure this one out. I hope someone is able to lend a hand.
Here is a brief descriptor: for reasons beyond my control, the project
(a C++ cross platform library) is structured like so (i've just used
generic names to get the point across):
- include
- src
- subdir1
- subdir2
- extra
- build
- src
The configure.ac, Makefile.am, etc. files are located in the src
subdirectory of the build directory at the bottom (nothing platform
specific is therefore in the top level directory). Here is the
framework of the Makefile.am:
# source directories
SSRC = ../../src
ISRC = ../../include
ESRC = ../../extra
CFLAGS = -Wall -Wno-deprecated -I$(ISRC) -I$(SSRC) -I$(SSRC)/subdir1
-I$(SSRC)/subdir2 -I$(ESRC) -g -O3
lib_LTLIBRARIES = libtest.la
libtest_la_SOURCES = \
$(SSRC)/filename1.cpp \
$(SSRC)/subdir1/filename2.cpp \
$(SSRC)/subdir2/filename3.cpp \
$(ESRC)/filename4.cpp
libtest_la_LDFLAGS = -version-info 0:0:0
libtest_la_CPPFLAGS = $(CFLAGS)
This works fine in compiling and producing the library (comments on
improvements are always welcome, though!) However, the problem lies
when trying to make dist. It copies all of the include, src and extra
directories into the build directory and only makes a tar.gz of the
files that were originally in the build...src directory (i.e. configure,
configure.ac, etc.). None of the source files make it into the
archive. Why is this happening? Additionally, it seems I would also
need to put the header files into the distribution, so I added:
EXTRA_DIST = \
$(ISRC)/header1.h \
$(SSRC)/header2.h
etc...
Again, all that happens is that these files get copied to the
build...src directory during a make dist, they do not end up in the
archive.
Can anyone help? I suspect there is something important that I am
missing, or that it has to do with the unorthodox directory structure,
but it is currently beyond me to solve. Many thanks.
Best regards,
Scott
signature.asc
Description: This is a digitally signed message part