Imported Upstream version 0.18.1.1
[platform/upstream/gettext.git] / gettext-tools / examples / hello-csharp / Makefile.am
1 # Example for use of GNU gettext.
2 # This file is in the public domain.
3 #
4 # Makefile configuration - processed by automake.
5
6 # General automake options.
7 AUTOMAKE_OPTIONS = foreign
8 ACLOCAL_AMFLAGS = -I m4
9
10 # The list of subdirectories containing Makefiles.
11 SUBDIRS = m4 po
12
13 # The list of programs that are built.
14 bin_CSHARPPROGRAMS = hello
15
16 # The source files of the 'hello' program.
17 hello_SOURCES = hello.cs
18
19 # The link dependencies of the 'hello' program.
20 hello_CSHARPLIBS = @GNU_GETTEXT_LDADD@ @GNU_GETTEXT_LIBS@ -l System
21
22 # Resources that are generated from PO files.
23 MAINTAINERCLEANFILES = */*.resources.dll
24
25 # Additional files to be distributed.
26 EXTRA_DIST = autogen.sh autoclean.sh
27
28
29 # ----------------- General rules for compiling C# programs -----------------
30
31 pkgdatadir = $(datadir)/$(PACKAGE)
32 pkglibdir = $(libdir)/$(PACKAGE)
33
34 CSHARPCOMP = $(SHELL) csharpcomp.sh
35 CSHARPCOMPFLAGS = -O -g
36
37 EXTRA_DIST += $(hello_SOURCES)
38 CLEANFILES =
39 DISTCLEANFILES = csharpcomp.sh csharpexec.sh
40
41
42 # Rules for compiling C# programs.
43
44 all-local: hello.net.exe hello.sh
45
46 hello.net.exe: $(hello_SOURCES)
47         $(CSHARPCOMP) $(CSHARPCOMPFLAGS) -o $@ $(hello_CSHARPLIBS) $(srcdir)/hello.cs
48
49 hello.sh:
50         { echo '#!/bin/sh'; \
51           echo "exec /bin/sh '$(pkgdatadir)/csharpexec.sh' @GNU_GETTEXT_LDADD@ '$(pkglibdir)/hello.net.exe' \"\$$@\""; \
52         } > $@
53
54 install-exec-local: all-local
55         $(mkdir_p) $(DESTDIR)$(bindir)
56         $(INSTALL_SCRIPT) hello.sh $(DESTDIR)$(bindir)/hello
57         $(mkdir_p) $(DESTDIR)$(pkglibdir)
58         $(INSTALL_DATA) hello.net.exe $(DESTDIR)$(pkglibdir)/hello.net.exe
59
60 install-data-local: all-local
61         $(mkdir_p) $(DESTDIR)$(pkgdatadir)
62         $(INSTALL_DATA) csharpexec.sh $(DESTDIR)$(pkgdatadir)/csharpexec.sh
63
64 installdirs-local:
65         $(mkdir_p) $(DESTDIR)$(bindir)
66         $(mkdir_p) $(DESTDIR)$(pkglibdir)
67         $(mkdir_p) $(DESTDIR)$(pkgdatadir)
68
69 uninstall-local:
70         rm -f $(DESTDIR)$(bindir)/hello
71         rm -f $(DESTDIR)$(pkglibdir)/hello.net.exe
72         rm -f $(DESTDIR)$(pkgdatadir)/csharpexec.sh
73
74 CLEANFILES += hello.net.exe hello.sh