• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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.
7AUTOMAKE_OPTIONS = foreign
8ACLOCAL_AMFLAGS = -I m4
9
10# The list of subdirectories containing Makefiles.
11SUBDIRS = m4 . po
12
13# The list of programs that are built.
14bin_PASCALPROGRAMS = hello
15
16# The source files of the 'hello' program.
17hello_SOURCES = $(srcdir)/hello.pas
18
19# Additional files to be distributed.
20EXTRA_DIST = autogen.sh autoclean.sh
21
22# ---------------- General rules for compiling Pascal programs ----------------
23
24EXTRA_DIST += $(hello_SOURCES)
25
26# Distribute the RSJ file because it's needed to generate POT files and can
27# only be rebuilt on those platforms to which the Pascal compiler is ported.
28EXTRA_DIST += hello.rsj
29# The GNU Coding Standards say in
30# <https://www.gnu.org/prep/standards/html_node/Makefile-Basics.html>:
31#   "GNU distributions usually contain some files which are not source files
32#    ... . Since these files normally appear in the source directory, they
33#    should always appear in the source directory, not in the build directory.
34#    So Makefile rules to update them should put the updated files in the
35#    source directory."
36# Therefore we put this file in the source directory, not the build directory.
37
38# Rules for compiling Pascal programs.
39
40all-local: hello$(EXEEXT)
41
42# How to build the 'hello' program.
43hello$(EXEEXT) $(srcdir)/hello.rsj: $(hello_SOURCES)
44	LOCALEDIR='@localedir@' $(PPC) -o./hello$(EXEEXT) $(hello_SOURCES)
45# Move hello.rsj into $(srcdir). But don't provoke a gratuitous error in a
46# VPATH build with read-only $(srcdir).
47	if test '$(srcdir)' != .; then \
48	  if test -f $(srcdir)/hello.rsj && cmp hello.rsj $(srcdir)/hello.rsj >/dev/null; then \
49	    rm -f hello.rsj; \
50	  else \
51	    mv -f hello.rsj $(srcdir)/hello.rsj; \
52	  fi; \
53	fi
54
55install-exec-local: all-local
56	$(MKDIR_P) $(DESTDIR)$(bindir)
57	$(INSTALL_PROGRAM) hello$(EXEEXT) $(DESTDIR)$(bindir)/hello$(EXEEXT)
58
59installdirs-local:
60	$(MKDIR_P) $(DESTDIR)$(bindir)
61
62uninstall-local:
63	rm -f $(DESTDIR)$(bindir)/hello$(EXEEXT)
64
65# The list of auxiliary files generated during the compilation.
66CLEANFILES = hello.o hello$(EXEEXT)
67
68MAINTAINERCLEANFILES = hello.rsj
69