automake
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Automake 1.7.2 & using implicit rules


From: Sander Niemeijer
Subject: Re: Automake 1.7.2 & using implicit rules
Date: Thu, 17 Apr 2003 11:03:30 +0200

Hi,

I have some problems understanding what will be created from a source.src file by filemaker (I myself am not familiar with this application). You can use suffix rules but these only work when the filename bit without the suffix part is the same for both the source and target files. This means that if you have something like:
---
SUFFIXES = .src
.c.src:
        filemaker $<
bin_PROGRAMS = foo
foo_SOURCES = foo.src
---
automake will expect filemaker to create a foo.c.
So my question back to you is: what exactly is created from a foo.src file (all three .cpp, .c, and .lxx files or only one of them) and what will be the exact file names for the generated files (foo.cpp, foo.c, and foo.lxx or different)?


Regards,
Sander

On donderdag, apr 17, 2003, at 08:42 Europe/Amsterdam, Juraj Hercek wrote:

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






reply via email to

[Prev in Thread] Current Thread [Next in Thread]