[project @ 1996-01-08 20:28:12 by partain]
[ghc-hetmet.git] / ghc / runtime / regex / Makefile.in
1 # Makefile for regex.
2
3 # Copyright (C) 1992, 1993 Free Software Foundation, Inc.
4 #
5 # This program is free software; you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation; either version 2, or (at your option)
8 # any later version.
9 #
10 # This program is distributed in the hope that it will be useful,
11 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13 # GNU General Public License for more details.
14 #
15 # You should have received a copy of the GNU General Public License
16 # along with this program; if not, write to the Free Software
17 # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
18
19 version = 0.12
20
21 # You can define CPPFLAGS on the command line.  Aside from system-specific
22 # flags, you can define:
23 #   -DREGEX_MALLOC to use malloc/realloc/free instead of alloca.
24 #   -DDEBUG to enable the compiled pattern disassembler and execution
25 #           tracing; code runs substantially slower.
26 #   -DEXTRACT_MACROS to use the macros EXTRACT_* (as opposed to
27 #           the corresponding C procedures).  If not -DDEBUG, the macros
28 #           are used.
29 #   -DPERLSYNTAX to enable perl-like syntax in regular expressions
30 #                (see PerlSyntax)
31 #
32 CPPFLAGS = -DPERLSYNTAX
33
34 # Likewise, you can override CFLAGS to optimize, use -Wall, etc.
35 CFLAGS = -g
36
37 # Ditto for LDFLAGS and LOADLIBES.
38 LDFLAGS =
39 LOADLIBES =
40
41 srcdir = @srcdir@
42 VPATH = @srcdir@
43
44 CC = @CC@
45 DEFS = @DEFS@
46
47 SHELL = /bin/sh
48
49 subdirs = doc test
50
51 default all:: regex.o
52 .PHONY: default all
53
54 regex.o: regex.c regex.h
55         $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
56
57 clean mostlyclean::
58         rm -f *.o
59
60 distclean:: clean
61         rm -f Makefile config.status
62
63 extraclean:: distclean
64         rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
65
66 configure: configure.in
67         autoconf
68
69 config.status: configure
70         sh configure --no-create
71
72 Makefile: Makefile.in config.status
73         sh config.status
74
75 makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
76 DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
77
78 default all install \
79 mostlyclean clean distclean extraclean realclean \
80 TAGS check::
81         for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
82 .PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
83
84 # Prevent GNU make 3 from overflowing arg limit on system V.
85 .NOEXPORT:
86
87 distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
88             *.in configure regex.c regex.h 
89 distdir = regex-$(version)
90 distargs = version=$(version) distdir=../$(distdir)/$$d
91 dist: TAGS configure
92         @echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
93         @echo "  regex.c, regex.h,"
94         @echo "  and doc/xregex.texi (if modified)."
95         rm -rf $(distdir)
96         mkdir $(distdir)
97         ln $(distfiles) $(distdir)
98         for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
99         tar czhf $(distdir).tar.Z $(distdir)
100         rm -rf $(distdir)
101 .PHONY: dist