summaryrefslogtreecommitdiff
path: root/Makefile.am
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2020-03-06 11:39:03 +0200
committerArnold D. Robbins <arnold@skeeve.com>2020-03-06 11:39:03 +0200
commitca31e4d2c9ff8e874a60e0b9c2d9a488c6f54b43 (patch)
treeb149d561cca40abe3e0a2e0da9baeaa08140a1aa /Makefile.am
parentb2a997f7829dcbeab6fed42bd35f2381531c8e02 (diff)
downloadgawk-ca31e4d2c9ff8e874a60e0b9c2d9a488c6f54b43.tar.gz
Squashed commit of the following:
commit 233cbc2a39b348eb66f70e7806f5fe2ef45db6a8 Author: Arnold D. Robbins <arnold@skeeve.com> Date: Fri Mar 6 11:37:05 2020 +0200 Update ChangeLog files with Jannick's changes. commit 3a6297d5a1e900f8de0ddc6dda5b08770483e318 Author: Arnold D. Robbins <arnold@skeeve.com> Date: Fri Feb 21 13:10:40 2020 +0200 MSYS2 build changes.
Diffstat (limited to 'Makefile.am')
-rw-r--r--Makefile.am22
1 files changed, 11 insertions, 11 deletions
diff --git a/Makefile.am b/Makefile.am
index 3b55ff3b..71177ffa 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -27,8 +27,8 @@
# correctly after changing configure.ac
ACLOCAL_AMFLAGS = -I m4
-# This insures that make flags get passed down to child makes.
-AM_MAKEFLAGS = 'CFLAGS=$(CFLAGS)' 'LDFLAGS=$(LDFLAGS)'
+AM_CFLAGS = @CFLAGS@
+AM_LDFLAGS = @LDFLAGS@
# Stuff to include in the dist that doesn't need it's own
# Makefile.am files
@@ -77,6 +77,7 @@ SUBDIRS += extras doc awklib po test
# what to make and install
bin_PROGRAMS = gawk
include_HEADERS = gawkapi.h
+BUILT_SOURCES = $(srcdir)/pc/Makefile.tst
# sources for both gawk and dgawk
base_sources = \
@@ -170,8 +171,7 @@ uninstall-recursive: uninstall-links
check-local: gawk$(EXEEXT)
# A little extra clean up when making distributions.
-# And additional set up for the pc directory.
-dist-hook: pc/Makefile.tst
+dist-hook:
cd "$(distdir)"/extension ; rm -f *.o *.so
cd "$(srcdir)"/pc ; \
chmod u+w config.h ; \
@@ -185,22 +185,22 @@ dist-hook: pc/Makefile.tst
# Special rules for individual files
-awkgram.c: awkgram.y
+$(srcdir)/awkgram.c: awkgram.y
$(YACC) -o $@ $(AM_YFLAGS) $(YFLAGS) $<
sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@
-command.c: command.y
+$(srcdir)/command.c: command.y
$(YACC) -o $@ -p zz $<
sed 's/parse error/syntax error/g' < $@ > $@.tmp && mv $@.tmp $@
-pc/Makefile.tst: test/Makefile.in
- test -d pc || mkdir pc
- cat "$(top_srcdir)"/pc/Makefile.tst.prologue > pc/Makefile.tst
- awk -f "$(top_srcdir)"/pc/GenMakefileTst.awk "$(top_srcdir)"/test/Makefile.in >> pc/Makefile.tst
+$(srcdir)/pc/Makefile.tst: test/Makefile.in pc/Makefile.tst.prologue pc/GenMakefileTst.awk
+ $(AM_V_GEN)$(MKDIR_P) "$(srcdir)"/pc && \
+ cat "$(srcdir)"/pc/Makefile.tst.prologue > "$(srcdir)"/pc/Makefile.tst && \
+ $(AWK) -f "$(srcdir)"/pc/GenMakefileTst.awk "$(srcdir)"/test/Makefile.in >> "$(srcdir)"/pc/Makefile.tst
# This is for my development & testing.
efence: gawk
- $(CC) $(LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LDADD) $(LIBS) -lefence
+ $(CC) $(AM_LDFLAGS) -o gawk $$(ls *.o | grep -v '_p.o$$') $(LDADD) $(LIBS) -lefence
diffout valgrind-scan:
@cd test && $(MAKE) $(AM_MAKEFLAGS) $@