Previous Topic Next topic Print topic


Differences Between Build and Rebuild

To see the differences between build and rebuild, follow these steps:

  1. Add a new include file to the project as demonstrated earlier in the tutorial.
  2. Change the contents of the include file to:
    /* Micro Focus Open PL/I Include File */
      put skip list ('jim', MSG);
    
  3. Make sure Build Option in the include file's properties is set to Content.
  4. Change the contents of program.pli to:
    /* Micro Focus Open PL/I Console Application */
     %replace MSG by 'From inclue - main';
     program: proc options (main);
       dcl sub entry;
       dcl a1 char(14);
       put skip list ('Hello world - main' );
       %include 'include1.in';
       call sub();
       put skip;
       get list (a1);
      
     end program;
    
  5. Change the contents of sub.pli to:
    /* Micro Focus Open PL/I program */
     %replace MSG by 'From inclue - sub';
    
    sub: proc;
       put skip list ('Hello world sub' );
       %include 'include1.in';
    end sub;
    
  6. Go to Project Properties > Pre-processors.
  7. Change the value of Macro Pre-processor to Yes.
  8. On the menu bar, click Build > Rebuild Solution and inspect the Output window. This will compile both program.pli and sub.pli.
  9. On the menu bar, click Build > Build Solution. You will now get the following message in the output window:
    Target "CoreCompile" in project "PLIPROJ.pliproj"
           Skipping target "CoreCompile" because all output files are up-to-date with respect to the input files.
    
    

    If you change one of the source files and then click Build > Build Solution, only that program will be compiled.

    If you change the include file, both programs will be compiled, because it is included in both of them. Any program that does not use the include file, will not be re-compiled.

Previous Topic Next topic Print topic