1 ## SPDX-License-Identifier: 0BSD
2 ## Author: Lasse Collin
4 # Windows resource compiler support. It's fine to use xz_CPPFLAGS
7 $(RC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) \
8 $(xzdec_CPPFLAGS) $(CPPFLAGS) $(RCFLAGS) -i $< -o $@
13 ../common/tuklib_progname.c \
14 ../common/tuklib_exit.c
17 xzdec_SOURCES += xzdec_w32res.rc
22 -I$(top_srcdir)/src/common \
23 -I$(top_srcdir)/src/liblzma/api \
25 xzdec_LDADD = $(top_builddir)/src/liblzma/liblzma.la
28 xzdec_LDADD += $(top_builddir)/lib/libgnu.a
31 xzdec_LDADD += $(LTLIBINTL)
36 ../common/tuklib_progname.c \
37 ../common/tuklib_exit.c
40 lzmadec_SOURCES += lzmadec_w32res.rc
43 lzmadec_CPPFLAGS = $(xzdec_CPPFLAGS) -DLZMADEC
44 lzmadec_LDFLAGS = $(xzdec_LDFLAGS)
45 lzmadec_LDADD = $(xzdec_LDADD)
53 dist_man_MANS = xzdec.1
57 bin_PROGRAMS += lzmadec
59 # Create the symlink lzmadec.1->xzdec.1 only if xzdec.1 was installed.
60 # This is better than creating a dangling symlink. The correct solution
61 # would be to install xzdec.1 as lzmadec.1 but this code is already too
62 # complicated so I won't do it. Installing only lzmadec is a bit unusual
63 # situation anyway so it's not that important.
65 lzmadecmanlink += lzmadec
70 # The installation of translated man pages abuses Automake internals
71 # by calling "install-man" with redefined dist_man_MANS and man_MANS.
72 # If this breaks some day, don't blame Automake developers.
75 if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \
76 languages=`ls "$(top_srcdir)/po4a/man"`; \
78 target=`echo xzdec | sed '$(transform)'` && \
79 link=`echo lzmadec | sed '$(transform)'` && \
80 for lang in . $$languages; do \
81 man="$(top_srcdir)/po4a/man/$$lang/xzdec.1" ; \
82 if test -f "$$man"; then \
83 $(MAKE) dist_man_MANS="$$man" man_MANS= \
84 mandir="$(mandir)/$$lang" install-man; \
86 man1dir="$(DESTDIR)$(mandir)/$$lang/man1" && \
87 if test -f "$$man1dir/$$target.1"; then \
88 if test -n "$(lzmadecmanlink)"; then ( \
91 $(LN_S) "$$target.1" "$$link.1" \
98 if test "$(USE_NLS)" = yes && test -d "$(top_srcdir)/po4a/man"; then \
99 languages=`ls "$(top_srcdir)/po4a/man"`; \
101 for lang in . $$languages; do \
102 for name in xzdec $(lzmadecmanlink); do \
103 name=`echo $$name | sed '$(transform)'` && \
104 rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$name.1"; \