3 # Copyright (C) 1992, 1993 Free Software Foundation, Inc.
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)
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.
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.
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
31 # Likewise, you can override CFLAGS to optimize, use -Wall, etc.
34 # Ditto for LDFLAGS and LOADLIBES.
51 regex.o: regex.c regex.h
52 $(CC) $(CFLAGS) $(CPPFLAGS) $(DEFS) -I. -I$(srcdir) -c $<
58 rm -f Makefile config.status
60 extraclean:: distclean
61 rm -f patch* *~* *\#* *.orig *.rej *.bak core a.out
63 configure: configure.in
66 config.status: configure
67 sh configure --no-create
69 Makefile: Makefile.in config.status
72 makeargs = $(MFLAGS) CPPFLAGS='$(CPPFLAGS)' CFLAGS='$(CFLAGS)' CC='$(CC)' \
73 DEFS='$(DEFS)' LDFLAGS='$(LDFLAGS)' LOADLIBES='$(LOADLIBES)'
76 mostlyclean clean distclean extraclean realclean \
78 for d in $(subdirs); do (cd $$d; $(MAKE) $(makeargs) $@); done
79 .PHONY: install mostlyclean clean distclean extraclean realclean TAGS check
81 # Prevent GNU make 3 from overflowing arg limit on system V.
84 distfiles = AUTHORS ChangeLog COPYING INSTALL NEWS README \
85 *.in configure regex.c regex.h
86 distdir = regex-$(version)
87 distargs = version=$(version) distdir=../$(distdir)/$$d
89 @echo "Version numbers in: Makefile.in, ChangeLog, NEWS,"
90 @echo " regex.c, regex.h,"
91 @echo " and doc/xregex.texi (if modified)."
94 ln $(distfiles) $(distdir)
95 for d in $(subdirs); do (cd $$d; $(MAKE) $(distargs) dist); done
96 tar czhf $(distdir).tar.Z $(distdir)