AM_CPPFLAGS in Makefile.am libmonit/Makefile.am libmonit/test/Makefile.am

Issue #61 wontfix
Lulin Lulin created an issue

The argument of -I here may be better to use $(top_srcdir) instead of `.' , because sometimes, people could execute configure script not in the source directory, such as:

    cd build
    ~/Projects/monit/configure --prefix=xx...
AM_CPPFLAGS = $(CPPFLAGS) $(EXTCPPFLAGS) -D@ARCH@ -DSYSCONFDIR="\"@sysconfdir@\"" -I./src -I./src/device -I./src/http -I./src/process -I./src/protocols -I./libmonit/src

Change to:

AM_CPPFLAGS = $(CPPFLAGS) $(EXTCPPFLAGS) -D@ARCH@ -DSYSCONFDIR="\"@sysconfdir@\"" -I$(top_srcdir)/src -I$(top_srcdir)/src/device -I$(top_srcdir)/src/http -I$(top_srcdir)/src/process -I$(top_srcdir)/src/protocols -I$(top_srcdir)/libmonit/src

Comments (7)

  1. Tildeslash repo owner

    Good suggestion, but unfortunately it does not work. It will require more changes to the include structure and to the Makefile to be able to build Monit outside the distribution directory.

  2. Log in to comment