Makefile.ams cleanup.

Set defines via CPPFLAGS variable not via CFLAGS one.
Use AM_CPPFLAGS and AM_CFLAGS variables instead of per-target ones.

Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
Andrew Borodin 2012-07-10 10:53:56 +04:00
parent 94bd4b1f78
commit b37af47023
27 changed files with 66 additions and 56 deletions

View File

@ -5,7 +5,7 @@ if ENABLE_MCLIB
tr '.' ' '| \
while read v1 v2 v3; do echo $$v2':'$$v3':'$$v1; done`
libmc_la_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE)
AM_LDFLAGS=-no-undefined -version-info $(LIB_VERSION) -release $(LIBMC_RELEASE)
lib_LTLIBRARIES = libmc.la
else
@ -50,7 +50,7 @@ if CHARSET
libmc_la_SOURCES += charsets.c charsets.h
endif
libmc_la_CFLAGS= $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
AM_CFLAGS= $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
libmc_la_LIBADD = \
event/libmcevent.la \
@ -72,4 +72,3 @@ else
endif
libmc_la_LIBADD += $(PCRE_LIBS) $(LIBICONV) $(INTLLIBS)

View File

@ -7,6 +7,8 @@ libmcevent_la_SOURCES = \
manage.c \
raise.c
libmcevent_la_CFLAGS=-I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)

View File

@ -6,6 +6,8 @@ libmcfilehighlight_la_SOURCES = \
ini-file-read.c \
internal.h
libmcfilehighlight_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)

View File

@ -7,6 +7,7 @@ libmcconfig_la_SOURCES = \
set.c \
paths.c
libmcconfig_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) \
AM_CPPFLAGS = \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS)

View File

@ -9,6 +9,8 @@ libsearch_la_SOURCES = \
glob.c \
hex.c
libsearch_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\" $(PCRE_CFLAGS)
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)

View File

@ -9,6 +9,8 @@ libmcskin_la_SOURCES = \
lines.c \
internal.h
libmcskin_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)

View File

@ -8,6 +8,4 @@ libmcstrutil_la_SOURCES = \
strutilutf8.c \
strverscmp.c
libmcstrutil_la_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS)
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS)

View File

@ -22,13 +22,15 @@ TTY_SRC = \
libmctty_la_SOURCES = $(TTY_SRC) $(TTY_SCREEN_SRC)
libmctty_la_CFLAGS = -I$(top_srcdir)
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir)
if HAVE_GMODULE
libmctty_la_CFLAGS += $(GMODULE_CFLAGS)
AM_CFLAGS += $(GMODULE_CFLAGS)
else
libmctty_la_CFLAGS += $(GLIB_CFLAGS)
AM_CFLAGS += $(GLIB_CFLAGS)
endif
libmctty_la_CFLAGS += -DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"

View File

@ -22,6 +22,8 @@ libmcwidget_la_SOURCES = \
widget-common.c widget-common.h \
wtools.c wtools.h
libmcwidget_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)

View File

@ -19,7 +19,7 @@ SUBDIRS += consaver
AM_CPPFLAGS += -DSAVERDIR=\""$(pkglibexecdir)"\"
endif
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)
localedir = $(datadir)/locale
pkglibexecdir = $(libexecdir)/@PACKAGE@

View File

@ -4,4 +4,4 @@ pkglibexec_PROGRAMS = cons.saver
cons_saver_SOURCES = cons.saver.c
cons_saver_CFLAGS= -I$(top_srcdir)
AM_CFLAGS= -I$(top_srcdir)

View File

@ -5,9 +5,10 @@ libdiffviewer_la_SOURCES = \
search.c \
ydiff.c ydiff.h
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
libdiffviewer_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)
libdiffviewer_la_LIBADD = ../../lib/libmc.la

View File

@ -21,4 +21,4 @@ libedit_la_SOURCES += \
endif
endif
libedit_la_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) $(PCRE_CFLAGS)

View File

@ -31,8 +31,10 @@ libmcfilemanager_la_SOURCES = \
libmcfilemanager_la_SOURCES += mountlist.c mountlist.h
#endif
libmcfilemanager_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)
libmcfilemanager_la_LIBADD = ../../lib/libmc.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-cpio.la

View File

@ -1,8 +1,8 @@
SUBDIRS = helpers
DIST_SUBDIRS = helpers
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS = -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\"
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
noinst_LTLIBRARIES = libvfs-extfs.la

View File

@ -1,8 +1,8 @@
SUBDIRS = helpers
DIST_SUBDIRS = helpers
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS = -DLIBEXECDIR=\""$(libexecdir)/@PACKAGE@/"\"
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
noinst_LTLIBRARIES = libvfs-fish.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-ftpfs.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-local.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-sfs.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) $(LIBSSH_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-sftpfs.la

View File

@ -2,8 +2,8 @@ DIST_SUBDIRS =
SUBDIRS = helpers
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) -DCONFIGDIR=\""@smbconfigdir@"\"
AM_CPPFLAGS =
AM_CPPFLAGS = -DCONFIGDIR=\""@smbconfigdir@"\"
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
noinst_LTLIBRARIES = libvfs-smbfs.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-tar.la

View File

@ -1,5 +1,4 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir)
AM_CPPFLAGS =
noinst_LTLIBRARIES = libvfs-undelfs.la

View File

@ -19,8 +19,10 @@ libmcviewer_la_SOURCES = \
plain.c \
search.c
libmcviewer_la_CFLAGS = -I$(top_srcdir) \
$(GLIB_CFLAGS) $(PCRE_CFLAGS) \
-DDATADIR=\""$(pkgdatadir)/"\" -DLOCALEDIR=\""$(localedir)"\"
AM_CPPFLAGS = \
-DDATADIR=\""$(pkgdatadir)/"\" \
-DLOCALEDIR=\""$(localedir)"\"
libmcviewer_la_LIBADD = ../../lib/libmc.la
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) $(PCRE_CFLAGS)
libmcviewer_la_LIBADD = ../../lib/libmc.la

View File

@ -1,5 +1,6 @@
AM_CFLAGS = $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \
-DWORKDIR=\"$(abs_builddir)\"
AM_CPPFLAGS = -DWORKDIR=\"$(abs_builddir)\"
AM_CFLAGS = -I$(top_srcdir) $(GLIB_CFLAGS) @CHECK_CFLAGS@
AM_LDFLAGS = -Wl,-z,muldefs

View File

@ -1,5 +1,6 @@
AM_CFLAGS = -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) -I$(top_srcdir) @CHECK_CFLAGS@ \
-DTEST_SHARE_DIR=\"$(abs_srcdir)\"
AM_CPPFLAGS = -DTEST_SHARE_DIR=\"$(abs_srcdir)\"
AM_CFLAGS = -I$(top_srcdir) -I$(top_srcdir)/lib/vfs $(GLIB_CFLAGS) @CHECK_CFLAGS@
AM_LDFLAGS = -Wl,-z,muldefs