summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2014-08-12 18:12:45 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-08-12 18:13:54 +0200
commit572c60764bbbd2080bfd7a926c646ad20b467aea (patch)
treede55967a1efc008172894c2e79b7fd94b13f8096 /utils
parent4a4fe80d85a31b10822c7cd8eb5a0698bf306a52 (diff)
Makefile.am cleanups
Bug #79411
Diffstat (limited to 'utils')
-rw-r--r--utils/Makefile.am97
1 files changed, 48 insertions, 49 deletions
diff --git a/utils/Makefile.am b/utils/Makefile.am
index 1dd9a128..be6aa6d5 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -1,53 +1,16 @@
-if BUILD_SPLASH_OUTPUT
-
-pdftoppm_SOURCES = \
- pdftoppm.cc \
- $(common)
-
-pdftoppm_binary = pdftoppm
-
-pdftoppm_manpage = pdftoppm.1
-
-endif
+AM_LDFLAGS = @auto_import_flags@
-INCLUDES = \
+AM_CPPFLAGS = \
-I$(top_srcdir) \
-I$(top_srcdir)/goo \
-I$(top_srcdir)/utils \
-I$(top_srcdir)/poppler \
- $(UTILS_CFLAGS) \
- $(PDFTOCAIRO_CFLAGS)
+ $(UTILS_CFLAGS)
LDADD = \
$(top_builddir)/poppler/libpoppler.la \
$(UTILS_LIBS)
-if BUILD_CAIRO_OUTPUT
-
-pdftocairo_SOURCES = \
- pdftocairo.cc \
- $(common)
-
-if USE_CMS
-PDFTOCAIRO_CFLAGS += $(LCMS_CFLAGS)
-PDFTOCAIRO_LIBS += $(LCMS_LIBS)
-endif
-
-pdftocairo_LDADD = \
- $(top_builddir)/poppler/libpoppler-cairo.la \
- $(LDADD) \
- $(PDFTOCAIRO_LIBS) \
- $(PTHREAD_LIBS)
-
-
-pdftocairo_binary = pdftocairo
-
-pdftocairo_manpage = pdftocairo.1
-
-endif
-
-AM_LDFLAGS = @auto_import_flags@
-
bin_PROGRAMS = \
pdfdetach \
pdffonts \
@@ -57,9 +20,15 @@ bin_PROGRAMS = \
pdftotext \
pdftohtml \
pdfseparate \
- pdfunite \
- $(pdftoppm_binary) \
- $(pdftocairo_binary)
+ pdfunite
+
+if BUILD_SPLASH_OUTPUT
+bin_PROGRAMS += pdftoppm
+endif
+
+if BUILD_CAIRO_OUTPUT
+bin_PROGRAMS += pdftocairo
+endif
dist_man1_MANS = \
pdfdetach.1 \
@@ -70,13 +39,19 @@ dist_man1_MANS = \
pdftotext.1 \
pdftohtml.1 \
pdfseparate.1 \
- pdfunite.1 \
- $(pdftoppm_manpage) \
- $(pdftocairo_manpage)
+ pdfunite.1
+
+if BUILD_SPLASH_OUTPUT
+dist_man1_MANS += pdftoppm.1
+endif
+
+if BUILD_CAIRO_OUTPUT
+dist_man1_MANS += pdftocairo.1
+endif
common = parseargs.cc parseargs.h
-pdfdetach_SOURCES = \
+pdfdetach_SOURCES = \
pdfdetach.cc \
$(common)
@@ -122,9 +97,8 @@ pdftohtml_SOURCES = \
$(common)
# HtmlOutputDev uses goo/PNGWriter.h that may depend on libpng header
-pdftohtml_CXXFLAGS = $(AM_CXXFLAGS)
if BUILD_LIBPNG
-pdftohtml_CXXFLAGS += $(LIBPNG_CFLAGS)
+pdftohtml_CXXFLAGS = $(AM_CXXFLAGS) $(LIBPNG_CFLAGS)
endif
pdfseparate_SOURCES = \
@@ -135,6 +109,31 @@ pdfunite_SOURCES = \
pdfunite.cc \
$(common)
+pdftoppm_SOURCES = \
+ pdftoppm.cc \
+ $(common)
+
+pdftocairo_SOURCES = \
+ pdftocairo.cc \
+ $(common)
+
+if BUILD_CAIRO_OUTPUT
+if USE_CMS
+PDFTOCAIRO_CFLAGS += $(LCMS_CFLAGS)
+PDFTOCAIRO_LIBS += $(LCMS_LIBS)
+endif
+endif
+
+pdftocairo_LDADD = \
+ $(top_builddir)/poppler/libpoppler-cairo.la \
+ $(LDADD) \
+ $(PDFTOCAIRO_LIBS) \
+ $(PTHREAD_LIBS)
+
+pdftocairo_CPPFLAGS = \
+ $(AM_CPPFLAGS) \
+ $(PDFTOCAIRO_CFLAGS)
+
# Yay, automake! It should be able to figure out that it has to dist
# pdftoppm.1, but nooo. So we just add it here.