diff options
-rw-r--r-- | Makefile.common | 6 | ||||
-rw-r--r-- | Makefile.swig | 11 | ||||
-rw-r--r-- | gnuradio-core/src/lib/swig/Makefile.am | 21 |
3 files changed, 8 insertions, 30 deletions
diff --git a/Makefile.common b/Makefile.common index a09b9fbdb7..c683a9f9be 100644 --- a/Makefile.common +++ b/Makefile.common @@ -40,7 +40,6 @@ swigincludedir = $(grincludedir)/swig guiledir = $(prefix)/share/guile/site grguiledir = $(guiledir)/gnuradio -if PYTHON # Install the gnuradio stuff in the appropriate subdirectory # This usually ends up at: # ${prefix}/lib/python${python_version}/site-packages/gnuradio @@ -54,7 +53,6 @@ grpyexecdir = $(pyexecdir)/gnuradio usrppythondir = $(pythondir)/usrpm usrppyexecdir = $(pyexecdir)/usrpm -endif # gcell includes gcellincludedir = $(includedir)/gcell @@ -125,7 +123,6 @@ MOSTLYCLEANFILES = $(BUILT_SOURCES) $(STAMPS) *.pyc *.pyo *~ *.tmp *.loT ## SWIG suffixes for automake to know about SUFFIXES = .i .scm .py -if GUILE # Compile a .i to what guile needs. We use -o to set the output file name, # or even with -outdir guile in SWIG_GUILE_ARGS, swig keeps putting a # gnuradio_core_*_wrap.cxx in the source directory. @@ -140,7 +137,6 @@ gnuradio/%.scm : %.i $(SED) -i -e 's/<--dummy-[0-9]\+-->/<top>/g' gnuradio/$*.scm $(SED) -i -e 's/^(export /(export-safely /' gnuradio/$*.scm $(RM) guile/$*.Std -endif # Compile a .i file to what python needs .i.py: @@ -153,7 +149,7 @@ endif $(RM) python/$*.Std # Don't distribute the files defined in the variable 'no_dist_files' -no_dist_dirs = python gnuradio guile +# or the directories listed in no_dist_dirs (set in Makefile.swig) dist-hook: @for dir in $(no_dist_dirs); do \ echo $(RM) -fr $(distdir)/$$dir; \ diff --git a/Makefile.swig b/Makefile.swig index 03b7c92a3d..c6b36ddeff 100644 --- a/Makefile.swig +++ b/Makefile.swig @@ -1,6 +1,6 @@ # -*- Makefile -*- # -# Copyright 2009 Free Software Foundation, Inc. +# Copyright 2009,2010 Free Software Foundation, Inc. # # This file is part of GNU Radio # @@ -25,6 +25,9 @@ ## in Makefile.am's which require SWIG wrapping / compilation. ## For just installing .i files, this Makefile is not required. +CLEANFILES = python/*.cc python/*.h python/*.lo python/*.o +CLEANFILES += guile/*.cc gnuradio/*.scm guile/*.lo guile/*.o + ## swig flags ## -w511 turns off keyword argument warning ## "-outdir $(builddir)" writes all generated output files to @@ -32,9 +35,6 @@ ## In some older autotools, $(builddir) is not defined, so ## just use '.' instead. -CLEANFILES = python/*.cc python/*.h python/*.lo python/*.o -CLEANFILES += guile/*.cc gnuradio/*.scm guile/*.lo guile/*.o - SWIG_PYTHON_FLAGS = \ -fvirtual \ -python \ @@ -144,3 +144,6 @@ if GUILE GUILE_GEN = $(foreach HFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%.scm,$(HFILE))) swig_built_sources += $(GUILE_GEN) endif + +no_dist_dirs = python gnuradio guile +no_dist_files = $(swig_built_sources) diff --git a/gnuradio-core/src/lib/swig/Makefile.am b/gnuradio-core/src/lib/swig/Makefile.am index 95edf51810..a97bb6ea00 100644 --- a/gnuradio-core/src/lib/swig/Makefile.am +++ b/gnuradio-core/src/lib/swig/Makefile.am @@ -24,11 +24,6 @@ include $(top_srcdir)/Makefile.swig BUILT_SOURCES = $(grinclude_HEADERS) $(swig_built_sources) -CLEANFILES = python/*.cc python/*.h -if GUILE -CLEANFILES += guile/*.cc gnuradio/*.scm -endif - # ---------------------------------------------------------------- # We've split the previously monstrous gnuradio_core into 6 # smaller pieces. This reduces compile time coupling and creates @@ -62,7 +57,6 @@ AM_CPPFLAGS = -I$(srcdir) $(STD_DEFINES_AND_INCLUDES) $(PYTHON_CPPFLAGS) \ EXTRA_DIST = gen-swig-bug-fix -if PYTHON # special install for this top-level Python script which includes all # of the split Python libraries. ourpythondir = $(grpythondir)/gr @@ -95,20 +89,5 @@ gnuradio_core_filter_la_swig_libadd = $(GNURADIO_CORE_LA) gnuradio_core_io_la_swig_libadd = $(GNURADIO_CORE_LA) gnuradio_core_hier_la_swig_libadd = $(GNURADIO_CORE_LA) -# add some of the variables generated inside the Makefile.swig - -# include the SWIG-generated .h files in the BUILT SOURCES, since they -# aren't by default when using Makefile.swig; order doesn't matter. -PYTHON_GEN = $(foreach HFILE,$(TOP_SWIG_IFILES), $(subst .i,.py,$(HFILE))) -swig_built_sources += $(PYTHON_GEN) -endif # end of if python -if GUILE SWIG_GUILE_FLAGS += -DIN_GNURADIO_CORE -GUILE_GEN = $(foreach HFILE,$(TOP_SWIG_IFILES), $(patsubst %.i,gnuradio/%.scm,$(HFILE))) -swig_built_sources += $(GUILE_GEN) -endif # end of if guile - -# Do not distribute the output of SWIG -no_dist_files = $(swig_built_sources) - |