diff options
23 files changed, 199 insertions, 886 deletions
diff --git a/gnuradio-core/src/lib/swig/Makefile.swig.gen b/gnuradio-core/src/lib/swig/Makefile.swig.gen index 5846134a9..032d13857 100644 --- a/gnuradio-core/src/lib/swig/Makefile.swig.gen +++ b/gnuradio-core/src/lib/swig/Makefile.swig.gen @@ -41,12 +41,12 @@ gnuradio_swig_py_runtime_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_runtime_pyli # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_runtime_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_runtime_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_runtime # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_runtime_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_runtime_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,6 +144,7 @@ python/gnuradio_swig_py_runtime.lo: gnuradio_swig_py_runtime.lo: gnuradio_swig_py_runtime.py gnuradio_swig_py_runtime.scm gnuradio_swig_py_runtime.py: gnuradio_swig_py_runtime.i +-include python/gnuradio_swig_py_runtime.d # -*- Makefile -*- # @@ -188,12 +189,12 @@ gnuradio_swig_py_general_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_general_pyli # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_general_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_general_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_general # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_general_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_general_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -291,6 +292,7 @@ python/gnuradio_swig_py_general.lo: gnuradio_swig_py_general.lo: gnuradio_swig_py_general.py gnuradio_swig_py_general.scm gnuradio_swig_py_general.py: gnuradio_swig_py_general.i +-include python/gnuradio_swig_py_general.d # -*- Makefile -*- # @@ -335,12 +337,12 @@ gnuradio_swig_py_gengen_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_gengen_pylibd # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_gengen_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_gengen_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_gengen # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_gengen_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_gengen_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -438,6 +440,7 @@ python/gnuradio_swig_py_gengen.lo: gnuradio_swig_py_gengen.lo: gnuradio_swig_py_gengen.py gnuradio_swig_py_gengen.scm gnuradio_swig_py_gengen.py: gnuradio_swig_py_gengen.i +-include python/gnuradio_swig_py_gengen.d # -*- Makefile -*- # @@ -482,12 +485,12 @@ gnuradio_swig_py_filter_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_filter_pylibd # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_filter_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_filter_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_filter # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_filter_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_filter_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -585,6 +588,7 @@ python/gnuradio_swig_py_filter.lo: gnuradio_swig_py_filter.lo: gnuradio_swig_py_filter.py gnuradio_swig_py_filter.scm gnuradio_swig_py_filter.py: gnuradio_swig_py_filter.i +-include python/gnuradio_swig_py_filter.d # -*- Makefile -*- # @@ -629,12 +633,12 @@ gnuradio_swig_py_io_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_io_pylibdir_categ # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_io_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_io_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_io # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_io_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_io_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -732,6 +736,7 @@ python/gnuradio_swig_py_io.lo: gnuradio_swig_py_io.lo: gnuradio_swig_py_io.py gnuradio_swig_py_io.scm gnuradio_swig_py_io.py: gnuradio_swig_py_io.i +-include python/gnuradio_swig_py_io.d # -*- Makefile -*- # @@ -776,12 +781,12 @@ gnuradio_swig_py_hier_pylibdir = $(pyexecdir)/$(gnuradio_swig_py_hier_pylibdir_c # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_hier_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gnuradio_swig_py_hier_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gnuradio_swig_py_hier # FIXME: determince whether these should be installed with gnuradio. -gnuradio_swig_py_hier_scmdir = @GUILE_PKDATADIR@/gnuradio +gnuradio_swig_py_hier_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -879,4 +884,5 @@ python/gnuradio_swig_py_hier.lo: gnuradio_swig_py_hier.lo: gnuradio_swig_py_hier.py gnuradio_swig_py_hier.scm gnuradio_swig_py_hier.py: gnuradio_swig_py_hier.i +-include python/gnuradio_swig_py_hier.d diff --git a/gr-atsc/src/lib/Makefile.swig.gen b/gr-atsc/src/lib/Makefile.swig.gen index 440366fd8..feb978673 100644 --- a/gr-atsc/src/lib/Makefile.swig.gen +++ b/gr-atsc/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ atsc_pylibdir = $(pyexecdir)/$(atsc_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -atsc_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +atsc_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/atsc # FIXME: determince whether these should be installed with gnuradio. -atsc_scmdir = @GUILE_PKDATADIR@/gnuradio +atsc_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/atsc.lo: atsc.lo: atsc.py atsc.scm atsc.py: atsc.i +-include python/atsc.d diff --git a/gr-audio-alsa/src/Makefile.swig.gen b/gr-audio-alsa/src/Makefile.swig.gen index faee38cae..6ba31a113 100644 --- a/gr-audio-alsa/src/Makefile.swig.gen +++ b/gr-audio-alsa/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_alsa_pylibdir = $(pyexecdir)/$(audio_alsa_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_alsa_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_alsa_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_alsa # FIXME: determince whether these should be installed with gnuradio. -audio_alsa_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_alsa_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_alsa.lo: audio_alsa.lo: audio_alsa.py audio_alsa.scm audio_alsa.py: audio_alsa.i +-include python/audio_alsa.d diff --git a/gr-audio-jack/src/Makefile.swig.gen b/gr-audio-jack/src/Makefile.swig.gen index 0c14aa4c6..5da7fce3e 100644 --- a/gr-audio-jack/src/Makefile.swig.gen +++ b/gr-audio-jack/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_jack_pylibdir = $(pyexecdir)/$(audio_jack_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_jack_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_jack_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_jack # FIXME: determince whether these should be installed with gnuradio. -audio_jack_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_jack_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_jack.lo: audio_jack.lo: audio_jack.py audio_jack.scm audio_jack.py: audio_jack.i +-include python/audio_jack.d diff --git a/gr-audio-oss/src/Makefile.swig.gen b/gr-audio-oss/src/Makefile.swig.gen index f366ff0a2..9262ca432 100644 --- a/gr-audio-oss/src/Makefile.swig.gen +++ b/gr-audio-oss/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_oss_pylibdir = $(pyexecdir)/$(audio_oss_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_oss_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_oss_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_oss # FIXME: determince whether these should be installed with gnuradio. -audio_oss_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_oss_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_oss.lo: audio_oss.lo: audio_oss.py audio_oss.scm audio_oss.py: audio_oss.i +-include python/audio_oss.d diff --git a/gr-audio-osx/src/Makefile.swig.gen b/gr-audio-osx/src/Makefile.swig.gen index 448fa77e0..c4a55ccca 100644 --- a/gr-audio-osx/src/Makefile.swig.gen +++ b/gr-audio-osx/src/Makefile.swig.gen @@ -38,6 +38,16 @@ audio_osx_pylibdir_category ?= $(audio_osx_pythondir_category) audio_osx_pythondir = $(pythondir)/$(audio_osx_pythondir_category) audio_osx_pylibdir = $(pyexecdir)/$(audio_osx_pylibdir_category) +# The .so libraries for the guile modules get installed whereever guile +# is installed, usually /usr/lib/guile/gnuradio/ +# FIXME: determince whether these should be installed with gnuradio. +audio_osx_scmlibdir = $(libdir)/guile/gnuradio + +# The scm files for the guile modules get installed where ever guile +# is installed, usually /usr/share/guile/site/audio_osx +# FIXME: determince whether these should be installed with gnuradio. +audio_osx_scmdir = $(guiledir)/gnuradio + ## SWIG headers are always installed into the same directory. audio_osx_swigincludedir = $(swigincludedir) @@ -72,7 +82,12 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += audio_osx.py audio_osx_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += audio_osx.py +if GUILE +swig_built_sources += audio_osx.scm +endif ## Various SWIG variables. These can be overloaded in the including ## Makefile.am by setting the variable value there, then including @@ -83,208 +98,51 @@ audio_osx_swiginclude_HEADERS = \ $(audio_osx_swiginclude_headers) audio_osx_pylib_LTLIBRARIES = \ - _audio_osx_python.la + _audio_osx.la -_audio_osx_python_la_SOURCES = \ - audio_osx_python.cc \ +_audio_osx_la_SOURCES = \ + python/audio_osx.cc \ $(audio_osx_la_swig_sources) -_audio_osx_python_la_LIBADD = \ +_audio_osx_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(audio_osx_la_swig_libadd) -_audio_osx_python_la_LDFLAGS = \ +# _audio_osx_la_DEPENDENCIES = python/audio_osx.lo + +_audio_osx_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(audio_osx_la_swig_ldflags) -_audio_osx_python_la_CXXFLAGS = \ +_audio_osx_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(audio_osx_la_swig_cxxflags) audio_osx_python_PYTHON = \ audio_osx.py \ - $(audio_osx_python) + $(audio_osx) if GUILE -audio_osx_pylib_LTLIBRARIES += _audio_osx_guile.la - -_audio_osx_guile_la_SOURCES = \ - audio_osx_guile.cc \ +audio_osx_scmlib_LTLIBRARIES = audio_osx_guile.la +audio_osx_guile_la_SOURCES = \ + guile/audio_osx.cc \ $(audio_osx_la_swig_sources) +audio_osx_scm_DATA = audio_osx.scm # Guile can use the same flags as python does -_audio_osx_guile_la_LIBADD = $(_audio_osx_python_la_LIBADD) -_audio_osx_guile_la_LDFLAGS = $(_audio_osx_python_la_LDFLAGS) -_audio_osx_guile_la_CXXFLAGS = $(_audio_osx_python_la_CXXFLAGS) - -endif # end of GUILE +audio_osx_guile_la_LIBADD = $(_audio_osx_la_LIBADD) +audio_osx_guile_la_LDFLAGS = $(_audio_osx_la_LDFLAGS) +audio_osx_guile_la_CXXFLAGS = $(_audio_osx_la_CXXFLAGS) -## Entry rule for running SWIG +guile/audio_osx.lo: audio_osx.lo +audio_osx.scm: audio_osx.i -audio_osx.h audio_osx.py audio_osx_python.cc: audio_osx.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/audio_osx-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/audio_osx-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/audio_osx-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/audio_osx-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_osx-generate-python-stamp WHAT=$<; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/audio_osx-generate-guile-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/audio_osx-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/audio_osx-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/audio_osx-generate-python-stamp; \ - exit $$?; \ - fi; - -$(DEPDIR)/audio_osx-generate-guile-stamp: - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(audio_osx_swig_args) \ - -MD -MF $(DEPDIR)/audio_osx.Std \ - -module audio_osx -o audio_osx_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/audio_osx.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_osx.Std \ - > $(DEPDIR)/audio_osx.Sd; \ - $(RM) $(DEPDIR)/audio_osx.Std; \ - $(MV) $(DEPDIR)/audio_osx.Sd $(DEPDIR)/audio_osx.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/audio_osx.S*; exit 1; \ - fi; - touch $(DEPDIR)/audio_osx-generate-guile-stamp - -$(DEPDIR)/audio_osx-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(audio_osx_swig_args) \ - -MD -MF $(DEPDIR)/audio_osx.Std \ - -module audio_osx -o audio_osx_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/audio_osx.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/audio_osx.Std \ - > $(DEPDIR)/audio_osx.Sd; \ - $(RM) $(DEPDIR)/audio_osx.Std; \ - $(MV) $(DEPDIR)/audio_osx.Sd $(DEPDIR)/audio_osx.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/audio_osx.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/audio_osx.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/audio_osx.Std $(DEPDIR)/audio_osx.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/audio_osx.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/audio_osx.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/audio_osx.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/audio_osx.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/audio_osx-generate-python-stamp +endif # end of GUILE -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. +python/audio_osx.lo: +audio_osx.lo: audio_osx.py audio_osx.scm +audio_osx.py: audio_osx.i -@am__include@ @am__quote@./$(DEPDIR)/audio_osx.d@am__quote@ +-include python/audio_osx.d diff --git a/gr-audio-portaudio/src/Makefile.swig.gen b/gr-audio-portaudio/src/Makefile.swig.gen index 42da0e199..17d4624de 100644 --- a/gr-audio-portaudio/src/Makefile.swig.gen +++ b/gr-audio-portaudio/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_portaudio_pylibdir = $(pyexecdir)/$(audio_portaudio_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_portaudio_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_portaudio # FIXME: determince whether these should be installed with gnuradio. -audio_portaudio_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_portaudio_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_portaudio.lo: audio_portaudio.lo: audio_portaudio.py audio_portaudio.scm audio_portaudio.py: audio_portaudio.i +-include python/audio_portaudio.d diff --git a/gr-audio-windows/src/Makefile.swig.gen b/gr-audio-windows/src/Makefile.swig.gen index 1573de3c1..5646fd553 100644 --- a/gr-audio-windows/src/Makefile.swig.gen +++ b/gr-audio-windows/src/Makefile.swig.gen @@ -41,12 +41,12 @@ audio_windows_pylibdir = $(pyexecdir)/$(audio_windows_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -audio_windows_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +audio_windows_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/audio_windows # FIXME: determince whether these should be installed with gnuradio. -audio_windows_scmdir = @GUILE_PKDATADIR@/gnuradio +audio_windows_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/audio_windows.lo: audio_windows.lo: audio_windows.py audio_windows.scm audio_windows.py: audio_windows.i +-include python/audio_windows.d diff --git a/gr-comedi/src/Makefile.swig.gen b/gr-comedi/src/Makefile.swig.gen index 380c93366..841f51805 100644 --- a/gr-comedi/src/Makefile.swig.gen +++ b/gr-comedi/src/Makefile.swig.gen @@ -41,12 +41,12 @@ comedi_pylibdir = $(pyexecdir)/$(comedi_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -comedi_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +comedi_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/comedi # FIXME: determince whether these should be installed with gnuradio. -comedi_scmdir = @GUILE_PKDATADIR@/gnuradio +comedi_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/comedi.lo: comedi.lo: comedi.py comedi.scm comedi.py: comedi.i +-include python/comedi.d diff --git a/gr-cvsd-vocoder/src/lib/Makefile.swig.gen b/gr-cvsd-vocoder/src/lib/Makefile.swig.gen index 9ddd6c5d1..e14c6573c 100644 --- a/gr-cvsd-vocoder/src/lib/Makefile.swig.gen +++ b/gr-cvsd-vocoder/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ cvsd_vocoder_pylibdir = $(pyexecdir)/$(cvsd_vocoder_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -cvsd_vocoder_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +cvsd_vocoder_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/cvsd_vocoder # FIXME: determince whether these should be installed with gnuradio. -cvsd_vocoder_scmdir = @GUILE_PKDATADIR@/gnuradio +cvsd_vocoder_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/cvsd_vocoder.lo: cvsd_vocoder.lo: cvsd_vocoder.py cvsd_vocoder.scm cvsd_vocoder.py: cvsd_vocoder.i +-include python/cvsd_vocoder.d diff --git a/gr-gcell/src/Makefile.swig.gen b/gr-gcell/src/Makefile.swig.gen index 3f04b83a1..fae7e4b7d 100644 --- a/gr-gcell/src/Makefile.swig.gen +++ b/gr-gcell/src/Makefile.swig.gen @@ -41,12 +41,12 @@ gcell_pylibdir = $(pyexecdir)/$(gcell_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gcell_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gcell_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gcell # FIXME: determince whether these should be installed with gnuradio. -gcell_scmdir = @GUILE_PKDATADIR@/gnuradio +gcell_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/gcell.lo: gcell.lo: gcell.py gcell.scm gcell.py: gcell.i +-include python/gcell.d diff --git a/gr-gsm-fr-vocoder/src/lib/Makefile.swig.gen b/gr-gsm-fr-vocoder/src/lib/Makefile.swig.gen index 412b103d7..5ff23b78b 100644 --- a/gr-gsm-fr-vocoder/src/lib/Makefile.swig.gen +++ b/gr-gsm-fr-vocoder/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ gsm_full_rate_pylibdir = $(pyexecdir)/$(gsm_full_rate_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -gsm_full_rate_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +gsm_full_rate_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/gsm_full_rate # FIXME: determince whether these should be installed with gnuradio. -gsm_full_rate_scmdir = @GUILE_PKDATADIR@/gnuradio +gsm_full_rate_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/gsm_full_rate.lo: gsm_full_rate.lo: gsm_full_rate.py gsm_full_rate.scm gsm_full_rate.py: gsm_full_rate.i +-include python/gsm_full_rate.d diff --git a/gr-msdd6000/src/Makefile.swig.gen b/gr-msdd6000/src/Makefile.swig.gen index 557bff515..c62140a08 100644 --- a/gr-msdd6000/src/Makefile.swig.gen +++ b/gr-msdd6000/src/Makefile.swig.gen @@ -41,12 +41,12 @@ msdd_pylibdir = $(pyexecdir)/$(msdd_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -msdd_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +msdd_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/msdd # FIXME: determince whether these should be installed with gnuradio. -msdd_scmdir = @GUILE_PKDATADIR@/gnuradio +msdd_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,6 +144,7 @@ python/msdd.lo: msdd.lo: msdd.py msdd.scm msdd.py: msdd.i +-include python/msdd.d # -*- Makefile -*- # @@ -188,12 +189,12 @@ msdd_rs_pylibdir = $(pyexecdir)/$(msdd_rs_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -msdd_rs_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +msdd_rs_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/msdd_rs # FIXME: determince whether these should be installed with gnuradio. -msdd_rs_scmdir = @GUILE_PKDATADIR@/gnuradio +msdd_rs_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -291,4 +292,5 @@ python/msdd_rs.lo: msdd_rs.lo: msdd_rs.py msdd_rs.scm msdd_rs.py: msdd_rs.i +-include python/msdd_rs.d diff --git a/gr-noaa/swig/Makefile.swig.gen b/gr-noaa/swig/Makefile.swig.gen index 0462fcecd..8b7049e1e 100644 --- a/gr-noaa/swig/Makefile.swig.gen +++ b/gr-noaa/swig/Makefile.swig.gen @@ -41,12 +41,12 @@ noaa_swig_pylibdir = $(pyexecdir)/$(noaa_swig_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -noaa_swig_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +noaa_swig_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/noaa_swig # FIXME: determince whether these should be installed with gnuradio. -noaa_swig_scmdir = @GUILE_PKDATADIR@/gnuradio +noaa_swig_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/noaa_swig.lo: noaa_swig.lo: noaa_swig.py noaa_swig.scm noaa_swig.py: noaa_swig.i +-include python/noaa_swig.d diff --git a/gr-pager/swig/Makefile.swig.gen b/gr-pager/swig/Makefile.swig.gen index feddc65de..93d9fcdc0 100644 --- a/gr-pager/swig/Makefile.swig.gen +++ b/gr-pager/swig/Makefile.swig.gen @@ -41,12 +41,12 @@ pager_swig_pylibdir = $(pyexecdir)/$(pager_swig_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -pager_swig_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +pager_swig_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/pager_swig # FIXME: determince whether these should be installed with gnuradio. -pager_swig_scmdir = @GUILE_PKDATADIR@/gnuradio +pager_swig_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/pager_swig.lo: pager_swig.lo: pager_swig.py pager_swig.scm pager_swig.py: pager_swig.i +-include python/pager_swig.d diff --git a/gr-qtgui/src/lib/Makefile.swig.gen b/gr-qtgui/src/lib/Makefile.swig.gen index 5b66e6e0c..866dd3e6f 100644 --- a/gr-qtgui/src/lib/Makefile.swig.gen +++ b/gr-qtgui/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ qtgui_pylibdir = $(pyexecdir)/$(qtgui_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -qtgui_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +qtgui_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/qtgui # FIXME: determince whether these should be installed with gnuradio. -qtgui_scmdir = @GUILE_PKDATADIR@/gnuradio +qtgui_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/qtgui.lo: qtgui.lo: qtgui.py qtgui.scm qtgui.py: qtgui.i +-include python/qtgui.d diff --git a/gr-radio-astronomy/src/lib/Makefile.swig.gen b/gr-radio-astronomy/src/lib/Makefile.swig.gen index b1d0ce95a..f83f4c58e 100644 --- a/gr-radio-astronomy/src/lib/Makefile.swig.gen +++ b/gr-radio-astronomy/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ ra_pylibdir = $(pyexecdir)/$(ra_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -ra_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +ra_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/ra # FIXME: determince whether these should be installed with gnuradio. -ra_scmdir = @GUILE_PKDATADIR@/gnuradio +ra_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/ra.lo: ra.lo: ra.py ra.scm ra.py: ra.i +-include python/ra.d diff --git a/gr-trellis/src/lib/Makefile.swig.gen b/gr-trellis/src/lib/Makefile.swig.gen index 0da0b5c81..62762fa13 100644 --- a/gr-trellis/src/lib/Makefile.swig.gen +++ b/gr-trellis/src/lib/Makefile.swig.gen @@ -41,12 +41,12 @@ trellis_pylibdir = $(pyexecdir)/$(trellis_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -trellis_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +trellis_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/trellis # FIXME: determince whether these should be installed with gnuradio. -trellis_scmdir = @GUILE_PKDATADIR@/gnuradio +trellis_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/trellis.lo: trellis.lo: trellis.py trellis.scm trellis.py: trellis.i +-include python/trellis.d diff --git a/gr-uhd/swig/Makefile.swig.gen b/gr-uhd/swig/Makefile.swig.gen index d10f6baa5..e06723814 100644 --- a/gr-uhd/swig/Makefile.swig.gen +++ b/gr-uhd/swig/Makefile.swig.gen @@ -41,12 +41,12 @@ uhd_swig_pylibdir = $(pyexecdir)/$(uhd_swig_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +uhd_swig_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/uhd_swig # FIXME: determince whether these should be installed with gnuradio. -uhd_swig_scmdir = @GUILE_PKDATADIR@/gnuradio +uhd_swig_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -82,9 +82,11 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += uhd_swig.py uhd_swig_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += uhd_swig.py if GUILE -swig_built_sources += uhd_swig.scm uhd_swig_guile.cc +swig_built_sources += uhd_swig.scm endif ## Various SWIG variables. These can be overloaded in the including @@ -96,243 +98,51 @@ uhd_swig_swiginclude_HEADERS = \ $(uhd_swig_swiginclude_headers) uhd_swig_pylib_LTLIBRARIES = \ - _uhd_swig_python.la + _uhd_swig.la -_uhd_swig_python_la_SOURCES = \ - uhd_swig_python.cc \ +_uhd_swig_la_SOURCES = \ + python/uhd_swig.cc \ $(uhd_swig_la_swig_sources) -_uhd_swig_python_la_LIBADD = \ +_uhd_swig_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(uhd_swig_la_swig_libadd) -_uhd_swig_python_la_LDFLAGS = \ +# _uhd_swig_la_DEPENDENCIES = python/uhd_swig.lo + +_uhd_swig_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(uhd_swig_la_swig_ldflags) -_uhd_swig_python_la_CXXFLAGS = \ +_uhd_swig_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(uhd_swig_la_swig_cxxflags) uhd_swig_python_PYTHON = \ uhd_swig.py \ - $(uhd_swig_python) + $(uhd_swig) if GUILE -uhd_swig_scmlib_LTLIBRARIES = _uhd_swig_guile.la -_uhd_swig_guile_la_SOURCES = \ - uhd_swig_guile.cc \ +uhd_swig_scmlib_LTLIBRARIES = uhd_swig_guile.la +uhd_swig_guile_la_SOURCES = \ + guile/uhd_swig.cc \ $(uhd_swig_la_swig_sources) uhd_swig_scm_DATA = uhd_swig.scm # Guile can use the same flags as python does -_uhd_swig_guile_la_LIBADD = $(_uhd_swig_python_la_LIBADD) -_uhd_swig_guile_la_LDFLAGS = $(_uhd_swig_python_la_LDFLAGS) -_uhd_swig_guile_la_CXXFLAGS = $(_uhd_swig_python_la_CXXFLAGS) - -endif # end of GUILE +uhd_swig_guile_la_LIBADD = $(_uhd_swig_la_LIBADD) +uhd_swig_guile_la_LDFLAGS = $(_uhd_swig_la_LDFLAGS) +uhd_swig_guile_la_CXXFLAGS = $(_uhd_swig_la_CXXFLAGS) -## Entry rule for running SWIG - -# $(python_deps) $(guile_deps): uhd_swig.i -uhd_swig_python.h uhd_swig.py uhd_swig_python.cc: uhd_swig.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/uhd_swig-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/uhd_swig-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/uhd_swig-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/uhd_swig-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/uhd_swig-generate-python-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/uhd_swig-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/uhd_swig-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/uhd_swig-generate-python-stamp; \ - exit $$?; \ - fi; +guile/uhd_swig.lo: uhd_swig.lo +uhd_swig.scm: uhd_swig.i -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. -uhd_swig_guile.h uhd_swig.scm uhd_swig_guile.cc: uhd_swig.i -if GUILE - trap 'rm -rf $(DEPDIR)/uhd_swig-generate-*' 1 2 13 15; \ - if mkdir $(DEPDIR)/uhd_swig-generate-lock 2>/dev/null; then \ - rm -f $(DEPDIR)/uhd_swig-generate-*stamp; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/uhd_swig-generate-guile-stamp WHAT=$<; \ - rmdir $(DEPDIR)/uhd_swig-generate-lock; \ - else \ - while test -d $(DEPDIR)/uhd_swig-generate-lock; do \ - sleep 1; \ - done; \ - test -f $(DEPDIR)/uhd_swig-generate-guile-stamp; \ - exit $$?; \ - fi; endif # end of GUILE -$(DEPDIR)/uhd_swig-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(uhd_swig_swig_args) \ - -MD -MF $(DEPDIR)/uhd_swig_python.Std \ - -module uhd_swig -o uhd_swig_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/uhd_swig_python.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/uhd_swig_python.Std \ - > $(DEPDIR)/uhd_swig_python.Sd; \ - $(RM) $(DEPDIR)/uhd_swig_python.Std; \ - $(MV) $(DEPDIR)/uhd_swig_python.Sd $(DEPDIR)/uhd_swig_python.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/uhd_swig_python.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/uhd_swig_python.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/uhd_swig_python.Std $(DEPDIR)/uhd_swig_python.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/uhd_swig_python.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/uhd_swig_python.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/uhd_swig_python.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/uhd_swig_python.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/uhd_swig-generate-python-stamp - -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. - -@am__include@ @am__quote@./$(DEPDIR)/uhd_swig_python.d@am__quote@ - -if GUILE -$(DEPDIR)/uhd_swig-generate-guile-stamp: -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(uhd_swig_swig_args) \ - -MD -MF $(DEPDIR)/uhd_swig_guile.Std \ - -module uhd_swig -o uhd_swig_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/uhd_swig_guile.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/uhd_swig_guile.Std \ - > $(DEPDIR)/uhd_swig_guile.Sd; \ - $(RM) $(DEPDIR)/uhd_swig_guile.Std; \ - $(MV) $(DEPDIR)/uhd_swig_guile.Sd $(DEPDIR)/uhd_swig_guile.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/uhd_swig_guile.S*; exit 1; \ - fi; - touch $(DEPDIR)/uhd_swig-generate-guile-stamp - $(RM) $(DEPDIR)/uhd_swig_guile.d - cp $(DEPDIR)/uhd_swig_guile.Std $(DEPDIR)/uhd_swig_guile.d - echo "" >> $(DEPDIR)/uhd_swig_guile.d - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/uhd_swig_guile.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/uhd_swig_guile.d - $(RM) $(DEPDIR)/uhd_swig_guile.Std - touch $(DEPDIR)/uhd_swig-generate-guile-stamp -else - touch $(DEPDIR)/uhd_swig-generate-guile-stamp -endif - -@am__include@ @am__quote@./$(DEPDIR)/uhd_swig_guile.d@am__quote@ +python/uhd_swig.lo: +uhd_swig.lo: uhd_swig.py uhd_swig.scm +uhd_swig.py: uhd_swig.i -#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i +-include python/uhd_swig.d diff --git a/gr-usrp/src/Makefile.swig.gen b/gr-usrp/src/Makefile.swig.gen index 75078862b..19a777224 100644 --- a/gr-usrp/src/Makefile.swig.gen +++ b/gr-usrp/src/Makefile.swig.gen @@ -41,12 +41,12 @@ usrp_swig_pylibdir = $(pyexecdir)/$(usrp_swig_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -usrp_swig_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +usrp_swig_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/usrp_swig # FIXME: determince whether these should be installed with gnuradio. -usrp_swig_scmdir = @GUILE_PKDATADIR@/gnuradio +usrp_swig_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -82,9 +82,11 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += usrp_swig.py usrp_swig_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += usrp_swig.py if GUILE -swig_built_sources += usrp_swig.scm usrp_swig_guile.cc +swig_built_sources += usrp_swig.scm endif ## Various SWIG variables. These can be overloaded in the including @@ -96,243 +98,51 @@ usrp_swig_swiginclude_HEADERS = \ $(usrp_swig_swiginclude_headers) usrp_swig_pylib_LTLIBRARIES = \ - _usrp_swig_python.la + _usrp_swig.la -_usrp_swig_python_la_SOURCES = \ - usrp_swig_python.cc \ +_usrp_swig_la_SOURCES = \ + python/usrp_swig.cc \ $(usrp_swig_la_swig_sources) -_usrp_swig_python_la_LIBADD = \ +_usrp_swig_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(usrp_swig_la_swig_libadd) -_usrp_swig_python_la_LDFLAGS = \ +# _usrp_swig_la_DEPENDENCIES = python/usrp_swig.lo + +_usrp_swig_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(usrp_swig_la_swig_ldflags) -_usrp_swig_python_la_CXXFLAGS = \ +_usrp_swig_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(usrp_swig_la_swig_cxxflags) usrp_swig_python_PYTHON = \ usrp_swig.py \ - $(usrp_swig_python) + $(usrp_swig) if GUILE -usrp_swig_scmlib_LTLIBRARIES = _usrp_swig_guile.la -_usrp_swig_guile_la_SOURCES = \ - usrp_swig_guile.cc \ +usrp_swig_scmlib_LTLIBRARIES = usrp_swig_guile.la +usrp_swig_guile_la_SOURCES = \ + guile/usrp_swig.cc \ $(usrp_swig_la_swig_sources) usrp_swig_scm_DATA = usrp_swig.scm # Guile can use the same flags as python does -_usrp_swig_guile_la_LIBADD = $(_usrp_swig_python_la_LIBADD) -_usrp_swig_guile_la_LDFLAGS = $(_usrp_swig_python_la_LDFLAGS) -_usrp_swig_guile_la_CXXFLAGS = $(_usrp_swig_python_la_CXXFLAGS) - -endif # end of GUILE +usrp_swig_guile_la_LIBADD = $(_usrp_swig_la_LIBADD) +usrp_swig_guile_la_LDFLAGS = $(_usrp_swig_la_LDFLAGS) +usrp_swig_guile_la_CXXFLAGS = $(_usrp_swig_la_CXXFLAGS) -## Entry rule for running SWIG - -# $(python_deps) $(guile_deps): usrp_swig.i -usrp_swig_python.h usrp_swig.py usrp_swig_python.cc: usrp_swig.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/usrp_swig-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/usrp_swig-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/usrp_swig-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/usrp_swig-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/usrp_swig-generate-python-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/usrp_swig-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/usrp_swig-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/usrp_swig-generate-python-stamp; \ - exit $$?; \ - fi; +guile/usrp_swig.lo: usrp_swig.lo +usrp_swig.scm: usrp_swig.i -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. -usrp_swig_guile.h usrp_swig.scm usrp_swig_guile.cc: usrp_swig.i -if GUILE - trap 'rm -rf $(DEPDIR)/usrp_swig-generate-*' 1 2 13 15; \ - if mkdir $(DEPDIR)/usrp_swig-generate-lock 2>/dev/null; then \ - rm -f $(DEPDIR)/usrp_swig-generate-*stamp; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/usrp_swig-generate-guile-stamp WHAT=$<; \ - rmdir $(DEPDIR)/usrp_swig-generate-lock; \ - else \ - while test -d $(DEPDIR)/usrp_swig-generate-lock; do \ - sleep 1; \ - done; \ - test -f $(DEPDIR)/usrp_swig-generate-guile-stamp; \ - exit $$?; \ - fi; endif # end of GUILE -$(DEPDIR)/usrp_swig-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(usrp_swig_swig_args) \ - -MD -MF $(DEPDIR)/usrp_swig_python.Std \ - -module usrp_swig -o usrp_swig_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/usrp_swig_python.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/usrp_swig_python.Std \ - > $(DEPDIR)/usrp_swig_python.Sd; \ - $(RM) $(DEPDIR)/usrp_swig_python.Std; \ - $(MV) $(DEPDIR)/usrp_swig_python.Sd $(DEPDIR)/usrp_swig_python.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/usrp_swig_python.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/usrp_swig_python.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/usrp_swig_python.Std $(DEPDIR)/usrp_swig_python.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/usrp_swig_python.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/usrp_swig_python.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/usrp_swig_python.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/usrp_swig_python.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/usrp_swig-generate-python-stamp - -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. - -@am__include@ @am__quote@./$(DEPDIR)/usrp_swig_python.d@am__quote@ - -if GUILE -$(DEPDIR)/usrp_swig-generate-guile-stamp: -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(usrp_swig_swig_args) \ - -MD -MF $(DEPDIR)/usrp_swig_guile.Std \ - -module usrp_swig -o usrp_swig_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/usrp_swig_guile.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/usrp_swig_guile.Std \ - > $(DEPDIR)/usrp_swig_guile.Sd; \ - $(RM) $(DEPDIR)/usrp_swig_guile.Std; \ - $(MV) $(DEPDIR)/usrp_swig_guile.Sd $(DEPDIR)/usrp_swig_guile.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/usrp_swig_guile.S*; exit 1; \ - fi; - touch $(DEPDIR)/usrp_swig-generate-guile-stamp - $(RM) $(DEPDIR)/usrp_swig_guile.d - cp $(DEPDIR)/usrp_swig_guile.Std $(DEPDIR)/usrp_swig_guile.d - echo "" >> $(DEPDIR)/usrp_swig_guile.d - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/usrp_swig_guile.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/usrp_swig_guile.d - $(RM) $(DEPDIR)/usrp_swig_guile.Std - touch $(DEPDIR)/usrp_swig-generate-guile-stamp -else - touch $(DEPDIR)/usrp_swig-generate-guile-stamp -endif - -@am__include@ @am__quote@./$(DEPDIR)/usrp_swig_guile.d@am__quote@ +python/usrp_swig.lo: +usrp_swig.lo: usrp_swig.py usrp_swig.scm +usrp_swig.py: usrp_swig.i -#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i +-include python/usrp_swig.d diff --git a/gr-usrp2/src/Makefile.swig.gen b/gr-usrp2/src/Makefile.swig.gen index a5d151f11..753a7b254 100644 --- a/gr-usrp2/src/Makefile.swig.gen +++ b/gr-usrp2/src/Makefile.swig.gen @@ -41,12 +41,12 @@ usrp2_pylibdir = $(pyexecdir)/$(usrp2_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -usrp2_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +usrp2_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/usrp2 # FIXME: determince whether these should be installed with gnuradio. -usrp2_scmdir = @GUILE_PKDATADIR@/gnuradio +usrp2_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/usrp2.lo: usrp2.lo: usrp2.py usrp2.scm usrp2.py: usrp2.i +-include python/usrp2.d diff --git a/gr-video-sdl/src/Makefile.swig.gen b/gr-video-sdl/src/Makefile.swig.gen index d09582c25..15db36a84 100644 --- a/gr-video-sdl/src/Makefile.swig.gen +++ b/gr-video-sdl/src/Makefile.swig.gen @@ -41,12 +41,12 @@ video_sdl_pylibdir = $(pyexecdir)/$(video_sdl_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -video_sdl_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +video_sdl_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/video_sdl # FIXME: determince whether these should be installed with gnuradio. -video_sdl_scmdir = @GUILE_PKDATADIR@/gnuradio +video_sdl_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -144,4 +144,5 @@ python/video_sdl.lo: video_sdl.lo: video_sdl.py video_sdl.scm video_sdl.py: video_sdl.i +-include python/video_sdl.d diff --git a/usrp/host/swig/Makefile.swig.gen b/usrp/host/swig/Makefile.swig.gen index ec804159b..830552a2c 100644 --- a/usrp/host/swig/Makefile.swig.gen +++ b/usrp/host/swig/Makefile.swig.gen @@ -41,12 +41,12 @@ usrp_prims_pylibdir = $(pyexecdir)/$(usrp_prims_pylibdir_category) # The .so libraries for the guile modules get installed whereever guile # is installed, usually /usr/lib/guile/gnuradio/ # FIXME: determince whether these should be installed with gnuradio. -usrp_prims_scmlibdir = @GUILE_PKLIBDIR@/gnuradio +usrp_prims_scmlibdir = $(libdir)/guile/gnuradio # The scm files for the guile modules get installed where ever guile # is installed, usually /usr/share/guile/site/usrp_prims # FIXME: determince whether these should be installed with gnuradio. -usrp_prims_scmdir = @GUILE_PKDATADIR@/gnuradio +usrp_prims_scmdir = $(guiledir)/gnuradio ## SWIG headers are always installed into the same directory. @@ -82,9 +82,11 @@ MOSTLYCLEANFILES += $(DEPDIR)/*.S* ## .h file is sometimes built, but not always ... so that one has to ## be added manually by the including Makefile.am . -swig_built_sources += usrp_prims.py usrp_prims_python.cc +# generating the py or scm file also generates the .cc or .h files, +# but dependencies work better without the .cc ort .h files listed. +swig_built_sources += usrp_prims.py if GUILE -swig_built_sources += usrp_prims.scm usrp_prims_guile.cc +swig_built_sources += usrp_prims.scm endif ## Various SWIG variables. These can be overloaded in the including @@ -96,243 +98,51 @@ usrp_prims_swiginclude_HEADERS = \ $(usrp_prims_swiginclude_headers) usrp_prims_pylib_LTLIBRARIES = \ - _usrp_prims_python.la + _usrp_prims.la -_usrp_prims_python_la_SOURCES = \ - usrp_prims_python.cc \ +_usrp_prims_la_SOURCES = \ + python/usrp_prims.cc \ $(usrp_prims_la_swig_sources) -_usrp_prims_python_la_LIBADD = \ +_usrp_prims_la_LIBADD = \ $(STD_SWIG_LA_LIB_ADD) \ $(usrp_prims_la_swig_libadd) -_usrp_prims_python_la_LDFLAGS = \ +# _usrp_prims_la_DEPENDENCIES = python/usrp_prims.lo + +_usrp_prims_la_LDFLAGS = \ $(STD_SWIG_LA_LD_FLAGS) \ $(usrp_prims_la_swig_ldflags) -_usrp_prims_python_la_CXXFLAGS = \ +_usrp_prims_la_CXXFLAGS = \ $(STD_SWIG_CXX_FLAGS) \ + -I$(top_builddir) \ $(usrp_prims_la_swig_cxxflags) usrp_prims_python_PYTHON = \ usrp_prims.py \ - $(usrp_prims_python) + $(usrp_prims) if GUILE -usrp_prims_scmlib_LTLIBRARIES = _usrp_prims_guile.la -_usrp_prims_guile_la_SOURCES = \ - usrp_prims_guile.cc \ +usrp_prims_scmlib_LTLIBRARIES = usrp_prims_guile.la +usrp_prims_guile_la_SOURCES = \ + guile/usrp_prims.cc \ $(usrp_prims_la_swig_sources) usrp_prims_scm_DATA = usrp_prims.scm # Guile can use the same flags as python does -_usrp_prims_guile_la_LIBADD = $(_usrp_prims_python_la_LIBADD) -_usrp_prims_guile_la_LDFLAGS = $(_usrp_prims_python_la_LDFLAGS) -_usrp_prims_guile_la_CXXFLAGS = $(_usrp_prims_python_la_CXXFLAGS) - -endif # end of GUILE +usrp_prims_guile_la_LIBADD = $(_usrp_prims_la_LIBADD) +usrp_prims_guile_la_LDFLAGS = $(_usrp_prims_la_LDFLAGS) +usrp_prims_guile_la_CXXFLAGS = $(_usrp_prims_la_CXXFLAGS) -## Entry rule for running SWIG - -# $(python_deps) $(guile_deps): usrp_prims.i -usrp_prims_python.h usrp_prims.py usrp_prims_python.cc: usrp_prims.i -## This rule will get called only when MAKE decides that one of the -## targets needs to be created or re-created, because: -## -## * The .i file is newer than any or all of the generated files; -## -## * Any or all of the .cc, .h, or .py files does not exist and is -## needed (in the case this file is not needed, the rule for it is -## ignored); or -## -## * Some SWIG-based dependecy of the .cc file isn't met and hence the -## .cc file needs be be regenerated. Explanation: Because MAKE -## knows how to handle dependencies for .cc files (regardless of -## their name or extension), then the .cc file is used as a target -## instead of the .i file -- but with the dependencies of the .i -## file. It is this last reason why the line: -## -## if test -f $@; then :; else -## -## cannot be used in this case: If a .i file dependecy is not met, -## then the .cc file needs to be rebuilt. But if the stamp is newer -## than the .cc file, and the .cc file exists, then in the original -## version (with the 'test' above) the internal MAKE call will not -## be issued and hence the .cc file will not be rebuilt. -## -## Once execution gets to here, it should always proceed no matter the -## state of a stamp (as discussed in link above). The -## $(DEPDIR)/usrp_prims-generate stuff is used to allow for parallel -## builds to "do the right thing". The stamp has no relationship with -## either the target files or dependency file; it is used solely for -## the protection of multiple builds during a given call to MAKE. -## -## Catch signals SIGHUP (1), SIGINT (2), SIGPIPE (13), and SIGTERM -## (15). At a caught signal, the quoted command will be issued before -## exiting. In this case, remove any stamp, whether temporary of not. -## The trap is valid until the process exits; the process includes all -## commands appended via "\"s. -## - trap 'rm -rf $(DEPDIR)/usrp_prims-generate-*' 1 2 13 15; \ -## -## Create a temporary directory, which acts as a lock. The first -## process to create the directory will succeed and issue the MAKE -## command to do the actual work, while all subsequent processes will -## fail -- leading them to wait for the first process to finish. -## - if mkdir $(DEPDIR)/usrp_prims-generate-lock 2>/dev/null; then \ -## -## This code is being executed by the first process to succeed in -## creating the directory lock. -## -## Remove the stamp associated with this filename. -## - rm -f $(DEPDIR)/usrp_prims-generate-*stamp; \ -## -## Tell MAKE to run the rule for creating this stamp. -## - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/usrp_prims-generate-python-stamp WHAT=$<; \ -## -## Now that the .cc, .h, and .py files have been (re)created from the -## .i file, future checking of this rule during the same MAKE -## execution will come back that the rule doesn't need to be executed -## because none of the conditions mentioned at the start of this rule -## will be positive. Remove the the directory lock, which frees up -## any waiting process(es) to continue. -## - rmdir $(DEPDIR)/usrp_prims-generate-lock; \ - else \ -## -## This code is being executed by any follower processes while the -## directory lock is in place. -## -## Wait until the first process is done, testing once per second. -## - while test -d $(DEPDIR)/usrp_prims-generate-lock; do \ - sleep 1; \ - done; \ -## -## Succeed if and only if the first process succeeded; exit this -## process returning the status of the generated stamp. -## - test -f $(DEPDIR)/usrp_prims-generate-python-stamp; \ - exit $$?; \ - fi; +guile/usrp_prims.lo: usrp_prims.lo +usrp_prims.scm: usrp_prims.i -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. -usrp_prims_guile.h usrp_prims.scm usrp_prims_guile.cc: usrp_prims.i -if GUILE - trap 'rm -rf $(DEPDIR)/usrp_prims-generate-*' 1 2 13 15; \ - if mkdir $(DEPDIR)/usrp_prims-generate-lock 2>/dev/null; then \ - rm -f $(DEPDIR)/usrp_prims-generate-*stamp; \ - $(MAKE) $(AM_MAKEFLAGS) $(DEPDIR)/usrp_prims-generate-guile-stamp WHAT=$<; \ - rmdir $(DEPDIR)/usrp_prims-generate-lock; \ - else \ - while test -d $(DEPDIR)/usrp_prims-generate-lock; do \ - sleep 1; \ - done; \ - test -f $(DEPDIR)/usrp_prims-generate-guile-stamp; \ - exit $$?; \ - fi; endif # end of GUILE -$(DEPDIR)/usrp_prims-generate-python-stamp: -## This rule will be called only by the first process issuing the -## above rule to succeed in creating the lock directory, after -## removing the actual stamp file in order to guarantee that MAKE will -## execute this rule. -## -## Call SWIG to generate the various output files; special -## post-processing on 'mingw32' host OS for the dependency file. -## - if $(SWIG) $(STD_SWIG_PYTHON_ARGS) $(usrp_prims_swig_args) \ - -MD -MF $(DEPDIR)/usrp_prims_python.Std \ - -module usrp_prims -o usrp_prims_python.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/usrp_prims_python.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/usrp_prims_python.Std \ - > $(DEPDIR)/usrp_prims_python.Sd; \ - $(RM) $(DEPDIR)/usrp_prims_python.Std; \ - $(MV) $(DEPDIR)/usrp_prims_python.Sd $(DEPDIR)/usrp_prims_python.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/usrp_prims_python.S*; exit 1; \ - fi; -## -## Mess with the SWIG output .Std dependency file, to create a -## dependecy file valid for the input .i file: Basically, simulate the -## dependency file created for libraries by GNU's libtool for C++, -## where all of the dependencies for the target are first listed, then -## each individual dependency is listed as a target with no further -## dependencies. -## -## (1) remove the current dependency file -## - $(RM) $(DEPDIR)/usrp_prims_python.d -## -## (2) Copy the whole SWIG file: -## - cp $(DEPDIR)/usrp_prims_python.Std $(DEPDIR)/usrp_prims_python.d -## -## (3) all a carriage return to the end of the dependency file. -## - echo "" >> $(DEPDIR)/usrp_prims_python.d -## -## (4) from the SWIG file, remove the first line (the target); remove -## trailing " \" and " " from each line. Append ":" to each line, -## followed by 2 carriage returns, then append this to the end of -## the dependency file. -## - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/usrp_prims_python.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/usrp_prims_python.d -## -## (5) remove the SWIG-generated file -## - $(RM) $(DEPDIR)/usrp_prims_python.Std -## -## Create the stamp for this filename generation, to signal success in -## executing this rule; allows other threads waiting on this process -## to continue. -## - touch $(DEPDIR)/usrp_prims-generate-python-stamp - -# KLUDGE: Force runtime include of a SWIG dependency file. This is -# not guaranteed to be portable, but will probably work. If it works, -# we have accurate dependencies for our swig stuff, which is good. - -@am__include@ @am__quote@./$(DEPDIR)/usrp_prims_python.d@am__quote@ - -if GUILE -$(DEPDIR)/usrp_prims-generate-guile-stamp: -# the comments for the target above apply to this target as well, but it seemed -# silly to include them twice. The only main change is for guile. - if $(SWIG) $(STD_SWIG_GUILE_ARGS) $(usrp_prims_swig_args) \ - -MD -MF $(DEPDIR)/usrp_prims_guile.Std \ - -module usrp_prims -o usrp_prims_guile.cc $(WHAT); then \ - if test $(host_os) = mingw32; then \ - $(RM) $(DEPDIR)/usrp_prims_guile.Sd; \ - $(SED) 's,\\\\,/,g' < $(DEPDIR)/usrp_prims_guile.Std \ - > $(DEPDIR)/usrp_prims_guile.Sd; \ - $(RM) $(DEPDIR)/usrp_prims_guile.Std; \ - $(MV) $(DEPDIR)/usrp_prims_guile.Sd $(DEPDIR)/usrp_prims_guile.Std; \ - fi; \ - else \ - $(RM) $(DEPDIR)/usrp_prims_guile.S*; exit 1; \ - fi; - touch $(DEPDIR)/usrp_prims-generate-guile-stamp - $(RM) $(DEPDIR)/usrp_prims_guile.d - cp $(DEPDIR)/usrp_prims_guile.Std $(DEPDIR)/usrp_prims_guile.d - echo "" >> $(DEPDIR)/usrp_prims_guile.d - $(SED) -e '1d;s, \\,,g;s, ,,g' < $(DEPDIR)/usrp_prims_guile.Std | \ - awk '{ printf "%s:\n\n", $$0 }' >> $(DEPDIR)/usrp_prims_guile.d - $(RM) $(DEPDIR)/usrp_prims_guile.Std - touch $(DEPDIR)/usrp_prims-generate-guile-stamp -else - touch $(DEPDIR)/usrp_prims-generate-guile-stamp -endif - -@am__include@ @am__quote@./$(DEPDIR)/usrp_prims_guile.d@am__quote@ +python/usrp_prims.lo: +usrp_prims.lo: usrp_prims.py usrp_prims.scm +usrp_prims.py: usrp_prims.i -#gnuradio_swig_py_runtime_python.h: gnuradio_swig_py_runtime.i +-include python/usrp_prims.d |