def configure(args):
    open(os.path.join(args.arch, 'Makefile'), 'w').write(makefile(args))
    reconfname = os.path.join(args.arch, ('reconfigure-%s.py' % args.arch))
    open(reconfname, 'w').write('\n'.join([('#!' + sys.executable), 'import os,sys', 'from argparse import Namespace', "sys.path.insert(0, os.path.abspath('.'))", 'import hpgmgconf', ('hpgmgconf.configure(%r)' % args)]))
    os.chmod(reconfname, 493)
    print(('Configuration complete in: %s' % os.path.realpath(args.arch)))
    print(('To build: make -j3 -C %s' % args.arch))
def configure(args):
    open(os.path.join(args.arch, 'Makefile'), 'w').write(makefile(args))
    reconfname = os.path.join(args.arch, ('reconfigure-%s.py' % args.arch))
    open(reconfname, 'w').write('\n'.join([('#!' + sys.executable), 'import os,sys', 'from argparse import Namespace', "sys.path.insert(0, os.path.abspath('.'))", 'import hpgmgconf', ('hpgmgconf.configure(%r)' % args)]))
    os.chmod(reconfname, 493)
    print(('Configuration complete in: %s' % os.path.realpath(args.arch)))
    print(('To build: make -j3 -C %s' % args.arch))