problem is, stdafx.* and targetver.* etc. should not go into this library,
since they are to be used by VC project only.
I guess they have to go to EXTRA_DIST.
and, if I put tiny*.cpp to ..._SOURCES, the content in them will be exposed
in the library, right, which is not what i wanted? I only want them to be
linked, but not exported. Under windows VC, I can specify which items to be
exported, but using AutoMake, I donno how.
did not expect to receive a response so quick. thank you very much.
-------Original Message-------
From: Ralf Wildenhues
Date: 2008-6-11 13:46:38
To: bonami
Cc: Automake@gnu.org
Subject: Re: Extra_dist cannot hold two long lists?
* bonami wrote on Wed, Jun 11, 2008 at 07:32:47AM CEST:
>
> A line in Makefile.am,
> EXTRA_DIST = tinystr.cpp tinyxml.cpp tinyxmlerror.cpp tinyxmlparser.cpp
> dllmain.cpp ezcomm.aps ezcommon.rc ezcommon.vcproj icon.ico resource.h
> stdafx.cpp stdafx.h #targetver.h test.xml tinyxml.txt
>
> If I uncomment the latter part of the line, none of these files will be
> added to .tar.gz. Even as such, stdafx.h is not distributed. Is there a
line
> length limit? How can I distribute all these files?
Don't add source files to EXTRA_DIST.
Do it like this:
# if you want them in libdir, no need to use pkglib:
lib_LTLIBRARIES = libezcommon.la
include_HEADERS= ezcommon.h tinystr.h tinyxml.h
libezcommon_la_SOURCES = ezcommon.cpp tinystr.cpp tinyxml.cpp \
tinyxmlerror.cpp tinyxmlparser.cpp dllmain.cpp resource.h \
stdafx.cpp stdafx.h targetver.h
EXTRA_DIST = ezcommon.aps ezcommon.rc ezcommon.vcproj icon.ico \
test.xml tinyxml.txt
There is no line length limit for automake, but typically, non-GNU make
implementations have such a limit (their input being required to be a
text file). 2K characters are safe. You need to wrap lines with
backslash newline, not just newline, and neither with any spaces after
the backslash.
Do not put comments ('#' signs) in macro settings.
If you need to conditionally add files, use an automake conditional to
add them:
if SOME_COND
libezcommon_la_SOURCES += ...
endif
(with AM_CONDITIONAL([SOME_COND], ...) in configure.ac).
HTH. Cheers,
Ralf