From e227262cc9437af8128540c8d516cf4c53dda381 Mon Sep 17 00:00:00 2001 From: Hib Eris Date: Fri, 30 May 2014 12:32:10 +0200 Subject: [PATCH] Cleanup utils/Makefile.am https://bugs.freedesktop.org/show_bug.cgi?id=79411 --- utils/Makefile.am | 97 +++++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 49 deletions(-) diff --git a/utils/Makefile.am b/utils/Makefile.am index 1dd9a12..be6aa6d 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. -- 1.8.3.2