#
-# 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
#
# ----------------------------------------------------------------
# these scripts generate code
-CODE_GENERATOR = \
+core_generator = \
generate_all.py \
generate_common.py \
gr_add_XX.cc.t \
gr_add_const_XX.cc.t \
gr_add_const_XX.h.t \
gr_add_const_XX.i.t \
- gr_add_vXX.cc.t \
- gr_add_vXX.h.t \
- gr_add_vXX.i.t \
gr_add_const_vXX.cc.t \
gr_add_const_vXX.h.t \
gr_add_const_vXX.i.t \
gr_divide_XX.cc.t \
gr_divide_XX.h.t \
gr_divide_XX.i.t \
+ gr_integrate_XX.cc.t \
+ gr_integrate_XX.h.t \
+ gr_integrate_XX.i.t \
gr_max_XX.cc.t \
gr_max_XX.h.t \
gr_max_XX.i.t \
gr_multiply_const_XX.cc.t \
gr_multiply_const_XX.h.t \
gr_multiply_const_XX.i.t \
- gr_multiply_vXX.cc.t \
- gr_multiply_vXX.h.t \
- gr_multiply_vXX.i.t \
gr_multiply_const_vXX.cc.t \
gr_multiply_const_vXX.h.t \
gr_multiply_const_vXX.i.t \
gr_and_XX.cc.t \
gr_and_XX.h.t \
gr_and_XX.i.t \
+ gr_and_const_XX.cc.t \
+ gr_and_const_XX.h.t \
+ gr_and_const_XX.i.t \
gr_or_XX.cc.t \
gr_or_XX.h.t \
gr_or_XX.i.t \
gr_not_XX.cc.t \
gr_not_XX.h.t \
- gr_not_XX.i.t
-
-include Makefile.gen
-
-# 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 $@
-
-
-$(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)
+ gr_not_XX.i.t \
+ gr_moving_average_XX.cc.t \
+ gr_moving_average_XX.h.t \
+ gr_moving_average_XX.i.t
+
+# Source built by Python into $(builddir)
+BUILT_SOURCES = \
+ $(GENERATED_H) \
+ $(GENERATED_I) \
+ $(GENERATED_CC) \
+ gengen_generated.i
# ----------------------------------------------------------------
EXTRA_DIST = \
- $(CODE_GENERATOR) \
- $(STAMPS)
+ $(core_generator)
libgengen_la_SOURCES = \
$(GENERATED_CC)
-#libgengen_qa_la_SOURCES =
-
grinclude_HEADERS = \
$(GENERATED_H) \
gr_endianness.h \
gr_noise_type.h \
gr_sig_source_waveform.h
-noinst_HEADERS =
-
swiginclude_HEADERS = \
$(GENERATED_I) \
gr_endianness.i \
gengen.i \
gengen_generated.i
-CLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc
+# Do creation and inclusion of other Makefiles last
+
+# include the srcdir's Makefile.gen; doing this creates an implicit
+# dependency between $(srcdir)/Makefile.in and $(srcdir)/Makefile.gen.
+include $(srcdir)/Makefile.gen
+
+# common way for generating local Makefile.gen
+makefile_gen_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) do_makefile=1 do_sources=0 $(PYTHON) $(srcdir)/generate_all.py
+include $(top_srcdir)/Makefile.gen.gen
+
+# common way for generating sources from templates when using
+# BUILT_SOURCES, using parallel build protection.
+gen_sources = $(BUILT_SOURCES)
+gen_sources_deps = $(core_generator)
+par_gen_command = PYTHONPATH=$(top_srcdir)/gnuradio-core/src/python srcdir=$(srcdir) $(PYTHON) $(srcdir)/generate_all.py
+include $(top_srcdir)/Makefile.par.gen