Changeset 25a9b5a for src/main.cc


Ignore:
Timestamp:
Aug 2, 2018, 2:52:59 PM (3 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, no_list, persistent-indexer
Children:
c59712e
Parents:
bf71cfd
Message:

Added defines for prelude path in tree

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/main.cc

    rbf71cfd r25a9b5a  
    208208
    209209                        // Read to gcc builtins, if not generating the cfa library
    210                         FILE * gcc_builtins = fopen( libcfap | treep ? "../prelude/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
     210                        FILE * gcc_builtins = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/gcc-builtins.cf" : CFA_LIBDIR "/gcc-builtins.cf", "r" );
    211211                        assertf( gcc_builtins, "cannot open gcc-builtins.cf\n" );
    212212                        parse( gcc_builtins, LinkageSpec::Compiler );
    213213
    214214                        // read the extra prelude in, if not generating the cfa library
    215                         FILE * extras = fopen( libcfap | treep ? "../prelude/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
     215                        FILE * extras = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/extras.cf" : CFA_LIBDIR "/extras.cf", "r" );
    216216                        assertf( extras, "cannot open extras.cf\n" );
    217217                        parse( extras, LinkageSpec::BuiltinC );
     
    219219                        if ( ! libcfap ) {
    220220                                // read the prelude in, if not generating the cfa library
    221                                 FILE * prelude = fopen( treep ? "../prelude/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
     221                                FILE * prelude = fopen( treep ? PRELUDE_BUILDDIR "/prelude.cf" : CFA_LIBDIR "/prelude.cf", "r" );
    222222                                assertf( prelude, "cannot open prelude.cf\n" );
    223223                                parse( prelude, LinkageSpec::Intrinsic );
    224224
    225225                                // Read to cfa builtins, if not generating the cfa library
    226                                 FILE * builtins = fopen( libcfap | treep ? "../prelude/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
     226                                FILE * builtins = fopen( libcfap | treep ? PRELUDE_BUILDDIR "/builtins.cf" : CFA_LIBDIR "/builtins.cf", "r" );
    227227                                assertf( builtins, "cannot open builtins.cf\n" );
    228228                                parse( builtins, LinkageSpec::BuiltinCFA );
     
    348348                PASS( "codegen", CodeGen::generate( translationUnit, *output, ! noprotop, prettycodegenp, true, linemarks ) );
    349349
    350                 CodeGen::FixMain::fix( *output, treep ? "../prelude/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
     350                CodeGen::FixMain::fix( *output, treep ? PRELUDE_BUILDDIR "/bootloader.c" : CFA_LIBDIR "/bootloader.c" );
    351351                if ( output != &cout ) {
    352352                        delete output;
Note: See TracChangeset for help on using the changeset viewer.