1 | #
|
---|
2 | # awklib/Makefile.am --- automake input file for gawk
|
---|
3 | #
|
---|
4 | # Copyright (C) 1995-2005 the Free Software Foundation, Inc.
|
---|
5 | #
|
---|
6 | # This file is part of GAWK, the GNU implementation of the
|
---|
7 | # AWK Programming Language.
|
---|
8 | #
|
---|
9 | # GAWK is free software; you can redistribute it and/or modify
|
---|
10 | # it under the terms of the GNU General Public License as published by
|
---|
11 | # the Free Software Foundation; either version 2 of the License, or
|
---|
12 | # (at your option) any later version.
|
---|
13 | #
|
---|
14 | # GAWK is distributed in the hope that it will be useful,
|
---|
15 | # but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
16 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
17 | # GNU General Public License for more details.
|
---|
18 | #
|
---|
19 | # You should have received a copy of the GNU General Public License
|
---|
20 | # along with this program; if not, write to the Free Software
|
---|
21 | # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
|
---|
22 | #
|
---|
23 |
|
---|
24 | ## process this file with automake to produce Makefile.in
|
---|
25 |
|
---|
26 | EXTRA_DIST = ChangeLog extract.awk eg stamp-eg
|
---|
27 |
|
---|
28 | # Get config.h from the build directory and custom.h from the source directory.
|
---|
29 | AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
|
---|
30 |
|
---|
31 | pkgdatadir = $(datadir)/awk
|
---|
32 | pkglibexecdir = $(libexecdir)/awk
|
---|
33 |
|
---|
34 | bin_SCRIPTS = igawk
|
---|
35 | pkglibexec_PROGRAMS = pwcat grcat
|
---|
36 | AUXAWK = passwd.awk group.awk
|
---|
37 | nodist_grcat_SOURCES = grcat.c
|
---|
38 | nodist_pwcat_SOURCES = pwcat.c
|
---|
39 |
|
---|
40 | all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
|
---|
41 |
|
---|
42 | install-exec-hook: $(AUXAWK)
|
---|
43 | $(mkinstalldirs) $(DESTDIR)$(pkgdatadir)
|
---|
44 | for i in $(AUXAWK) $(srcdir)/eg/lib/*.awk ; do \
|
---|
45 | progname=`echo $$i | sed 's;.*/;;'` ; \
|
---|
46 | $(INSTALL_DATA) $$i $(DESTDIR)$(pkgdatadir)/$$progname ; \
|
---|
47 | done
|
---|
48 |
|
---|
49 | # pkglibexecdir and pkgdatadir are removed in the top level Makefile's uninstall
|
---|
50 | uninstall-local:
|
---|
51 | rm -fr $(DESTDIR)$(pkglibexecdir)/* $(DESTDIR)$(pkgdatadir)/*
|
---|
52 | rm -f $(DESTDIR)$(bindir)/igawk
|
---|
53 |
|
---|
54 | clean-local:
|
---|
55 | rm -f $(AUXAWK) igawk *.exe
|
---|
56 |
|
---|
57 | stamp-eg: $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
|
---|
58 | rm -fr eg stamp-eg
|
---|
59 | $(AWK) -f $(srcdir)/extract.awk $(srcdir)/../doc/gawk.texi $(srcdir)/../doc/gawkinet.texi
|
---|
60 | @echo 'some makes are stupid and will not check a directory' > stamp-eg
|
---|
61 | @echo 'against a file, so this file is a place holder. gack.' >> stamp-eg
|
---|
62 |
|
---|
63 | pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
|
---|
64 | $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
|
---|
65 |
|
---|
66 | grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
|
---|
67 | $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
|
---|
68 |
|
---|
69 | igawk: $(srcdir)/eg/prog/igawk.sh
|
---|
70 | cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
|
---|
71 |
|
---|
72 | passwd.awk: $(srcdir)/eg/lib/passwdawk.in
|
---|
73 | sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk
|
---|
74 |
|
---|
75 | group.awk: $(srcdir)/eg/lib/groupawk.in
|
---|
76 | sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/groupawk.in > group.awk
|
---|