File tree Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Expand file tree Collapse file tree 2 files changed +33
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ noinst_LTLIBRARIES = librsvg_c_api.la
8
8
# This is empty, because automake wants to have a C sources list for
9
9
# the LTLIBRARIES. See LIBRSVG_INTERNALS_SRC below for the real list
10
10
# of Rust sources.
11
- librsvg_c_api_la_SOURCES =
11
+ librsvg_c_api_la_SOURCES = librsvg/dummy.c
12
12
13
13
bin_PROGRAMS = rsvg-convert
14
14
@@ -182,7 +182,7 @@ dist-hook:
182
182
mkdir .cargo && \
183
183
cp cargo-vendor-config .cargo/config)
184
184
185
- librsvg_c_api.la : $(LIBRSVG_INTERNALS_SRC ) $(LIBRSVG_C_API_SRC )
185
+ librsvg_c_api.la : $(librsvg_c_api_la_OBJECTS ) $( LIBRSVG_INTERNALS_SRC ) $(LIBRSVG_C_API_SRC )
186
186
+cd $(top_srcdir ) /librsvg && \
187
187
PKG_CONFIG_ALLOW_CROSS=1 \
188
188
PKG_CONFIG=' $(PKG_CONFIG)' \
@@ -191,7 +191,7 @@ librsvg_c_api.la: $(LIBRSVG_INTERNALS_SRC) $(LIBRSVG_C_API_SRC)
191
191
&& if [[ $$ ($( NM) -g $( RUST_LIB) | grep " T __*clzsi2" -c) -gt 1 ]] ; then \
192
192
$(AR ) d $(RUST_LIB ) clzsi2.o; \
193
193
fi \
194
- && cd $(LIBRSVG_BUILD_DIR ) && $(LINK ) && mv $(RUST_LIB ) .libs/librsvg_c_api.a
194
+ && cd $(LIBRSVG_BUILD_DIR ) && $(LINK ) $< && mv $(RUST_LIB ) .libs/librsvg_c_api.a
195
195
196
196
librsvg_@RSVG_API_MAJOR_VERSION@_la_CPPFLAGS = \
197
197
-I$(top_srcdir ) \
Original file line number Diff line number Diff line change
1
+ /* A dummy file, to prevent empty libraries from breaking builds.
2
+
3
+ This file is in the public domain. -- Bruno Haible */
4
+
5
+ /* Some systems, reportedly OpenBSD and Mac OS X, refuse to create
6
+ libraries without any object files. You might get an error like:
7
+
8
+ > ar cru .libs/libgl.a
9
+ > ar: no archive members specified
10
+
11
+ Compiling this file, and adding its object file to the library, will
12
+ prevent the library from being empty. */
13
+
14
+ /* Some systems, such as Solaris with cc 5.0, refuse to work with libraries
15
+ that don't export any symbol. You might get an error like:
16
+
17
+ > cc ... libgnu.a
18
+ > ild: (bad file) garbled symbol table in archive ../gllib/libgnu.a
19
+
20
+ Compiling this file, and adding its object file to the library, will
21
+ prevent the library from exporting no symbols. */
22
+
23
+ #ifdef __sun
24
+ /* This declaration ensures that the library will export at least 1 symbol. */
25
+ int gl_dummy_symbol ;
26
+ #else
27
+ /* This declaration is solely to ensure that after preprocessing
28
+ this file is never empty. */
29
+ typedef int dummy ;
30
+ #endif
You can’t perform that action at this time.
0 commit comments