super-header fix
This commit is contained in:
		
							parent
							
								
									d30015b757
								
							
						
					
					
						commit
						30d54eb4f6
					
				
					 1 changed files with 11 additions and 10 deletions
				
			
		
							
								
								
									
										21
									
								
								SConstruct
									
									
									
									
									
								
							
							
						
						
									
										21
									
								
								SConstruct
									
									
									
									
									
								
							| 
						 | 
					@ -5,19 +5,11 @@
 | 
				
			||||||
#  James Turk (jpt2433@rit.edu)
 | 
					#  James Turk (jpt2433@rit.edu)
 | 
				
			||||||
#
 | 
					#
 | 
				
			||||||
# Version:
 | 
					# Version:
 | 
				
			||||||
#  $Id: SConstruct,v 1.8 2005/05/14 02:16:42 cozman Exp $
 | 
					#  $Id: SConstruct,v 1.9 2005/05/14 02:30:10 cozman Exp $
 | 
				
			||||||
 | 
					
 | 
				
			||||||
import os,os.path
 | 
					import os,os.path
 | 
				
			||||||
import glob
 | 
					import glob
 | 
				
			||||||
 | 
					import string
 | 
				
			||||||
def buildSuperHeader(self):
 | 
					 | 
				
			||||||
    header = file('include/'+LIBRARY+'.hpp','w')
 | 
					 | 
				
			||||||
    incGuard = string.upper(LIBRARY)+'_HPP'
 | 
					 | 
				
			||||||
    header.write('#ifndef '+incGuard+'\n')
 | 
					 | 
				
			||||||
    header.write('#define '+incGuard+'\n\n')
 | 
					 | 
				
			||||||
    for inc in INC_FILES:
 | 
					 | 
				
			||||||
        header.write('#include "'+inc+'"\n')
 | 
					 | 
				
			||||||
    header.write('\n#endif // '+incGuard+'\n')
 | 
					 | 
				
			||||||
 | 
					
 | 
				
			||||||
def getFilesMulti(paths, pat):
 | 
					def getFilesMulti(paths, pat):
 | 
				
			||||||
    """Get all files which match a glob in a set of directories"""
 | 
					    """Get all files which match a glob in a set of directories"""
 | 
				
			||||||
| 
						 | 
					@ -63,6 +55,15 @@ if not conf.CheckLibWithHeader('glfw', 'GL/glfw.h', 'C++'):
 | 
				
			||||||
    Exit(1)
 | 
					    Exit(1)
 | 
				
			||||||
env = conf.Finish()
 | 
					env = conf.Finish()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					# Build the Super-Header
 | 
				
			||||||
 | 
					header = file('include/'+LIBRARY+'.hpp','w')
 | 
				
			||||||
 | 
					incGuard = LIBRARY.upper()+'_HPP'
 | 
				
			||||||
 | 
					header.write('#ifndef '+incGuard+'\n')
 | 
				
			||||||
 | 
					header.write('#define '+incGuard+'\n\n')
 | 
				
			||||||
 | 
					for inc in INC_FILES:
 | 
				
			||||||
 | 
					    header.write('#include "'+inc.replace('include/','')+'"\n')
 | 
				
			||||||
 | 
					header.write('\n#endif // '+incGuard+'\n')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Define Builds:
 | 
					# Define Builds:
 | 
				
			||||||
BuildDir('build', 'src', duplicate=0)
 | 
					BuildDir('build', 'src', duplicate=0)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue