~ubuntu-branches/ubuntu/vivid/adios/vivid-proposed

« back to all changes in this revision

Viewing changes to .pc/debian_paths.patch/utils/skel/lib/skel_makefile.py

  • Committer: Package Import Robot
  • Author(s): Alastair McKinstry
  • Date: 2014-06-16 23:06:38 UTC
  • mfrom: (15.1.8 sid)
  • Revision ID: package-import@ubuntu.com-20140616230638-cxryhot6b8ge32l6
Tags: 1.7.0-1
* New upstream release.
* Add adios.pc pkgconfig file. adios_config now uses this.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/usr/bin/env python
2
2
 
3
3
# from __future__ import absolute_import, division, print_function, unicode_literals
4
 
from __future__ import print_function
 
4
from __future__ import print_function, unicode_literals
5
5
import argparse
6
6
import os
7
7
import sys
17
17
                parents = [parent_parser],
18
18
                formatter_class=argparse.RawDescriptionHelpFormatter,
19
19
                prog='skel',
20
 
                add_help=False,
 
20
                add_help=True,
21
21
                description='''\
22
22
        skel makefile 
23
23
            create a makefile for building a skeletal application''')
24
24
 
 
25
    parser.add_argument ('project', metavar='project', help='Name of the skel project')
25
26
    parser.add_argument ('-y', '--yaml-file', dest='yamlfile', help='yaml file to store I/O pattern')
26
27
    parser.add_argument ('-b', '--bp-file', dest='bpfile', help='bp file to extract I/O pattern')
27
28
    parser.add_argument ('-f', '--force', dest='force', action='store_true', help='overwrite existing source file')
 
29
    parser.add_argument ('-n', '--noxml', dest='noxml', action='store_true', help='generate noxml code')
28
30
    parser.set_defaults(force=False)
 
31
    parser.set_defaults(noxml=False)
29
32
 
30
33
    return parser.parse_args()
31
34
 
32
35
 
33
36
 
34
 
def generate_makefiles_with_args (config, parent_parser):
 
37
def generate_makefiles_with_args (parent_parser):
35
38
    args = pparse_command_line (parent_parser)
36
39
 
 
40
    try:
 
41
        config = adios.adiosConfig (args.project + '_skel.xml')
 
42
    except (IOError):
 
43
        print ("XXError reading " + args.project + "_skel.xml. Try running skel xml " + args.project + " first.")
 
44
        return 1
 
45
 
 
46
 
37
47
    if args.yamlfile:
38
48
        generate_makefile_from_yaml (args)
39
49
    else:
41
51
        try:
42
52
            params = skelconf.skelConfig (args.project + '_params.xml')
43
53
        except (IOError):
44
 
            print "Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,"
45
 
            print "then check that " + args.project + "_params.xml exists."
 
54
            print("Error reading " + args.project + "_params.xml. Try running skel params " + args.project + " first,")
 
55
            print("then check that " + args.project + "_params.xml exists.")
46
56
            return
47
57
 
48
58
        generate_makefiles (params, config)
71
81
    t.bpy = bpy
72
82
    t.project = args.project
73
83
    t.bpfile = args.bpfile
 
84
    t.noxml = args.noxml
74
85
    skel_file.write (str(t) )
75
86
 
76
87