automake
[Top][All Lists]
Advanced

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

Cannot add a new file extension


From: Dmitry Mikhin
Subject: Cannot add a new file extension
Date: Thu, 25 Oct 2001 12:16:51 +0930

Assume that we have a language called K. The source files *.k are
compiled
using a compiler called 'kc'. This project has a single source file
'file.k' and
I want to use autotools for generating Makefiles. Automake fails to
produce
'Makefile.in' complaining:

Can't call method "target_hook" on an undefined value at
/usr/local/bin/automake line 1943.

Software setup:
automake 1.5
autoconf 2.52
perl 5.6.0
RedHat Linux (2.4.2-2 kernel)

In my case the language was Fortran-90, but the error is generated for
any unknown file extension, even if compilation rules for that language
are provided in 'Makefile.am'.

Any suggestions?

Dmitry

The setup follows:

******** configure.in ********************


dnl Process this file with autoconf to produce a configure script.

AC_INIT(acconfig.h)

AC_CANONICAL_HOST

AM_INIT_AUTOMAKE(prj, 1.0.0)

AM_CONFIG_HEADER(config.h)

AM_MAINTAINER_MODE

AC_PROG_CC
AC_PROG_CPP
AC_PROG_LN_S
AC_PROG_INSTALL
AC_PROG_RANLIB

AC_SUBST(INCLUDES)

AC_OUTPUT([Makefile])

AC_MSG_RESULT()
AC_MSG_RESULT([To compile the package run 'make', then 'make install'.])

AC_MSG_RESULT([To perform checks before the installation, run 'make
check'.])
AC_MSG_RESULT()

******** Makefile.am **************
# new suffix
SUFFIXES = .k

# compiler and flags
KC=kc
KFLAGS=

# compilation of *.k
.k.o:
 $(KC) -c $(KFLAGS) $<

# our goal
lib_LIBRARIES = \
 address@hidden@.a

# the library sources
address@hidden@_a_SOURCES = \
 file.k

all-local:
 @echo "*** Everything completed ***"





reply via email to

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