Autoconf/Automake generates an empty make file -
i'm trying create simple build script using autoconf/automake tool chain (mostly learning exercise.)
most examples seem indicate need separate makefile.am in every source directory, , makefile.am file in project root should include subdirs directive tells autoconf additional makefiles.
i thought might possible, simple project, have single makefile.am in project root directory. however, when seek this, , run generated configure script - creates single makefile in project root empty (0 bytes.)
i'm not sure i'm doing wrong here.
so, directory construction extremely simple:
myproject ---src ------myproject.cpp ---makefile.am ---configure.ac the configure.ac file minimal:
ac_init(myproject, 1.0) ac_msg_notice([my project]) ac_prog_cxx ac_lang(c++) ac_check_headers(iostream) ac_config_srcdir(src/myproject.cpp) am_init_automake(myproject, 1.0) ac_output(makefile) and makefile.am simple:
bin_programs = myproject myproject_sources = src/myproject.cpp myproject_cppflags = --std=c++11 i run:
autoconf configure.ac > configure when run configure script, there no errors.
then see generated makefile in project root directory:
# ls -lh | grep create -rw-r--r-- 1 root root 0 nov 8 16:13 makefile -rw-r--r-- 1 root root 98 nov 8 15:53 makefile.am -rw-r--r-- 1 root root 0 nov 8 15:00 makefile.in and can see, makefile generated empty.
so i'm misunderstanding fundamental how autoconf/automake supposed work. doing incorrectly here?
i had same problem - automake generate empty makefiles. don't know why happened, fixed deleting files generated autoconf, e.g. makefile.in (the zero-byte makefile.in bad).
you can seek autoreconf -if
make autoconf
No comments:
Post a Comment