source: trunk/essentials/sys-apps/gawk/awklib/Makefile.am

Last change on this file was 3076, checked in by bird, 18 years ago

gawk 3.1.5

File size: 2.7 KB
Line 
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
26EXTRA_DIST = ChangeLog extract.awk eg stamp-eg
27
28# Get config.h from the build directory and custom.h from the source directory.
29AM_CPPFLAGS = -I$(top_builddir) -I$(top_srcdir)
30
31pkgdatadir = $(datadir)/awk
32pkglibexecdir = $(libexecdir)/awk
33
34bin_SCRIPTS = igawk
35pkglibexec_PROGRAMS = pwcat grcat
36AUXAWK = passwd.awk group.awk
37nodist_grcat_SOURCES = grcat.c
38nodist_pwcat_SOURCES = pwcat.c
39
40all: stamp-eg $(AUXPROGS) igawk $(AUXAWK)
41
42install-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
50uninstall-local:
51 rm -fr $(DESTDIR)$(pkglibexecdir)/* $(DESTDIR)$(pkgdatadir)/*
52 rm -f $(DESTDIR)$(bindir)/igawk
53
54clean-local:
55 rm -f $(AUXAWK) igawk *.exe
56
57stamp-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
63pwcat$(EXEEXT): $(srcdir)/eg/lib/pwcat.c
64 $(COMPILE) $(srcdir)/eg/lib/pwcat.c $(LDFLAGS) -o $@
65
66grcat$(EXEEXT): $(srcdir)/eg/lib/grcat.c
67 $(COMPILE) $(srcdir)/eg/lib/grcat.c $(LDFLAGS) -o $@
68
69igawk: $(srcdir)/eg/prog/igawk.sh
70 cp $(srcdir)/eg/prog/igawk.sh $@ ; chmod 755 $@
71
72passwd.awk: $(srcdir)/eg/lib/passwdawk.in
73 sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/passwdawk.in > passwd.awk
74
75group.awk: $(srcdir)/eg/lib/groupawk.in
76 sed 's;/usr/local/libexec/awk;$(pkglibexecdir);' < $(srcdir)/eg/lib/groupawk.in > group.awk
Note: See TracBrowser for help on using the repository browser.