| 12
 3
 4
 5
 6
 7
 8
 9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 
 | From: Debian QA Group <packages@qa.debian.org>
Date: Sun, 26 Dec 2021 12:13:17 +0100
Subject: dont-regenerate-existing-ofiles
---
 src/main.ml | 12 ++++++++----
 1 file changed, 8 insertions(+), 4 deletions(-)
diff --git a/src/main.ml b/src/main.ml
index 28b004c..253e5d0 100644
--- a/src/main.ml
+++ b/src/main.ml
@@ -150,10 +150,14 @@ let main source =
             done;
 
             (* store compiled grammar *)
-            try
-            	msg "storing compiled grammar...";
-            	store_obj source decls
-            with Failure s -> msg s
+	    if (Sys.file_exists(source^".o") = false)
+	    then
+	    begin
+                try
+            	    msg "storing compiled grammar...";
+            	    store_obj source decls
+                with Failure s -> msg s
+	    end
 ;;
 
 
 |