diff options
author | eb | 2009-02-25 21:58:41 +0000 |
---|---|---|
committer | eb | 2009-02-25 21:58:41 +0000 |
commit | 4d192c227e6c7a00b82aef4aca71a3a77ac0dbd1 (patch) | |
tree | 046d96d87a19b3e45c23ba74aecce057ab8f5292 /gnuradio-core/src/lib/gengen/Makefile.am | |
parent | 274f8a56f0d2bad59fb8cef6a11431ccfe6a1e6e (diff) | |
download | gnuradio-4d192c227e6c7a00b82aef4aca71a3a77ac0dbd1.tar.gz gnuradio-4d192c227e6c7a00b82aef4aca71a3a77ac0dbd1.tar.bz2 gnuradio-4d192c227e6c7a00b82aef4aca71a3a77ac0dbd1.zip |
Merged mld/fix_makefile_gen -r10446:10509 to trunk. This cleans up
the generation of the Makefile.gen's that occurs in gr-trellis,
lib/gengen and lib/filter.
If you change any code generator such that it generates a different
set of generated file names, you must execute "make generate-makefile"
in a non-VPATH build to regenerate the Makefile.gen's. Once they are
regenerated, commit them to the repo.
git-svn-id: http://gnuradio.org/svn/gnuradio/trunk@10511 221aa14e-8319-0410-a670-987f0aec2ac5
Diffstat (limited to 'gnuradio-core/src/lib/gengen/Makefile.am')
-rw-r--r-- | gnuradio-core/src/lib/gengen/Makefile.am | 55 |
1 files changed, 21 insertions, 34 deletions
diff --git a/gnuradio-core/src/lib/gengen/Makefile.am b/gnuradio-core/src/lib/gengen/Makefile.am index aaf9dd5fc..85ab94f38 100644 --- a/gnuradio-core/src/lib/gengen/Makefile.am +++ b/gnuradio-core/src/lib/gengen/Makefile.am @@ -1,5 +1,5 @@ # -# Copyright 2001,2002,2004,2006,2007,2008 Free Software Foundation, Inc. +# Copyright 2001,2002,2004,2006,2007,2008,2009 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -29,7 +29,7 @@ noinst_LTLIBRARIES = libgengen.la # ---------------------------------------------------------------- # these scripts generate code -CODE_GENERATOR = \ +core_generator = \ generate_all.py \ generate_common.py \ gr_add_XX.cc.t \ @@ -117,46 +117,33 @@ CODE_GENERATOR = \ gr_moving_average_XX.h.t \ gr_moving_average_XX.i.t -include Makefile.gen +# include the srcdir's Makefile.gen; doing this creates an implicit +# dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen. +include $(srcdir)/Makefile.gen -# Ensure parallel make does the right thing. -# http://sources.redhat.com/automake/automake.html#Multiple-Outputs +# Source built by Python into $(builddir) +python_built_sources = \ + $(GENERATED_H) \ + $(GENERATED_I) \ + $(GENERATED_CC) \ + gengen_generated.i -STAMPS = generate-stamp +BUILT_SOURCES = $(python_built_sources) -generate-stamp: $(CODE_GENERATOR) - @rm -f generate-tmp - @touch generate-tmp - PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py - @mv -f generate-tmp $@ +# Required when including Makefile.gen.gen +STAMPS = +gen_sources = $(BUILT_SOURCES) +gen_sources_deps = $(core_generator) +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc -$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC) gengen_generated.i : generate-stamp -## Recover from the removal of $@ - @if test -f $@; then :; else \ - trap 'rm -rf generate-lock generate-stamp' 1 2 13 15; \ - if mkdir generate-lock 2>/dev/null; then \ -## This code is being executed by the first process. - rm -f generate-stamp; \ - $(MAKE) $(AM_MAKEFLAGS) generate-stamp; \ - rmdir generate-lock; \ - else \ -## This code is being executed by the follower processes. -## Wait until the first process is done. - while test -d generate-lock; do sleep 1; done; \ -## Succeed if and only if the first process succeeded. - test -f generate-stamp; exit $$?; \ - fi; \ - fi - - -BUILT_SOURCES = $(GENERATED_H) $(GENERATED_I) $(GENERATED_CC) +# common way for generating sources from templates, using the above parameters +include $(top_srcdir)/Makefile.gen.gen # ---------------------------------------------------------------- EXTRA_DIST = \ - $(CODE_GENERATOR) \ - $(STAMPS) + $(core_generator) libgengen_la_SOURCES = \ $(GENERATED_CC) @@ -177,4 +164,4 @@ swiginclude_HEADERS = \ gengen.i \ gengen_generated.i -CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc +CLEANFILES = $(BUILT_SOURCES) *.pyc |