|
5 | 5 | lib_LTLIBRARIES = librsvg-@ [email protected]
|
6 | 6 | noinst_LTLIBRARIES = librsvg_c_api.la
|
7 | 7 |
|
| 8 | +# Some systems, reportedly OpenBSD and Mac OS X, refuse |
| 9 | +# to create libraries without any object files. Compiling |
| 10 | +# this file, and adding its object file to the library, |
| 11 | +# will prevent the library from being empty. |
| 12 | +BUILT_SOURCES = _rsvg_dummy.c |
| 13 | +_rsvg_dummy.c: |
| 14 | + echo "static int __attribute__((unused)) __rsvg_dummy;" > _rsvg_dummy.c |
| 15 | + |
8 | 16 | # Automake wants to have a C sources list for LTLIBRARIES.
|
9 | 17 | # See LIBRSVG_INTERNALS_SRC below for the real list of Rust
|
10 | 18 | # sources.
|
11 |
| -librsvg_c_api_la_SOURCES = librsvg/dummy.c |
| 19 | +librsvg_c_api_la_SOURCES = _rsvg_dummy.c |
12 | 20 |
|
13 | 21 | bin_PROGRAMS = rsvg-convert
|
14 | 22 |
|
@@ -151,8 +159,9 @@ cargo_verbose_1 = --verbose
|
151 | 159 | LIBRSVG_BUILD_DIR=@abs_top_builddir@
|
152 | 160 | CARGO_TARGET_DIR=$(LIBRSVG_BUILD_DIR)/target
|
153 | 161 |
|
154 |
| -if PLATFORM_WIN32 |
155 |
| -# https://github.com/rust-lang/rust/issues/43749 |
| 162 | +if LIB_NAME_WORKAROUND |
| 163 | +# Workaround for https://github.com/rust-lang/rust/issues/69904 |
| 164 | +# can be removed when our minimum Rust version is at least 1.44. |
156 | 165 | RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/rsvg_c_api.lib
|
157 | 166 | else
|
158 | 167 | RUST_LIB=$(CARGO_TARGET_DIR)/$(RUST_TARGET_SUBDIR)/librsvg_c_api.a
|
@@ -316,7 +325,7 @@ nodist_gir_DATA = $(INTROSPECTION_GIRS)
|
316 | 325 | typelibsdir = $(libdir)/girepository-1.0
|
317 | 326 | nodist_typelibs_DATA = $(INTROSPECTION_GIRS:.gir=.typelib)
|
318 | 327 |
|
319 |
| -CLEANFILES = $(nodist_gir_DATA) $(nodist_typelibs_DATA) |
| 328 | +CLEANFILES = $(BUILT_SOURCES) $(nodist_gir_DATA) $(nodist_typelibs_DATA) |
320 | 329 |
|
321 | 330 | if ENABLE_VAPIGEN
|
322 | 331 | include $(VAPIGEN_MAKEFILE)
|
|
0 commit comments