From 84357741a6a6e6430f199b2c3f7498e0e97da9ad Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Sun, 12 Feb 2023 17:35:53 +0100 Subject: New upstream version 1.2.1 --- backend/Makefile.am | 80 +++++++++++++++++++++++++++++++++++------------------ 1 file changed, 53 insertions(+), 27 deletions(-) (limited to 'backend/Makefile.am') diff --git a/backend/Makefile.am b/backend/Makefile.am index e56e7f1..35ad206 100644 --- a/backend/Makefile.am +++ b/backend/Makefile.am @@ -18,6 +18,8 @@ DIST_LIBS_LDFLAGS = $(AM_LDFLAGS) -rpath '$(libdir)' -version-number $(V_MAJOR): LIBTOOL += --silent FIRMWARE_DIRS = artec_eplus48u gt68xx snapscan epjitsu +BUILT_SOURCES = + # Needed by most backends as they add sane_strstatus.lo to their list # of libraries to link with via libsane_${BACKEND}_la_LIBADD. Due to # the implicit dependency, automake does not notice the need to clean @@ -93,7 +95,8 @@ becfg: $(BACKEND_CONFS) SUFFIXES = .conf.in .conf .conf.in.conf: - @echo Generating $@ from $^ + $(AM_V_GEN) + @if $(AM_V_P); then echo Generating $@ from $^; fi @sed -e 's|@DATADIR@|$(datadir)|g' \ -e 's|@CONFIGDIR@|$(configdir)|g' \ -e 's|@DOCDIR@|$(docdir)|g' \ @@ -109,9 +112,9 @@ install-data-hook: install-becfg install-firmware-path $(INSTALL_LOCKPATH) # are not lost. install-becfg: becfg @# Libtool has a bug where it will sometimes symlink the last - @# installed library in $(sanelibdir) to $(sanelibdir)/libsane.*. - @# Having two libsane's can cause issues so get rid of it. - -rm -f $(DESTDIR)$(sanelibdir)/libsane.* + @# installed library in $(execsanelibdir) to libsane.*, which + @# causes a conflict with the actual libsane.* in $(libdir). + -rm -f $(DESTDIR)$(execsanelibdir)/libsane.* test -z "$(configdir)" || $(MKDIR_P) "$(DESTDIR)$(configdir)" test -z "$(configdir)/dll.d" || $(MKDIR_P) "$(DESTDIR)$(configdir)/dll.d" @list="$(BACKEND_CONFS_ENABLED) saned.conf dll.conf"; for cfg in $$list; do \ @@ -225,8 +228,11 @@ EXTRA_LTLIBRARIES = $(be_convenience_libs) $(be_dlopen_libs) lib_LTLIBRARIES = libsane.la -sanelibdir = $(libdir)/sane -sanelib_LTLIBRARIES = $(BACKEND_LIBS_ENABLED) libsane-dll.la +# The libraries in $(libdir)/sane are platform-dependent files, so they +# should be installed during "make install-exec". For that reason, the +# variable names here must contain "exec". +execsanelibdir = $(libdir)/sane +execsanelib_LTLIBRARIES = $(BACKEND_LIBS_ENABLED) libsane-dll.la COMMON_LIBS = ../lib/liblib.la $(XML_LIBS) @@ -678,6 +684,7 @@ libsane_epson_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_usb.lo \ ../sanei/sanei_scsi.lo \ ../sanei/sanei_pio.lo \ + ../sanei/sanei_directio.lo \ $(SCSI_LIBS) $(USB_LIBS) $(RESMGR_LIBS) EXTRA_DIST += epson.conf.in @@ -699,6 +706,7 @@ libsane_epson2_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_pio.lo \ ../sanei/sanei_tcp.lo \ ../sanei/sanei_udp.lo \ + ../sanei/sanei_directio.lo \ $(SCSI_LIBS) $(USB_LIBS) $(SOCKET_LIBS) $(MATH_LIB) $(RESMGR_LIBS) EXTRA_DIST += epson2.conf.in @@ -853,6 +861,7 @@ libsane_hp_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_scsi.lo \ ../sanei/sanei_pio.lo \ ../sanei/sanei_thread.lo \ + ../sanei/sanei_directio.lo \ $(SCSI_LIBS) $(USB_LIBS) $(SANEI_THREAD_LIBS) $(RESMGR_LIBS) EXTRA_DIST += hp.conf.in # TODO: These should be moved to ../docs/hp; don't belong here. @@ -1243,6 +1252,7 @@ libsane_mustek_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_thread.lo \ ../sanei/sanei_ab306.lo \ ../sanei/sanei_pa4s2.lo \ + ../sanei/sanei_directio.lo \ $(IEEE1284_LIBS) $(SCSI_LIBS) $(SANEI_THREAD_LIBS) $(RESMGR_LIBS) EXTRA_DIST += mustek.conf.in # TODO: Why are these distributed but not compiled? @@ -1261,6 +1271,7 @@ libsane_mustek_pp_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_config.lo \ sane_strstatus.lo \ ../sanei/sanei_pa4s2.lo \ + ../sanei/sanei_directio.lo \ $(MATH_LIB) $(IEEE1284_LIBS) EXTRA_DIST += mustek_pp.conf.in # TODO: Why are these distributed but not compiled? @@ -1420,7 +1431,9 @@ libsane_pint_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_config.lo \ sane_strstatus.lo -libpixma_la_SOURCES = pixma/pixma.c \ +libpixma_la_SOURCES = \ + pixma/pixma_sane_options.h \ + pixma/pixma.c \ pixma/pixma.h \ pixma/pixma_io_sanei.c \ pixma/pixma_io.h \ @@ -1437,26 +1450,25 @@ libpixma_la_SOURCES = pixma/pixma.c \ pixma/pixma_rename.h libpixma_la_CPPFLAGS = $(AM_CPPFLAGS) $(XML_CFLAGS) -DBACKEND_NAME=pixma -# Generate options files included by pixma/pixma.c from said file. -# The circular dependency means we cannot add it as a prerequisite -# for the targets that build the options files. - -$(srcdir)/pixma/pixma.c: \ - $(srcdir)/pixma/pixma_sane_options.h \ - $(srcdir)/pixma/pixma_sane_options.c - -$(srcdir)/pixma/pixma_sane_options.h: - @echo Generating $@ from $(@D)/pixma.c - @(cd $(@D); $(PYTHON) scripts/pixma_gen_options.py h < pixma.c > $(@F)) -$(srcdir)/pixma/pixma_sane_options.c: - @echo Generating $@ from $(@D)/pixma.c - @(cd $(@D); $(PYTHON) scripts/pixma_gen_options.py < pixma.c > $(@F)) +$(srcdir)/pixma/pixma_sane_options.h: $(srcdir)/pixma/pixma.c + @if $(AM_V_P); then \ + echo "Generating pixma/$(@F) from pixma/$(^F)"; \ + else \ + echo " GEN pixma/$(@F)"; \ + fi + @$(PYTHON) $(srcdir)/pixma/scripts/pixma_gen_options.py h < $^ > $@ +$(srcdir)/pixma/pixma_sane_options.c: $(srcdir)/pixma/pixma.c + @if $(AM_V_P); then \ + echo "Generating pixma/$(@F) from pixma/$(^F)"; \ + else \ + echo " GEN pixma/$(@F)"; \ + fi + @$(PYTHON) $(srcdir)/pixma/scripts/pixma_gen_options.py < $^ > $@ +BUILT_SOURCES += pixma/pixma_sane_options.c +BUILT_SOURCES += pixma/pixma_sane_options.h EXTRA_DIST += pixma/pixma_sane_options.c -EXTRA_DIST += pixma/pixma_sane_options.h EXTRA_DIST += pixma/scripts/pixma_gen_options.py -CLEANFILES += pixma/pixma_sane_options.c -CLEANFILES += pixma/pixma_sane_options.h nodist_libsane_pixma_la_SOURCES = pixma-s.c libsane_pixma_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=pixma @@ -1498,7 +1510,16 @@ libplustek_pp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=plustek_pp nodist_libsane_plustek_pp_la_SOURCES = plustek_pp-s.c libsane_plustek_pp_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=plustek_pp libsane_plustek_pp_la_LDFLAGS = $(DIST_SANELIBS_LDFLAGS) -libsane_plustek_pp_la_LIBADD = $(COMMON_LIBS) libplustek_pp.la ../sanei/sanei_init_debug.lo ../sanei/sanei_constrain_value.lo ../sanei/sanei_config.lo sane_strstatus.lo ../sanei/sanei_pp.lo ../sanei/sanei_thread.lo $(MATH_LIB) $(IEEE1284_LIBS) $(SANEI_THREAD_LIBS) +libsane_plustek_pp_la_LIBADD = $(COMMON_LIBS) \ + libplustek_pp.la \ + ../sanei/sanei_init_debug.lo \ + ../sanei/sanei_constrain_value.lo \ + ../sanei/sanei_config.lo \ + sane_strstatus.lo \ + ../sanei/sanei_pp.lo \ + ../sanei/sanei_thread.lo \ + ../sanei/sanei_directio.lo \ + $(MATH_LIB) $(IEEE1284_LIBS) $(SANEI_THREAD_LIBS) EXTRA_DIST += plustek_pp.conf.in # TODO: Why are these distributed but not compiled? EXTRA_DIST += plustek-pp_dac.c plustek-pp_dbg.h plustek-pp_detect.c plustek-pp_genericio.c plustek-pp_hwdefs.h plustek-pp_image.c plustek-pp_io.c plustek-pp_map.c plustek-pp_misc.c plustek-pp_models.c plustek-pp_motor.c plustek-pp_p12.c plustek-pp_p12ccd.c plustek-pp_p48xx.c plustek-pp_p9636.c plustek-pp_procfs.c plustek-pp_procs.h plustek-pp_ptdrv.c plustek-pp_scale.c plustek-pp_scan.h plustek-pp_scandata.h plustek-pp_sysdep.h plustek-pp_tpa.c plustek-pp_types.h plustek-pp_wrapper.c @@ -1528,7 +1549,8 @@ libsane_qcam_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_constrain_value.lo \ ../sanei/sanei_config.lo \ sane_strstatus.lo \ - ../sanei/sanei_pio.lo + ../sanei/sanei_pio.lo \ + ../sanei/sanei_directio.lo EXTRA_DIST += qcam.conf.in @@ -1903,6 +1925,7 @@ libsane_umax_pp_la_LIBADD = $(COMMON_LIBS) \ ../sanei/sanei_init_debug.lo \ ../sanei/sanei_constrain_value.lo \ ../sanei/sanei_config.lo \ + ../sanei/sanei_directio.lo \ sane_strstatus.lo \ $(MATH_LIB) EXTRA_DIST += umax_pp.conf.in @@ -1939,6 +1962,7 @@ libsane_xerox_mfp_la_LIBADD = $(COMMON_LIBS) \ $(MATH_LIB) $(SOCKET_LIBS) $(USB_LIBS) $(RESMGR_LIBS) EXTRA_DIST += xerox_mfp.conf.in +nodist_libdll_preload_la_SOURCES = dll-preload.h libdll_preload_la_SOURCES = dll.c libdll_preload_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll -DENABLE_PRELOAD libdll_preload_la_LIBADD = ../sanei/sanei_usb.lo \ @@ -1947,7 +1971,7 @@ libdll_la_SOURCES = dll.c libdll_la_CPPFLAGS = $(AM_CPPFLAGS) -DBACKEND_NAME=dll libdll_la_LIBADD = ../sanei/sanei_usb.lo \ $(USB_LIBS) $(XML_LIBS) -BUILT_SOURCES = dll-preload.h +BUILT_SOURCES += dll-preload.h CLEANFILES += dll-preload.h nodist_libsane_dll_la_SOURCES = dll-s.c @@ -2001,6 +2025,7 @@ PRELOADABLE_BACKENDS_LIBS = \ ../sanei/sanei_tcp.lo \ ../sanei/sanei_udp.lo \ ../sanei/sanei_magic.lo \ + ../sanei/sanei_directio.lo \ $(LIBV4L_LIBS) $(MATH_LIB) \ $(IEEE1284_LIBS) \ $(TIFF_LIBS) \ @@ -2035,6 +2060,7 @@ PRELOADABLE_BACKENDS_DEPS = ../sanei/sanei_config2.lo \ ../sanei/sanei_tcp.lo \ ../sanei/sanei_udp.lo \ ../sanei/sanei_magic.lo \ + ../sanei/sanei_directio.lo \ $(SANEI_SANEI_JPEG_LO) endif nodist_libsane_la_SOURCES = dll-s.c -- cgit v1.2.3