summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHib Eris <hib@hiberis.nl>2014-09-14 11:20:23 +0200
committerAlbert Astals Cid <aacid@kde.org>2014-09-29 00:27:49 +0200
commit21b5fd655ce45b90668d1416d21c526ab7eb3ad6 (patch)
tree8941473d633ee026ded129ec904a070efd4ec09a /utils
parent70a851b0cc58241d1f2f6bc48af2614595326c8f (diff)
Refactor Makefiles to build a noinst library for parsing args
Prevents this automake warning about possible forward-incompatibility: $ ./autogen.sh ... cpp/tests/Makefile.am:16: warning: source file '$(top_srcdir)/utils/parseargs.cc' is in a subdirectory, cpp/tests/Makefile.am:16: but option 'subdir-objects' is disabled automake: warning: possible forward-incompatibility. automake: At least a source file is in a subdirectory, but the 'subdir-objects' automake: automake option hasn't been enabled. For now, the corresponding output automake: object file(s) will be placed in the top-level directory. However, automake: this behaviour will change in future Automake versions: they will automake: unconditionally cause object files to be placed in the same subdirectory automake: of the corresponding sources. automake: You are advised to start using 'subdir-objects' option throughout your automake: project, to avoid future incompatibilities. cpp/tests/Makefile.am:20: warning: source file '$(top_srcdir)/utils/parseargs.cc' is in a subdirectory, cpp/tests/Makefile.am:20: but option 'subdir-objects' is disabled parallel-tests: installing './test-driver' test/Makefile.am:58: warning: source file '../utils/parseargs.cc' is in a subdirectory, test/Makefile.am:58: but option 'subdir-objects' is disabled $ automake --version automake (GNU automake) 1.14.1 ... https://bugs.freedesktop.org/show_bug.cgi?id=83839
Diffstat (limited to 'utils')
-rw-r--r--utils/.gitignore2
-rw-r--r--utils/Makefile.am42
2 files changed, 20 insertions, 24 deletions
diff --git a/utils/.gitignore b/utils/.gitignore
index 3be3139f..093d3cf5 100644
--- a/utils/.gitignore
+++ b/utils/.gitignore
@@ -1,5 +1,7 @@
.deps
.libs
+*.la
+*.lo
Makefile
Makefile.in
pdfseparate
diff --git a/utils/Makefile.am b/utils/Makefile.am
index be6aa6d5..dede2f6c 100644
--- a/utils/Makefile.am
+++ b/utils/Makefile.am
@@ -8,6 +8,7 @@ AM_CPPFLAGS = \
$(UTILS_CFLAGS)
LDADD = \
+ libparseargs.la \
$(top_builddir)/poppler/libpoppler.la \
$(UTILS_LIBS)
@@ -49,41 +50,33 @@ if BUILD_CAIRO_OUTPUT
dist_man1_MANS += pdftocairo.1
endif
-common = parseargs.cc parseargs.h
-
pdfdetach_SOURCES = \
- pdfdetach.cc \
- $(common)
+ pdfdetach.cc
pdffonts_SOURCES = \
- pdffonts.cc \
- $(common)
+ pdffonts.cc
pdfimages_SOURCES = \
pdfimages.cc \
ImageOutputDev.cc \
ImageOutputDev.h \
JSInfo.cc \
- JSInfo.h \
- $(common)
+ JSInfo.h
pdfinfo_SOURCES = \
pdfinfo.cc \
printencodings.cc \
printencodings.h \
JSInfo.cc \
- JSInfo.h \
- $(common)
+ JSInfo.h
pdftops_SOURCES = \
- pdftops.cc \
- $(common)
+ pdftops.cc
pdftotext_SOURCES = \
pdftotext.cc \
printencodings.cc \
- printencodings.h \
- $(common)
+ printencodings.h
pdftohtml_SOURCES = \
pdftohtml.cc \
@@ -93,8 +86,7 @@ pdftohtml_SOURCES = \
HtmlLinks.h \
HtmlOutputDev.cc \
HtmlOutputDev.h \
- HtmlUtils.h \
- $(common)
+ HtmlUtils.h
# HtmlOutputDev uses goo/PNGWriter.h that may depend on libpng header
if BUILD_LIBPNG
@@ -102,20 +94,16 @@ pdftohtml_CXXFLAGS = $(AM_CXXFLAGS) $(LIBPNG_CFLAGS)
endif
pdfseparate_SOURCES = \
- pdfseparate.cc \
- $(common)
+ pdfseparate.cc
pdfunite_SOURCES = \
- pdfunite.cc \
- $(common)
+ pdfunite.cc
pdftoppm_SOURCES = \
- pdftoppm.cc \
- $(common)
+ pdftoppm.cc
pdftocairo_SOURCES = \
- pdftocairo.cc \
- $(common)
+ pdftocairo.cc
if BUILD_CAIRO_OUTPUT
if USE_CMS
@@ -134,6 +122,12 @@ pdftocairo_CPPFLAGS = \
$(AM_CPPFLAGS) \
$(PDFTOCAIRO_CFLAGS)
+noinst_LTLIBRARIES = libparseargs.la
+
+libparseargs_la_SOURCES = \
+ parseargs.cc \
+ parseargs.h
+
# Yay, automake! It should be able to figure out that it has to dist
# pdftoppm.1, but nooo. So we just add it here.