Reorganization of debian package directory
[debian/gnuradio] / dtools / bin / extract_install_filenames
diff --git a/dtools/bin/extract_install_filenames b/dtools/bin/extract_install_filenames
deleted file mode 100755 (executable)
index 8ffce9d..0000000
+++ /dev/null
@@ -1,98 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Example usage:
-
-  $ extract_install_filenames gnuradio-core/src/lib/swig/Makefile grgrpython_PYTHON
-
-Produces:
-
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_python.py
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_runtime.py
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_general.py
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_gengen.py
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_filter.py
-  usr/local/lib64/python2.4/site-packages/gnuradio/gr/gnuradio_swig_py_io.py
-
-"""
-
-from optparse import OptionParser
-import re
-import sys
-import tempfile
-import os
-
-def make_makefile_tail(dirname, full_var_name):
-    
-    s = '''
-extract_install_filenames:
-       @echo $(%s)
-       @echo $(%s)
-
-''' % (dirname, full_var_name)
-    return s
-
-
-def main():
-    parser = OptionParser(usage="usage: %prog [options] Makefile AM-variable-name")
-    (options, args) = parser.parse_args()
-    if len(args) != 2:
-        parser.print_help()
-        raise SystemExit
-
-    makefile_name = args[0]
-    makefile = open(makefile_name, 'r')
-    full_var_name = args[1]
-
-    L = re.split('_', full_var_name)
-    prefix = '_'.join(L[:-1])
-    suffix = L[-1]
-
-    #print "prefix= ", prefix
-    #print "suffix= ", suffix
-
-    if suffix.upper() != suffix:
-        raise SystemExit, "AM-variable-name is malformed.  Expected something like grgrpython_PYTHON"
-
-    if prefix[:5] == "dist_":
-        dirname = prefix[5:] + "dir"
-    else:
-        dirname = prefix + "dir"
-    #print "dirname =", dirname
-
-    tail = make_makefile_tail(dirname, full_var_name)
-
-    tmp_makefile = tempfile.NamedTemporaryFile()
-    #print "tmp_makefile =", tmp_makefile
-    tmp_name = tmp_makefile.name
-    #print "tmp_name =", tmp_name
-    s = makefile.read()
-    tmp_makefile.write(s)
-    tmp_makefile.write(tail)
-    tmp_makefile.flush()
-
-    (head, tail) = os.path.split(makefile_name)
-    if head:
-        # cd to directory that contained the original Makefile
-        cmd = 'cd %s; make -s -f %s extract_install_filenames' % (head, tmp_name)
-    else:
-        cmd = 'make -s -f %s extract_install_filenames' % (tmp_name,)
-        
-    #print "cmd =", cmd
-    make = os.popen(cmd, 'r')
-    target_dirname = make.readline().rstrip()
-    target_files = make.readline().rstrip()
-    if target_dirname.startswith('/'):
-        target_dirname = target_dirname[1:]
-   
-    #print "target_dirname =", target_dirname
-    #print "target_files =", target_files
-
-    for f in target_files.split():
-        sys.stdout.write(os.path.join(target_dirname, f.split('/')[-1]) + '\n')
-
-if __name__ == '__main__':
-  main()
-
-
-