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 /gr-trellis/src/lib | |
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 'gr-trellis/src/lib')
-rw-r--r-- | gr-trellis/src/lib/Makefile.am | 60 |
1 files changed, 21 insertions, 39 deletions
diff --git a/gr-trellis/src/lib/Makefile.am b/gr-trellis/src/lib/Makefile.am index acde93ab9..ea43a37f7 100644 --- a/gr-trellis/src/lib/Makefile.am +++ b/gr-trellis/src/lib/Makefile.am @@ -33,7 +33,7 @@ AM_CPPFLAGS = $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) $(WITH_INCLUDES) # ---------------------------------------------------------------- # these scripts generate trellis codes from template files -CODE_GENERATOR = \ +core_generator = \ generate_all.py \ generate_trellis.py \ trellis_encoder_XX.cc.t \ @@ -49,38 +49,26 @@ CODE_GENERATOR = \ trellis_viterbi_X.h.t \ trellis_viterbi_X.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 +# Source built by Python into $(builddir) +python_built_sources = \ + $(GENERATED_H) \ + $(GENERATED_I) \ + $(GENERATED_CC) \ + trellis_generated.i -# Ensure parallel make does the right thing. -# http://sources.redhat.com/automake/automake.html#Multiple-Outputs - -STAMPS = generate-stamp - -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 -$(GENERATED_H) $(GENERATED_I) $(GENERATED_CC) trellis_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 +STAMPS = +gen_sources = $(python_built_sources) +gen_sources_deps = $(core_generator) +MOSTLYCLEANFILES = $(BUILT_SOURCES) *.pyc +# common way for generating sources from templates, using the above parameters +include $(top_srcdir)/Makefile.gen.gen # These files are built by SWIG. The first is the C++ glue. # The second is the python wrapper that loads the _trellis shared library @@ -90,11 +78,9 @@ swig_built_sources = \ trellis.cc \ trellis.py -BUILT_SOURCES = \ - $(GENERATED_H) \ - $(GENERATED_I) \ - $(GENERATED_CC) \ - $(swig_built_sources) +BUILT_SOURCES = \ + $(python_built_sources) \ + $(swig_built_sources) ALL_IFILES = \ $(LOCAL_IFILES) \ @@ -107,9 +93,7 @@ LOCAL_IFILES = \ $(srcdir)/trellis.i EXTRA_DIST = \ - $(CODE_GENERATOR) \ - $(STAMPS) - + $(core_generator) # This gets trellis.py installed in the right place ourpython_PYTHON = \ @@ -171,8 +155,6 @@ swiginclude_HEADERS = \ trellis_siso_combined_f.i \ trellis_generated.i -CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc - # Don't distribute output of swig dist-hook: @for file in $(swig_built_sources); do echo $(RM) $(distdir)/$$file; done |