Changeset 5281


Ignore:
Timestamp:
May 3, 2016 4:27:07 AM (4 years ago)
Author:
nanang
Message:

Misc (re #1882): Update Python setup.py to get 'make' from environment variable MAKE, if it doesn't exist, just use 'make'. On some systems, such as FreeBSD, default 'make' command is not GNU compatible.

Thanks George Joseph for the patch.

Location:
pjproject/trunk/pjsip-apps/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • pjproject/trunk/pjsip-apps/src/python/setup.py

    r4232 r5281  
    6262#print 'PJ_VERSION = "'+ pj_version + '"' 
    6363 
     64# Get 'make' from environment variable if any 
     65MAKE = os.environ.get('MAKE') or "make" 
    6466 
    6567# Fill in pj_inc_dirs 
    6668pj_inc_dirs = [] 
    67 f = os.popen("make -f helper.mak inc_dir") 
     69f = os.popen("%s -f helper.mak inc_dir" % MAKE) 
    6870for line in f: 
    6971    pj_inc_dirs.append(line.rstrip("\r\n")) 
     
    7274# Fill in pj_lib_dirs 
    7375pj_lib_dirs = [] 
    74 f = os.popen("make -f helper.mak lib_dir") 
     76f = os.popen("%s -f helper.mak lib_dir" % MAKE) 
    7577for line in f: 
    7678    pj_lib_dirs.append(line.rstrip("\r\n")) 
     
    7981# Fill in pj_libs 
    8082pj_libs = [] 
    81 f = os.popen("make -f helper.mak libs") 
     83f = os.popen("%s -f helper.mak libs" % MAKE) 
    8284for line in f: 
    8385    pj_libs.append(line.rstrip("\r\n")) 
  • pjproject/trunk/pjsip-apps/src/swig/python/setup.py

    r4756 r5281  
    6262#print 'PJ_VERSION = "'+ pj_version + '"' 
    6363 
     64# Get 'make' from environment variable if any 
     65MAKE = os.environ.get('MAKE') or "make" 
     66 
    6467# Get targetname 
    65 f = os.popen("make --no-print-directory -f helper.mak target_name") 
     68f = os.popen("%s --no-print-directory -f helper.mak target_name" % MAKE) 
    6669pj_target_name = f.read().rstrip("\r\n") 
    6770f.close() 
     
    6972# Fill in extra_compile_args 
    7073extra_compile_args = [] 
    71 f = os.popen("make --no-print-directory -f helper.mak cflags") 
     74f = os.popen("%s --no-print-directory -f helper.mak cflags" % MAKE) 
    7275for line in f: 
    7376    extra_compile_args.append(line.rstrip("\r\n")) 
     
    7679# Fill in libraries 
    7780libraries = [] 
    78 f = os.popen("make --no-print-directory -f helper.mak libs") 
     81f = os.popen("%s --no-print-directory -f helper.mak libs" % MAKE) 
    7982for line in f: 
    8083    libraries.append(line.rstrip("\r\n")) 
     
    8386# Fill in extra_link_args 
    8487extra_link_args = [] 
    85 f = os.popen("make --no-print-directory -f helper.mak ldflags") 
     88f = os.popen("%s --no-print-directory -f helper.mak ldflags" % MAKE) 
    8689for line in f: 
    8790    extra_link_args.append(line.rstrip("\r\n")) 
Note: See TracChangeset for help on using the changeset viewer.