"Fossies" - the Fresh Open Source Software Archive

Member "gawk-5.1.0/Makefile.am" (20 Mar 2020, 5893 Bytes) of package /linux/misc/gawk-5.1.0.tar.xz:


As a special service "Fossies" has tried to format the requested text file into HTML format (style: standard) with prefixed line numbers. Alternatively you can here view or download the uninterpreted source code file. See also the latest Fossies "Diffs" side-by-side code changes report for "Makefile.am": 5.0.1_vs_5.1.0.

    1 #
    2 # Makefile.am --- automake input file for gawk
    3 #
    4 # Copyright (C) 2000-2020 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 3 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 
   26 # This variable insures that aclocal runs
   27 # correctly after changing configure.ac
   28 ACLOCAL_AMFLAGS = -I m4
   29 
   30 AM_CFLAGS = @CFLAGS@
   31 AM_LDFLAGS = @LDFLAGS@
   32 
   33 # Stuff to include in the dist that doesn't need it's own
   34 # Makefile.am files
   35 EXTRA_DIST = \
   36 	ChangeLog.0 \
   37 	ChangeLog.1 \
   38 	COPYING \
   39 	INSTALL \
   40 	NEWS \
   41 	NEWS.0 \
   42 	NEWS.1 \
   43 	POSIX.STD \
   44 	README_d \
   45 	config.guess \
   46 	config.rpath  \
   47 	config.sub \
   48 	depcomp \
   49 	m4 \
   50 	missing \
   51 	missing_d \
   52 	po/README \
   53 	pc \
   54 	posix \
   55 	vms \
   56 	ylwrap
   57 
   58 # The order to do things in.
   59 #
   60 # Build in support first, since we need the support library.
   61 #
   62 # Build explicitly in "." in order to build gawk first, so
   63 # that `make check' without a prior `make' works.
   64 SUBDIRS = support .
   65 
   66 # Build in extension before test so that
   67 # 	./configure && make check
   68 # works properly too.
   69 if ENABLE_EXTENSIONS
   70 SUBDIRS += extension
   71 endif
   72 
   73 # Build in awklib after in doc, since we want to extract
   74 # sample files if doc/gawk.texi changed.
   75 SUBDIRS += extras doc awklib po test
   76 
   77 # what to make and install
   78 bin_PROGRAMS = gawk
   79 include_HEADERS = gawkapi.h
   80 BUILT_SOURCES = $(srcdir)/pc/Makefile.tst
   81 
   82 # sources for both gawk and dgawk
   83 base_sources = \
   84 	array.c \
   85 	awk.h \
   86 	awkgram.y \
   87 	builtin.c \
   88 	cint_array.c \
   89 	cmd.h \
   90 	command.y \
   91 	custom.h \
   92 	debug.c \
   93 	eval.c \
   94 	ext.c \
   95 	field.c \
   96 	floatcomp.c \
   97 	floatmagic.h \
   98 	gawkapi.c \
   99 	gawkapi.h \
  100 	gawkmisc.c \
  101 	gettext.h \
  102 	int_array.c \
  103 	interpret.h \
  104 	io.c \
  105 	mbsupport.h \
  106 	main.c \
  107 	mpfr.c \
  108 	msg.c \
  109 	node.c \
  110 	nonposix.h \
  111 	profile.c \
  112 	protos.h \
  113 	re.c \
  114 	replace.c \
  115 	str_array.c \
  116 	symbol.c \
  117 	version.c
  118 
  119 gawk_SOURCES = $(base_sources)
  120 
  121 # Get extra libs as needed, Automake will supply LIBINTL and SOCKET_LIBS.
  122 LDADD = support/libsupport.a \
  123 	$(LIBSIGSEGV) $(LIBINTL) $(SOCKET_LIBS) $(LIBREADLINE) $(LIBMPFR)
  124 
  125 # Directory for gawk's data files. Automake supplies datadir.
  126 pkgdatadir = $(datadir)/awk
  127 
  128 # stuff for compiling gawk/pgawk
  129 DEFPATH='".$(PATH_SEPARATOR)$(pkgdatadir)"'
  130 
  131 # shared library support:
  132 SHLIBEXT = "\"$(GAWKLIBEXT)"\"
  133 DEFLIBPATH="\"$(pkgextensiondir)\""
  134 
  135 DEFS= -DDEFPATH=$(DEFPATH) -DDEFLIBPATH=$(DEFLIBPATH) -DSHLIBEXT=$(SHLIBEXT) -DHAVE_CONFIG_H -DGAWK -DLOCALEDIR='"$(datadir)/locale"' -I"$(srcdir)/support"
  136 
  137 # Get rid of core files when cleaning
  138 CLEANFILES = core core.*
  139 
  140 # We want hard links for install-exec-hook, below
  141 LN= ln
  142 
  143 # For some make's, e.g. OpenBSD, that don't define this
  144 RM = rm -f
  145 
  146 # First, add a link from gawk to gawk-X.Y.Z.
  147 #
  148 # For GNU systems where gawk is awk, add a link to awk.
  149 # (This is done universally, which may not always be right, but
  150 # there's no easy way to distinguish GNU from non-GNU systems.)
  151 #
  152 # Use the transform, in case --program-prefix=XXX
  153 install-exec-hook:
  154 	(cd $(DESTDIR)$(bindir); \
  155 	name=`echo gawk | sed '$(transform)'` ; \
  156 	$(LN) $${name}$(EXEEXT) gawk-$(VERSION)$(EXEEXT) 2>/dev/null ; \
  157 	if [ ! -f awk$(EXEEXT) ]; \
  158 	then	$(LN_S) $${name}$(EXEEXT) awk$(EXEEXT); \
  159 	fi; exit 0)
  160 
  161 # Undo the above when uninstalling
  162 uninstall-links:
  163 	(cd $(DESTDIR)$(bindir); \
  164 	name=`echo gawk | sed '$(transform)'` ; \
  165 	if [ -f awk$(EXEEXT) ] && cmp awk$(EXEEXT) $${name}$(EXEEXT) > /dev/null; then rm -f awk$(EXEEXT); fi ; \
  166 	rm -f gawk-$(VERSION)$(EXEEXT); exit 0)
  167 
  168 uninstall-recursive: uninstall-links
  169 
  170 # force there to be a gawk executable before running tests
  171 check-local: gawk$(EXEEXT)
  172 
  173 # A little extra clean up when making distributions.
  174 dist-hook:
  175 	cd "$(distdir)"/extension ; rm -f *.o *.so
  176 	cd "$(srcdir)"/pc ; \
  177 	chmod u+w config.h ; \
  178 	sed -n -f configpk.sed < ../configure.ac > /tmp/tmp.sed ; \
  179 	sed -f config.sed < ../configh.in > /tmp/config.tmp ; \
  180 	sed -f /tmp/tmp.sed < /tmp/config.tmp > config.h ; \
  181 	$(RM) /tmp/tmp.sed /tmp/config.tmp
  182 	pwd
  183 	chmod u+w "$(distdir)"/pc/config.h
  184 	cp "$(srcdir)"/pc/config.h "$(distdir)"/pc/config.h
  185 
  186 # Special rules for individual files
  187 
  188 $(srcdir)/awkgram.c: awkgram.y
  189 	$(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $<
  190 	sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@
  191 
  192 $(srcdir)/command.c: command.y
  193 	$(YACC) -o $@ -p zz $<
  194 	sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@
  195 
  196 $(srcdir)/pc/Makefile.tst: test/Makefile.in pc/Makefile.tst.prologue pc/GenMakefileTst.awk
  197 	$(AM_V_GEN)$(MKDIR_P) "$(srcdir)"/pc && \
  198 	cat "$(srcdir)"/pc/Makefile.tst.prologue > "$(srcdir)"/pc/Makefile.tst && \
  199 	$(AWK) -f "$(srcdir)"/pc/GenMakefileTst.awk "$(srcdir)"/test/Makefile.in >> "$(srcdir)"/pc/Makefile.tst
  200 
  201 # This is for my development & testing.
  202 efence: gawk
  203 	$(CC) $(AM_LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LDADD) $(LIBS) -lefence
  204 
  205 diffout valgrind-scan zos-diffout:
  206 	@cd test && $(MAKE) $(AM_MAKEFLAGS) $@
  207 
  208 valgrind:
  209 	cd test; rm -f log.[0-9]*; \
  210 	make check VALGRIND="valgrind --leak-check=full --log-file=log.%p"; \
  211 	make valgrind-scan
  212 
  213 valgrind-noleak:
  214 	cd test; rm -f log.[0-9]*; \
  215 	make check VALGRIND="valgrind --leak-check=no --log-file=log.%p"; \
  216 	make valgrind-scan
  217 
  218 spell:
  219 	cd "$(srcdir)"/doc ; $(MAKE) spell
  220 
  221 distclean-local:
  222 	rm -fr .deps