Permalink
Browse files

Fix upp handling for new version of ISIS

  • Loading branch information...
ScottMcMichael committed Jan 31, 2017
1 parent 1087f56 commit d59c5712ec47b901042ca160730341b789ba3588
Showing with 7 additions and 7 deletions.
  1. +7 −7 reformat_isis.py
View
@@ -27,7 +27,7 @@
def write_makefile_am_closing( directory, makefile, all_protoprefixes=[], CLEANFILES = [], BUILT_SOURCES = [], EXTRA_DIST = [] ):
'''Close off a makefile written by one of the other functions.'''
- print('\nincludedir = $(prefix)/include', file=makefile)
+ print('\nincludedir = $(prefix)/include', file=makefile)
print('\ninclude $(top_srcdir)/config/rules.mak\n', file=makefile)
# Additional clean up for all of the auto generated files.
@@ -129,7 +129,7 @@ def write_makefile_am_from_apps_dir( directory, moc_generated_files ):
sources_thus_far.append(filename)
print(' \\\n %s' % relative_source, file=makefile, end='')
# Identify headers that need to be moc generated
- for header in glob(P.join(sdirectory,'*.h')):
+ for header in (glob(P.join(sdirectory,'*.h')) + glob(P.join(sdirectory,'*.hpp'))):
for line in open( header ):
if "Q_OBJECT" in line:
moc_sources.append( "%s.dir/%s.moc.cc" % (app_name,P.basename(header).split('.')[0]) )
@@ -254,7 +254,7 @@ def write_makefile_am_from_objs_dir( directory ):
header_dir = P.join( opt.destination, 'include' )
# Ignore functions for /obj folders and /app folders
- ignore_func_obj = ignore=shutil.ignore_patterns('Makefile','apps','unitTest.cpp','tsts','*.h','*.truth','*.plugin','*.cub','*.xml')
+ ignore_func_obj = ignore=shutil.ignore_patterns('Makefile','apps','unitTest.cpp','tsts','*.h','*.hpp','*.truth','*.plugin','*.cub','*.xml')
ignore_func_app = ignore=shutil.ignore_patterns('Makefile','apps','unitTest.cpp','tsts','*.truth','*.plugin','*.cub')
# Blacklisted applications are apps we don't build because we
@@ -284,7 +284,7 @@ def write_makefile_am_from_objs_dir( directory ):
ignore=ignore_func_app ) # This call will copy the headers to
# Identify headers that need to be processed through MOC (QT's Meta-Object Compiler)
- headers = glob( P.join( root, app, '*.h') )
+ headers = glob( P.join( root, app, '*.h') ) + glob( P.join( root, app, '*.hpp') )
for header in headers:
for line in open( header ):
if "Q_OBJECT" in line:
@@ -314,7 +314,7 @@ def write_makefile_am_from_objs_dir( directory ):
# make a softlink that points to the new header
# location. This hack is required because ISIS expects
# its headers all to be in one spot.
- headers = glob( P.join( root, obj, '*.h' ) )
+ headers = glob( P.join( root, obj, '*.h' ) ) + glob( P.join( root, obj, '*.hpp' ) )
for header in headers:
shutil.copy( header, header_dir )
# See if this header needs an autogenerated MOC file.
@@ -338,7 +338,7 @@ def write_makefile_am_from_objs_dir( directory ):
# Need to copy some more files from the inc dir that were not copied so far
inc_dir=P.join(opt.isisroot, 'inc')
- headers = glob( P.join( inc_dir, '*.h') )
+ headers = glob( P.join( inc_dir, '*.h') ) + glob( P.join( inc_dir, '*.hpp') )
for src in headers:
dst = P.join(header_dir, os.path.basename(src))
if not os.path.exists(dst):
@@ -421,7 +421,7 @@ def write_makefile_am_from_objs_dir( directory ):
# Write a make file for the include/header directory
# - Just one big include list and the include directory
with open(P.join(opt.destination,'include','Makefile.am'), 'w') as makefile:
- headers = glob(P.join(opt.destination,'include','*.h'))
+ headers = glob(P.join(opt.destination,'include','*.h')) + glob(P.join(opt.destination,'include','*.hpp'))
print('include_HEADERS = ', file=makefile, end='')
for header in headers:
relative_header = \

0 comments on commit d59c571

Please sign in to comment.