1. ## Makefile.am -- an automake template for Makefile.in
  2. ## Copyright (C) 2012-2015 SEIKO EPSON CORPORATION
  3. ## Copyright (C) 2013 Olaf Meeuwissen
  4. ##
  5. ## License: GPL-3.0+
  6. ## Author : EPSON AVASYS CORPORATION
  7. ##
  8. ## This file is part of the 'Utsushi' package.
  9. ## This package is free software: you can redistribute it and/or modify
  10. ## it under the terms of the GNU General Public License as published by
  11. ## the Free Software Foundation, either version 3 of the License or, at
  12. ## your option, any later version.
  13. ##
  14. ## This program is distributed in the hope that it will be useful,
  15. ## but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. ## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. ## GNU General Public License for more details.
  18. ##
  19. ## You ought to have received a copy of the GNU General Public License
  20. ## along with this package. If not, see <http://www.gnu.org/licenses/>.
  21. ## Process this file with automake to make a Makefile.in file.
  22. SUBDIRS = .
  23. if WITH_INCLUDED_LTDL
  24. SUBDIRS += upstream/ltdl
  25. endif
  26. SUBDIRS += lib
  27. SUBDIRS += connexions
  28. SUBDIRS += filters
  29. if with_gtkmm
  30. SUBDIRS += gtkmm
  31. endif
  32. SUBDIRS += drivers
  33. SUBDIRS += drivers/esci
  34. if WITH_SANE
  35. SUBDIRS += sane
  36. endif
  37. SUBDIRS += po
  38. SUBDIRS += src
  39. SUBDIRS += doc
  40. SUBDIRS += tests
  41. EXTRA_DIST = bootstrap
  42. EXTRA_DIST += config-bot.h
  43. EXTRA_DIST += install-deps
  44. EXTRA_DIST += tools/boost-test-report
  45. EXTRA_DIST += tools/boost-test-report.xsl
  46. EXTRA_DIST += tools/include-boost-src
  47. EXTRA_DIST += upstream/include/no_attribute_directive.hpp
  48. EXTRA_DIST += upstream/tools/vc-list-files
  49. EXTRA_DIST += .gitignore
  50. ## Conform AC_CONFIG_MACRO_DIR in configure.ac.
  51. ACLOCAL_AMFLAGS = -I upstream/aclocal
  52. ## Make sure that we exercise building of the distributed sources to
  53. ## their maximum extent.
  54. DISTCHECK_CONFIGURE_FLAGS = --with-included-ltdl
  55. DISTCHECK_CONFIGURE_FLAGS += --with-gtkmm
  56. DISTCHECK_CONFIGURE_FLAGS += --with-sane
  57. DISTCHECK_CONFIGURE_FLAGS += --with-magick
  58. DISTCHECK_CONFIGURE_FLAGS += --with-jpeg
  59. DISTCHECK_CONFIGURE_FLAGS += --with-tiff
  60. DISTCHECK_CONFIGURE_FLAGS += --enable-test-reports
  61. DISTCHECK_CONFIGURE_FLAGS += --enable-code-coverage
  62. ## Unprivileged users will not be able to install the SANE component
  63. ## or integrate with the udev activated device set up. That should
  64. ## not prevent them from running a distcheck.
  65. DISTCHECK_CONFIGURE_FLAGS += --disable-sane-config
  66. DISTCHECK_CONFIGURE_FLAGS += --disable-udev-config
  67. DISTCHECK_CONFIGURE_FLAGS += --with-download-dir=$(DOWNLOAD_DIR)
  68. ## API header files
  69. pattern_headers = utsushi/pattern/decorator.hpp
  70. stream_headers = utsushi/octet.hpp
  71. stream_headers += utsushi/context.hpp
  72. stream_headers += utsushi/iobase.hpp
  73. stream_headers += utsushi/device.hpp
  74. stream_headers += utsushi/filter.hpp
  75. stream_headers += utsushi/buffer.hpp
  76. stream_headers += utsushi/stream.hpp
  77. stream_headers += utsushi/pump.hpp
  78. setting_headers = utsushi/constraint.hpp
  79. setting_headers += utsushi/descriptor.hpp
  80. setting_headers += utsushi/key.hpp
  81. setting_headers += utsushi/media.hpp
  82. setting_headers += utsushi/option.hpp
  83. setting_headers += utsushi/preset.hpp
  84. setting_headers += utsushi/quantity.hpp
  85. setting_headers += utsushi/range.hpp
  86. setting_headers += utsushi/store.hpp
  87. setting_headers += utsushi/string.hpp
  88. setting_headers += utsushi/toggle.hpp
  89. setting_headers += utsushi/tag.hpp
  90. setting_headers += utsushi/value.hpp
  91. test_headers = utsushi/test/runner.ipp
  92. test_headers += utsushi/test/catch-system-errors.hpp
  93. test_headers += utsushi/test/command-line.hpp
  94. test_headers += utsushi/test/environment.hpp
  95. test_headers += utsushi/test/tools.hpp
  96. test_headers += utsushi/test/memory.hpp
  97. test_headers += utsushi/test/null.hpp
  98. wrapper_headers =
  99. wrapper_headers += utsushi/array.hpp
  100. wrapper_headers += utsushi/cstdint.hpp
  101. wrapper_headers += utsushi/condition-variable.hpp
  102. wrapper_headers += utsushi/format.hpp
  103. wrapper_headers += utsushi/functional.hpp
  104. wrapper_headers += utsushi/memory.hpp
  105. wrapper_headers += utsushi/mutex.hpp
  106. wrapper_headers += utsushi/regex.hpp
  107. wrapper_headers += utsushi/signal.hpp
  108. wrapper_headers += utsushi/thread.hpp
  109. wrapper_headers += utsushi/type-traits.hpp
  110. nobase_include_HEADERS = $(pattern_headers)
  111. nobase_include_HEADERS += $(stream_headers)
  112. nobase_include_HEADERS += $(setting_headers)
  113. nobase_include_HEADERS += utsushi/connexion.hpp
  114. nobase_include_HEADERS += utsushi/device-info.hpp
  115. nobase_include_HEADERS += utsushi/exception.hpp
  116. nobase_include_HEADERS += utsushi/i18n.hpp
  117. nobase_include_HEADERS += utsushi/log.hpp
  118. nobase_include_HEADERS += utsushi/monitor.hpp
  119. nobase_include_HEADERS += utsushi/run-time.hpp
  120. nobase_include_HEADERS += utsushi/scanner.hpp
  121. nobase_include_HEADERS += $(wrapper_headers)
  122. EXTRA_DIST += $(test_headers)
  123. EXTRA_DIST += lib/tag.xml
  124. EXTRA_DIST += lib/tag.xsl
  125. EXTRA_DIST += lib/tag.cpp
  126. BUILT_SOURCES = $(srcdir)/utsushi/tag.hpp
  127. BUILT_SOURCES += $(srcdir)/lib/tag.cpp
  128. $(srcdir)/utsushi/tag.hpp $(srcdir)/lib/tag.cpp: $(srcdir)/lib/tag.xml \
  129. $(srcdir)/lib/tag.xsl
  130. format=`echo $@ | sed 's|.*\.\([^.]*\)$$|\1|'`; \
  131. sed -n \
  132. -e "/^<!--/s/\.xml ::/.$$format --/" \
  133. -e '/^<!--/,/-->/{ /-->/d; s|^$$|//|p; s|^....|//|p; }' $< > $@; \
  134. xsltproc --stringparam format $$format $(srcdir)/lib/tag.xsl $< >> $@
  135. sed -i 's/SEC_N_("%1%")/"%1%"/' $@
  136. if with_included_boost
  137. all-local: boost-libs
  138. if with_shared_enabled
  139. ## Install those Boost libraries that we (likely) need at run-time.
  140. ## Boost.Test libraries should *not* be needed so we explicitly skip
  141. ## them here.
  142. install-exec-local: $(boostdir)/lib/stamp
  143. @$(NORMAL_INSTALL)
  144. @test -z "$(pkglibdir)" || $(MKDIR_P) "$(DESTDIR)$(pkglibdir)"
  145. @install_lib="$(INSTALL) $(INSTALL_STRIP_FLAGS)"; \
  146. for lib in `ls $(boostdir)/lib/libboost_*$(LT_MODULE_EXT).*`; do \
  147. case $$lib in \
  148. */libboost_unit_test_framework$(LT_MODULE_EXT).*) \
  149. ;; \
  150. */libboost_test_exec_monitor$(LT_MODULE_EXT).*) \
  151. ;; \
  152. */libboost_prg_exec_monitor$(LT_MODULE_EXT).*) \
  153. ;; \
  154. *) \
  155. cmd="$$install_lib $$lib $(DESTDIR)$(pkglibdir)"; \
  156. echo $$cmd; \
  157. eval $$cmd; \
  158. filename=`echo $$lib | sed 's,.*/,,'`; \
  159. linkname=`echo $$filename \
  160. | sed 's/$(LT_MODULE_EXT).*$$/$(LT_MODULE_EXT)/'`; \
  161. test -e $(DESTDIR)$(pkglibdir)/$$linkname \
  162. && rm $(DESTDIR)$(pkglibdir)/$$linkname || true; \
  163. $(LN_S) $$filename $(DESTDIR)$(pkglibdir)/$$linkname ; \
  164. ;; \
  165. esac; \
  166. done
  167. uninstall-local:
  168. -rm $(DESTDIR)$(pkglibdir)/libboost_*$(LT_MODULE_EXT)*
  169. endif # with_shared_enabled
  170. endif # with_included_boost
  171. ## The Boost sources take an approach to building that is opposite of
  172. ## that used by autoconf and automake. Whereas the latter build from
  173. ## a $(builddir) and get sources from a $(srcdir), the Boost sources
  174. ## expect to build from their $(srcdir) and put the build results in
  175. ## a $(builddir).
  176. ## To make the whole affair even more cumbersome, some parts (did you
  177. ## just say bjam?) cannot be built from a read-only $(srcdir) as they
  178. ## like to scribble in that directory. Of course, a `make distcheck`
  179. ## makes the whole source tree read-only, so ... we have a workaround
  180. ## that basically copies the sources into the build tree, makes sure
  181. ## the build can scribble, builds and removes all sources again as if
  182. ## nothing out of the ordinary happened.
  183. boostdir = upstream/boost
  184. boost-libs: $(boostdir)/lib/stamp
  185. $(boostdir)/lib/stamp: Boost.Build
  186. @echo "Building Boost libraries"; \
  187. if test $(srcdir) = $(builddir); then \
  188. cmd="cd $(boostdir); ./bin/$(BOOST_BUILD) \
  189. --build-dir=. --stagedir=."; \
  190. else \
  191. dir1=$(srcdir)/$(boostdir); \
  192. dir2=$(boostdir); \
  193. $(am__relativize); \
  194. cmd="cd $(srcdir)/$(boostdir); $$reldir/bin/$(BOOST_BUILD) \
  195. --build-dir=$$reldir --stagedir=$$dir2"; \
  196. fi; \
  197. cmd="($$cmd variant=debug $(boost_build_link_properties))"; \
  198. echo $$cmd; \
  199. eval $$cmd && touch $@
  200. BOOST_BUILD = bjam
  201. Boost.Build: $(boostdir)/bin/$(BOOST_BUILD)
  202. $(boostdir)/bin/$(BOOST_BUILD):
  203. echo "Building Boost.Build ($(BOOST_BUILD))"; \
  204. if test $(srcdir) = $(builddir); then \
  205. (cd $(boostdir)/tools/build/v2; \
  206. ./bootstrap.sh \
  207. && ./$(BOOST_BUILD) install --prefix=../../..); \
  208. else \
  209. test -d $(boostdir)/tools/build \
  210. || $(MKDIR_P) $(boostdir)/tools/build; \
  211. cp -a $(srcdir)/$(boostdir)/tools/build/v2 \
  212. $(boostdir)/tools/build; \
  213. find $(boostdir) -type d -exec chmod u+w {} ';'; \
  214. (cd $(boostdir)/tools/build/v2; \
  215. ./bootstrap.sh \
  216. && ./$(BOOST_BUILD) install --prefix=../../..) \
  217. && rm -rf $(boostdir)/tools/build/v2; \
  218. rmdir $(boostdir)/tools/build || true; \
  219. rmdir $(boostdir)/tools || true; \
  220. fi
  221. ## What a target for the bcp utility *could* look like. We haven't
  222. ## been able to get something to work (using boost-1.46.1 on Ubuntu
  223. ## 10.04 LTS) with a read-only source tree, getting bcp to link w/o
  224. ## errors and install somewhere below $(boostdir).
  225. ## For the time being we will rely on an existing bcp utility.
  226. ##
  227. ## $(boostdir)/bcp: $(boostdir)/bjam
  228. ## @dir1=$(srcdir)/$(boostdir); \
  229. ## dir2=$(boostdir); \
  230. ## $(am__relativize); \
  231. ## cmd="(cd $(srcdir)/$(boostdir); $$reldir/bjam \
  232. ## --build-dir=$$reldir tools/bcp)"; \
  233. ## echo $$cmd; \
  234. ## eval $$cmd
  235. mostlyclean-local:
  236. -rm -r $(boostdir)/boost/bin.v2
  237. -rm $(boostdir)/bootstrap.log
  238. clean-local:
  239. -rm -r $(boostdir)/lib
  240. -rm $(boostdir)/bjam
  241. distclean-local:
  242. maintainer-clean-local:
  243. -rm -r $(srcdir)/$(boostdir)/../downloads/boost*
  244. -rm -r $(srcdir)/$(boostdir)
  245. ## This target should *not* be conditionalized on with_included_boost
  246. ## as that only affects build-related actions. Shipping the upstream
  247. ## Boost sources is independent from that.
  248. dist-hook:
  249. (cd $(distdir); tools/include-boost-src --source=$(DOWNLOAD_DIR))
  250. ## If successful, the distcheck target removes the whole $(distdir)
  251. ## and takes all build results with it. That includes all coverage
  252. ## data which is highly undesirable if you want to perform analysis
  253. ## after a `make distcheck`.
  254. ## Set the 'dc_precious_dir' variable on the command-line to create
  255. ## a full copy of the $(top_builddir) for later analysis.
  256. installcheck-local:
  257. if test -n "$(dc_precious_dir)"; then \
  258. test -d "$(dc_precious_dir)" || $(MKDIR_P) "$(dc_precious_dir)"; \
  259. cp -pR $(top_builddir) "$(dc_precious_dir)"; \
  260. fi

Makefile.ac for a printer drivers. The issues are around line 145 and below.