fix timestamps for generated .interface files to address GNU make 4.x: XDCTOOLS-427
diff --git a/src/packages/xdc/services/intern/cmd/Builder.java b/src/packages/xdc/services/intern/cmd/Builder.java
index 81e5d52..4c450f6 100644
--- a/src/packages/xdc/services/intern/cmd/Builder.java
+++ b/src/packages/xdc/services/intern/cmd/Builder.java
@@ -258,7 +258,6 @@
         Body bodyGen = new Body();
         Defs defsGen = new Defs();
 
-        bodyGen.gen(pkg, bdyout);
         defsGen.gen(pkg, true, defout);
 
         /* generate module and interface headers */
@@ -323,10 +322,15 @@
             }
         }
 
+        /* generate .defs and .c files last to ensure their dates are later
+         * than any generated file that does not appear in the pattern rule.
+         *
+         * See the "pattern rule" comments for the .inc file above for why.
+         */
         defsGen.gen(pkg, false, defout);
-
-        closeStream(bdyout);
         closeStream(defout);
+        bodyGen.gen(pkg, bdyout);
+        closeStream(bdyout);
 
         /*
           Invoke xdc.services.intern.gen.Doc().gen.