Commits

Anonymous committed ae41cfa

Build the Pynie executable by default, which requires Parrot version 1.4.

  • Participants
  • Parent commits d43a254

Comments (0)

Files changed (1)

     m = rx.match(l)
     if m:
         pc[m.group(1)] = m.group(2)
-            
+
+pv = pc['VERSION'].split('.')
+if int(pv[0]) < 1 or int(pv[1]) < 4:
+    print("\nPlease use Parrot version 1.4 or higher")
+    exit(1)
+
 PARROT        = "%s/parrot%s" % (pc['bindir'], pc['exe'])
 GRAMMAR_GEN   = "%s/%s/library/PGE/Perl6Grammar.pbc" % (pc['libdir'], pc['versiondir'])
 NQP           = "%s/%s/languages/nqp/nqp.pbc" % (pc['libdir'], pc['versiondir'])
 PCT           = "%s/library/PCT.pbc" % pc['libdir']
+PBC_TO_EXE    = "%s/pbc_to_exe%s" % (pc['bindir'], pc['exe'])
 
 GEN_SOURCES = [
   'include/gen_grammar.pir',
     
     if newer_group(SOURCES + BUILTINS_PIR, 'pynie.pbc'):
         spawn([PARROT, '-o', 'pynie.pbc', 'pynie.pir'])    
+    
+    if newer('pynie.pbc', 'pynie%s' % pc['exe']):
+        spawn([PBC_TO_EXE, 'pynie.pbc'])    
   
 class build_pynie(build):
     def run(self):
         print("""
             Following targets are available for the user:
 
-              build:             pynie.pbc and pynie$(EXE) executable
+              build:             pynie.pbc and pynie executable
                                  This is the default.
 
               test:              Run the test suite.