autotools automake generated makefile does no work: make all-am

516 views Asked by At

It took several painful days work to construct a autotools project. I got a configure file and it can generate a Makefile with several hundred lines of code. But when invoking make it only emits the following lines in 1 milliseconds.

make
make  all-am
make[1]: Entering directory '/home/myacount/coding/orpara'
make[1]: Leaving directory '/home/myaccount/coding/orpara'

It seems that no work is done. The line that produced the output in the Makefile:

AUTOMAKE_OPTIONS = subdir-objects
all: config.h
   $(MAKE) $(AM_MAKEFLAGS) all-am

My configure.ac file is not complicated:

 ....
AM_INIT_AUTOMAKE([-Wall -Werror])
AM_PROG_AR
AC_CONFIG_SRCDIR([src/interval.cpp])
AC_CONFIG_HEADERS([config.h])
LT_PREREQ([2.4])
LT_INIT([dlopen])
AC_CONFIG_MACRO_DIR([m4])

# Checks for programs.
AC_PROG_CXX
AC_PROG_CC
AC_PROG_INSTALL
AC_LANG([C], [C++])
# Checks for libraries.

I have no clue where to start my debug. I am using automake to generate the makefile.

My Makefile.am in the top level directory is simple:

ACLOCAL_AMFLAGS = -I m4
SUBIDRS = src

The Makefile.am in the src directory has two targets (the PROGRAM primary is for testing only)

bin_PROGRAMS = GrishinDistance
GrishinDistance_SOURCES=GrishinDistance.cpp

Not showing the Makefile.am in subdir seqaln.

1

There are 1 answers

0
Kemin Zhou On

My problem is with the Makfile.am in the top directory:

SUBIDRS = src

A typo error with SUBDIRS => SUBIDRS. If others have similar problem, you should be looking into these typo errors.