9416596c7cb9104628f5034282c5b0e1b8db41ab
[oweals/gnunet.git] / contrib / scripts / Makefile.am
1 # This Makefile.am is in the public domain
2 AM_CPPFLAGS = -I$(top_srcdir)/src/include -I$(top_builddir)/src/include
3
4 SUBDIRS = gnunet-logread
5
6 noinst_SCRIPTS = \
7  terminate.py \
8  pydiffer.py \
9  removetrailingwhitespace.py \
10  gnunet_pyexpect.py \
11  gnunet_janitor.py \
12  gnunet-chk.py \
13  $(AWK_SCRIPTS)
14
15 if HAVE_AWK
16 AWK_SCRIPTS = \
17  check-texinfo.awk
18 else
19 AWK_SCRIPTS =
20 endif
21
22 bin_SCRIPTS = \
23  gnunet-bugreport \
24  gnunet-suidfix
25
26 EXTRA_DIST = \
27  coverage.sh \
28  terminate.py.in \
29  gnunet_pyexpect.py.in \
30  gnunet_janitor.py.in \
31  gnunet-chk.py.in \
32  $(SCRIPTS) \
33  removetrailingwhitespace.py.in \
34  pydiffer.py.in \
35  gnunet-suidfix \
36  check-texinfo.awk.in
37
38 CLEANFILES = \
39   $(noinst_SCRIPTS)
40
41 do_subst = $(AWK) -v py="$(PYTHON)" -v awkay="$(AWK_BINARY)" '{if (/@AWKEXE@/) { gsub("@AWKEXE@",awkay)}; gsub("@PYTHONEXE@",py); print $$0}'
42
43 # Use SUFFIX Extension rules, they are more portable for every
44 # implementation of 'make'.
45 # You'll also run into the "'%' is a GNU make extension warning"
46 # if you use this:
47 #
48 #%.py: %.py.in Makefile
49 #       $(do_subst) < $< > $@
50 #       chmod +x $@
51 #
52 # instead of this:
53 SUFFIXES = .py.in .py
54
55 .py.in.py:
56         $(do_subst) < $< > $@
57         chmod +x $@
58
59 if HAVE_AWK
60 check-texinfo.awk: check-texinfo.awk.in Makefile
61         $(do_subst) < $(srcdir)/check-texinfo.awk.in > check-texinfo.awk
62         chmod +x check-texinfo.awk
63 endif