diff options
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 47 |
1 files changed, 33 insertions, 14 deletions
diff --git a/Makefile.am b/Makefile.am index aeff42f5..b73f532f 100644 --- a/Makefile.am +++ b/Makefile.am @@ -48,7 +48,6 @@ EXTRA_DIST = \ config.rpath \ config.sub \ depcomp \ - extension \ m4 \ missing \ missing_d \ @@ -76,35 +75,48 @@ SUBDIRS = \ awklib \ doc \ po \ + extension \ test # what to make and install -bin_PROGRAMS = gawk pgawk dgawk +bin_PROGRAMS = gawk +include_HEADERS = gawkapi.h -# sources for both gawk and pgawk +# sources for both gawk and dgawk base_sources = \ array.c \ awk.h \ awkgram.y \ builtin.c \ + cint_array.c \ + cmd.h \ + command.y \ custom.h \ + debug.c \ dfa.c \ dfa.h \ + eval.c \ ext.c \ field.c \ floatcomp.c \ floatmagic.h \ + gawkapi.c \ + gawkapi.h \ gawkmisc.c \ getopt.c \ getopt.h \ getopt1.c \ getopt_int.h \ gettext.h \ + int_array.c \ + interpret.h \ io.c \ mbsupport.h \ main.c \ + mpfr.c \ msg.c \ node.c \ + profile.c \ protos.h \ random.c \ random.h \ @@ -112,16 +124,15 @@ base_sources = \ regex.c \ regex.h \ replace.c \ + str_array.c \ + symbol.c \ version.c \ xalloc.h -gawk_SOURCES = $(base_sources) eval.c profile.c -pgawk_SOURCES = $(base_sources) eval_p.c profile_p.c -dgawk_SOURCES = $(base_sources) eval_d.c profile.c cmd.h command.y debug.c +gawk_SOURCES = $(base_sources) # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS. -LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) -dgawk_LDADD = $(LDADD) @LIBREADLINE@ +LDADD = $(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) @LIBREADLINE@ @LIBMPFR@ # Directory for gawk's data files. Automake supplies datadir. pkgdatadir = $(datadir)/awk @@ -129,7 +140,11 @@ pkgdatadir = $(datadir)/awk # stuff for compiling gawk/pgawk DEFPATH='".$(PATH_SEPARATOR)$(pkgdatadir)"' -DEFS= -DDEFPATH=$(DEFPATH) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' +# shared library support: +SHLIBEXT = "\"$(GAWKLIBEXT)"\" +DEFLIBPATH="\"$(pkgextensiondir)\"" + +DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' # Get rid of core files when cleaning CLEANFILES = core core.* @@ -140,7 +155,6 @@ MAINTAINERCLEANFILES = version.c LN= ln # First, add a link from gawk to gawk-X.Y.Z. -# Same for pgawk. # # For GNU systems where gawk is awk, add a link to awk. # (This is done universally, which may not always be right, but @@ -148,7 +162,6 @@ LN= ln install-exec-hook: (cd $(DESTDIR)$(bindir); \ $(LN) gawk$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ - $(LN) pgawk$(EXEEXT) pgawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \ if [ ! -f awk ]; \ then $(LN_S) gawk$(EXEEXT) awk; \ fi; exit 0) @@ -157,12 +170,12 @@ install-exec-hook: uninstall-links: (cd $(DESTDIR)$(bindir); \ if [ -f awk ] && cmp awk gawk$(EXEEXT) > /dev/null; then rm -f awk; fi ; \ - rm -f gawk-$(VERSION)$(EXEEXT) pgawk-$(VERSION)$(EXEEXT); exit 0) + rm -f gawk-$(VERSION)$(EXEEXT); exit 0) uninstall-recursive: uninstall-links # force there to be a gawk executable before running tests -check-local: gawk$(EXEEXT) pgawk$(EXEEXT) +check-local: gawk$(EXEEXT) # A little extra clean up when making distributions. # And additional set up for the pc directory. @@ -177,6 +190,7 @@ dist-hook: # Special rules for individual files # Use of awk instead of $(AWK) is deliberate, in case gawk doesn't build # or work correctly. + awkgram.c: awkgram.y $(YACC) $(AM_YFLAGS) $(YFLAGS) $< sed 's/parse error/syntax error/g' < y.tab.c | awk -f $(srcdir)/bisonfix.awk awkgram > $*.c && rm y.tab.c @@ -200,5 +214,10 @@ diffout valgrind-scan: valgrind: cd test; rm -f log.[0-9]*; \ - make check AWK="valgrind --leak-check=full --log-file=log.%p ../gawk"; \ + make check VALGRIND="valgrind --leak-check=full --log-file=log.%p"; \ + make valgrind-scan + +valgrind-noleak: + cd test; rm -f log.[0-9]*; \ + make check VALGRIND="valgrind --leak-check=no --log-file=log.%p"; \ make valgrind-scan |