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