Skip DLL compilation if no changes











up vote
1
down vote

favorite












I'm attempting to optimize our build procedure for our applications we have here. I'd like to skip the compilation of our backend .dll file should the file timestamp not have change using Netbeans Ant scripts.
I've been using Incremental and fast build using Ant and Advanced Free-form project configuration as a reference point but it seems to require 2 build targets to create the .timestamp comparison in the first link.



Is there a way to circumvent the need for 2 targets and check the timestamp of the .dll file instead? or do I simply need to add another tag inside of my call to make the comparison, or is what I'm trying to do not feasible?
Any help would be greatly appreciated or if better methods of doing this are known I am open to listening to it.

We use Netbeans to compile our projects, and uses Ant by default. I've included a snippit of my build.xml Ant script so far.

Thanks in advance!



<target name="init-skip-dll" description="initializes the skip property for the Ada dll">
<uptodate srcfile="create-ada-dll.timestamp" targetfile="ada-dll.timestamp" property="ada-dll.skip" value="true" />
</target>

<target name="-build-dll" description="builds the Ada dll if needed" depends="init-skip-dll">
<exec executable="gprbuild.exe">
<arg value="-P"/>
<arg file="..DLLifccs_dll.gpr"/>
</exec>
<touch file="create-ada-dll.timestamp"/>
</target>









share|improve this question


























    up vote
    1
    down vote

    favorite












    I'm attempting to optimize our build procedure for our applications we have here. I'd like to skip the compilation of our backend .dll file should the file timestamp not have change using Netbeans Ant scripts.
    I've been using Incremental and fast build using Ant and Advanced Free-form project configuration as a reference point but it seems to require 2 build targets to create the .timestamp comparison in the first link.



    Is there a way to circumvent the need for 2 targets and check the timestamp of the .dll file instead? or do I simply need to add another tag inside of my call to make the comparison, or is what I'm trying to do not feasible?
    Any help would be greatly appreciated or if better methods of doing this are known I am open to listening to it.

    We use Netbeans to compile our projects, and uses Ant by default. I've included a snippit of my build.xml Ant script so far.

    Thanks in advance!



    <target name="init-skip-dll" description="initializes the skip property for the Ada dll">
    <uptodate srcfile="create-ada-dll.timestamp" targetfile="ada-dll.timestamp" property="ada-dll.skip" value="true" />
    </target>

    <target name="-build-dll" description="builds the Ada dll if needed" depends="init-skip-dll">
    <exec executable="gprbuild.exe">
    <arg value="-P"/>
    <arg file="..DLLifccs_dll.gpr"/>
    </exec>
    <touch file="create-ada-dll.timestamp"/>
    </target>









    share|improve this question
























      up vote
      1
      down vote

      favorite









      up vote
      1
      down vote

      favorite











      I'm attempting to optimize our build procedure for our applications we have here. I'd like to skip the compilation of our backend .dll file should the file timestamp not have change using Netbeans Ant scripts.
      I've been using Incremental and fast build using Ant and Advanced Free-form project configuration as a reference point but it seems to require 2 build targets to create the .timestamp comparison in the first link.



      Is there a way to circumvent the need for 2 targets and check the timestamp of the .dll file instead? or do I simply need to add another tag inside of my call to make the comparison, or is what I'm trying to do not feasible?
      Any help would be greatly appreciated or if better methods of doing this are known I am open to listening to it.

      We use Netbeans to compile our projects, and uses Ant by default. I've included a snippit of my build.xml Ant script so far.

      Thanks in advance!



      <target name="init-skip-dll" description="initializes the skip property for the Ada dll">
      <uptodate srcfile="create-ada-dll.timestamp" targetfile="ada-dll.timestamp" property="ada-dll.skip" value="true" />
      </target>

      <target name="-build-dll" description="builds the Ada dll if needed" depends="init-skip-dll">
      <exec executable="gprbuild.exe">
      <arg value="-P"/>
      <arg file="..DLLifccs_dll.gpr"/>
      </exec>
      <touch file="create-ada-dll.timestamp"/>
      </target>









      share|improve this question













      I'm attempting to optimize our build procedure for our applications we have here. I'd like to skip the compilation of our backend .dll file should the file timestamp not have change using Netbeans Ant scripts.
      I've been using Incremental and fast build using Ant and Advanced Free-form project configuration as a reference point but it seems to require 2 build targets to create the .timestamp comparison in the first link.



      Is there a way to circumvent the need for 2 targets and check the timestamp of the .dll file instead? or do I simply need to add another tag inside of my call to make the comparison, or is what I'm trying to do not feasible?
      Any help would be greatly appreciated or if better methods of doing this are known I am open to listening to it.

      We use Netbeans to compile our projects, and uses Ant by default. I've included a snippit of my build.xml Ant script so far.

      Thanks in advance!



      <target name="init-skip-dll" description="initializes the skip property for the Ada dll">
      <uptodate srcfile="create-ada-dll.timestamp" targetfile="ada-dll.timestamp" property="ada-dll.skip" value="true" />
      </target>

      <target name="-build-dll" description="builds the Ada dll if needed" depends="init-skip-dll">
      <exec executable="gprbuild.exe">
      <arg value="-P"/>
      <arg file="..DLLifccs_dll.gpr"/>
      </exec>
      <touch file="create-ada-dll.timestamp"/>
      </target>






      java optimization netbeans ant ada






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 20 at 16:15









      FunkyMonkey

      2318




      2318
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          1
          down vote













          I don’t use Ant, but the same problem exists with Make; the Ada dependency rules are complex, and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-date. Gprbuild will do nothing besides checking dependencies if the DLL is actually up-to-date.



          In Make, this involves a phony target: e.g. for a real target testbed,



          testbed: force
          gprbuild -p -P testbed

          .PHONY: force


          or for an already-phony target



          all:
          gprbuild -p -P build_runtime.gpr

          .PHONY: all


          By the way, note the -p, which says to create needed directories, e.g. an object directory.






          share|improve this answer





















          • and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
            – LoneWanderer
            Nov 23 at 23:46











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53397157%2fskip-dll-compilation-if-no-changes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          1
          down vote













          I don’t use Ant, but the same problem exists with Make; the Ada dependency rules are complex, and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-date. Gprbuild will do nothing besides checking dependencies if the DLL is actually up-to-date.



          In Make, this involves a phony target: e.g. for a real target testbed,



          testbed: force
          gprbuild -p -P testbed

          .PHONY: force


          or for an already-phony target



          all:
          gprbuild -p -P build_runtime.gpr

          .PHONY: all


          By the way, note the -p, which says to create needed directories, e.g. an object directory.






          share|improve this answer





















          • and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
            – LoneWanderer
            Nov 23 at 23:46















          up vote
          1
          down vote













          I don’t use Ant, but the same problem exists with Make; the Ada dependency rules are complex, and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-date. Gprbuild will do nothing besides checking dependencies if the DLL is actually up-to-date.



          In Make, this involves a phony target: e.g. for a real target testbed,



          testbed: force
          gprbuild -p -P testbed

          .PHONY: force


          or for an already-phony target



          all:
          gprbuild -p -P build_runtime.gpr

          .PHONY: all


          By the way, note the -p, which says to create needed directories, e.g. an object directory.






          share|improve this answer





















          • and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
            – LoneWanderer
            Nov 23 at 23:46













          up vote
          1
          down vote










          up vote
          1
          down vote









          I don’t use Ant, but the same problem exists with Make; the Ada dependency rules are complex, and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-date. Gprbuild will do nothing besides checking dependencies if the DLL is actually up-to-date.



          In Make, this involves a phony target: e.g. for a real target testbed,



          testbed: force
          gprbuild -p -P testbed

          .PHONY: force


          or for an already-phony target



          all:
          gprbuild -p -P build_runtime.gpr

          .PHONY: all


          By the way, note the -p, which says to create needed directories, e.g. an object directory.






          share|improve this answer












          I don’t use Ant, but the same problem exists with Make; the Ada dependency rules are complex, and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-date. Gprbuild will do nothing besides checking dependencies if the DLL is actually up-to-date.



          In Make, this involves a phony target: e.g. for a real target testbed,



          testbed: force
          gprbuild -p -P testbed

          .PHONY: force


          or for an already-phony target



          all:
          gprbuild -p -P build_runtime.gpr

          .PHONY: all


          By the way, note the -p, which says to create needed directories, e.g. an object directory.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 20 at 16:39









          Simon Wright

          16.4k21735




          16.4k21735












          • and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
            – LoneWanderer
            Nov 23 at 23:46


















          • and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
            – LoneWanderer
            Nov 23 at 23:46
















          and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
          – LoneWanderer
          Nov 23 at 23:46




          and best handled by unconditionally letting gprbuild do whatever it needs to to bring the DLL up-to-dat I agree. Trying to do anything else is overthinking (99% of the time).
          – LoneWanderer
          Nov 23 at 23:46


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53397157%2fskip-dll-compilation-if-no-changes%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Wiesbaden

          Marschland

          Dieringhausen