Hi,
I've found a problem I'm unable to solve on my own. I've read about
handling new file extensions here:
http://www.gnu.org/manual/automake-1.7.2/html_chapter/
automake_18.html#SEC103
. I've created simple example to test this feature but it didn't work,
because am_amktest_OBJECTS in generated Makefile.in is empty. Can you
help?
Also is there a way how to handle this case without specifying all the
.c .cpp .lxx files?:
1) filemaker creates basicaly 3 files (generated1.cpp, generated2.c
generated3.lxx) from one source file (source.src). I.e., I specify
this cmd line in order to get .c .cpp and .lxx files: "filemaker
source.src"
2) my first question is whether there is a way how to specify only
source.src in Makefile.am and all generated files (.c .cpp .lxx) will
be compiled and linked into program/library?
3) my second question is how to specify source files, because this
doesn't work (generated am_amktest_OBJECTS in Makefile.in is empty):
MY_SOURCES = source1.src source2.src source3.src
MY_CPP_FILES = $(MY_SOURCES:%.src=%.cpp)
MY_C_FILES = $(MY_SOURCES:%.src=%.c)
MY_LEX_FILES = $(MY_SOURCES:%.src=%.lxx)
libamktest_la_SOURCES = $(MY_CPP_FILES) $(MY_C_FILES) $(MY_LEX_FILES)
I've attached files used in my tests regarding handling new file
extensions.
Thanks for reply.
Best Regards,
Juraj Hercek
AUTOMAKE_OPTIONS = foreign
%.cpp: %.g
@echo "Ok, it works"
touch $@
bin_PROGRAMS = amktest
amktest_SOURCES = myfile.g
# -*- Autoconf -*-
# Process this file with autoconf to produce a configure script.
AC_PREREQ(2.57)
AC_INIT(FULL-PACKAGE-NAME, VERSION, BUG-REPORT-ADDRESS)
AM_INIT_AUTOMAKE
AC_CONFIG_SRCDIR([main.cpp])
AC_CONFIG_HEADER([config.h])
# Checks for programs.
AC_PROG_CXX
# Checks for libraries.
# Checks for header files.
# Checks for typedefs, structures, and compiler characteristics.
# Checks for library functions.
AC_CONFIG_FILES(Makefile)
AC_OUTPUT