[m-rev.] for review: Delete mkinit_erl program.

Peter Wang novalazy at gmail.com
Mon Oct 26 17:09:22 AEDT 2020


util/.gitignore:
util/Mmakefile:
    Don't build or install the mkinit_erl program.

util/mkinit.c:
util/mkinit_common.c:
    Remove references to mkinit_erl.c.

    Delete handling of -m option (only used by mkinit_erl).

util/mkinit_erl.c:
    Delete source file.
---
 util/.gitignore      |   1 -
 util/Mmakefile       |  14 +-
 util/mkinit.c        |  11 +-
 util/mkinit_common.c |   2 +-
 util/mkinit_erl.c    | 560 -------------------------------------------
 5 files changed, 3 insertions(+), 585 deletions(-)
 delete mode 100644 util/mkinit_erl.c

diff --git a/util/.gitignore b/util/.gitignore
index 26fc26abd..b196229c4 100644
--- a/util/.gitignore
+++ b/util/.gitignore
@@ -1,5 +1,4 @@
 mkinit
-mkinit_erl
 mdemangle
 mfiltercc
 info_to_mdb
diff --git a/util/Mmakefile b/util/Mmakefile
index a90e8281c..54674ddef 100644
--- a/util/Mmakefile
+++ b/util/Mmakefile
@@ -20,7 +20,7 @@ include $(MERCURY_DIR)/Mmake.common
 
 CFLAGS = -I$(RUNTIME_DIR) -I../getopt
 
-PROGS=mkinit mkinit_erl mdemangle mfiltercc info_to_mdb
+PROGS=mkinit mdemangle mfiltercc info_to_mdb
 PROGFILENAMES=$(PROGS:%=%$(EXT_FOR_EXE))
 SRC=$(PROGS:%=%.c)
 
@@ -33,7 +33,6 @@ endif
 
 # mkinit.c needs `struct stat'
 MGNUCFLAGS-mkinit = --no-ansi
-MGNUCFLAGS-mkinit_erl = --no-ansi
 
 # For the C distribution mfiltercc may not be available until after we build
 # it here.
@@ -52,11 +51,6 @@ mkinit$(EXT_FOR_EXE): mkinit.c mkinit_common.c mkinit_common.h
 	$(MGNUC) --no-mercury-stdlib-dir \
 		$(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(ALL_LDFLAGS) -Fe$@ \
 			mkinit.c mkinit_common.c $(GETOPT_SRC)
-
-mkinit_erl$(EXT_FOR_EXE): mkinit_erl.c mkinit_common.c mkinit_common.h
-	$(MGNUC) --no-mercury-stdlib-dir \
-		$(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(ALL_LDFLAGS) -Fe$@ \
-			mkinit_erl.c mkinit_common.c $(GETOPT_SRC)
 else
 .c$(EXT_FOR_EXE):
 	$(MGNUC) --no-mercury-stdlib-dir \
@@ -66,12 +60,6 @@ mkinit$(EXT_FOR_EXE): mkinit.c mkinit_common.c mkinit_common.h
 	$(MGNUC) --no-mercury-stdlib-dir \
 		$(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(ALL_LDFLAGS) -o $@ \
 			mkinit.c mkinit_common.c $(GETOPT_SRC)
-
-mkinit_erl$(EXT_FOR_EXE): mkinit_erl.c mkinit_common.c mkinit_common.h
-	$(MGNUC) --no-mercury-stdlib-dir \
-		$(GRADEFLAGS) $(ALL_MGNUCFLAGS) $(ALL_LDFLAGS) -o $@ \
-			mkinit_erl.c mkinit_common.c $(GETOPT_SRC)
-
 endif
 
 tags:
diff --git a/util/mkinit.c b/util/mkinit.c
index 110663f37..8b46b95c2 100644
--- a/util/mkinit.c
+++ b/util/mkinit.c
@@ -28,7 +28,6 @@
 //      - compiler/compile_target_code.m
 //          in particular the predicates make_init_obj/7 and
 //          make_standalone_interface/3.
-//      - util/mkinit_erl.c
 
 /////////////////////////////////////////////////////////////////////////////
 
@@ -808,10 +807,7 @@ parse_options(int argc, char *argv[])
     String_List *tmp_slist;
     int         seen_f_option = 0;
 
-    // The set of options for mkinit and mkinit_erl should be kept in sync,
-    // even if they may not necessarily make sense.
-
-    while ((c = getopt(argc, argv, "A:c:f:g:iI:lm:o:r:tw:xX:ks")) != EOF) {
+    while ((c = getopt(argc, argv, "A:c:f:g:iI:l:o:r:tw:xX:ks")) != EOF) {
         switch (c) {
         case 'A':
             // Add the argument to the end of the list of always executed
@@ -902,11 +898,6 @@ parse_options(int argc, char *argv[])
             output_main_func = MR_FALSE; // -s implies -l
             break;
 
-        case 'm':
-            // Used by mkinit_erl.
-            usage();
-            break;
-
         default:
             usage();
         }
diff --git a/util/mkinit_common.c b/util/mkinit_common.c
index 329e999d7..93010b627 100644
--- a/util/mkinit_common.c
+++ b/util/mkinit_common.c
@@ -11,7 +11,7 @@
 ** File: mkinit_common.c
 ** Main authors: zs, fjh
 **
-** Common code shared by mkinit.c and mkinit_erl.c.
+** Common code previously shared by mkinit.c and mkinit_erl.c.
 **
 */
 
diff --git a/util/mkinit_erl.c b/util/mkinit_erl.c
deleted file mode 100644
index 3861d9dd3..000000000
--- a/util/mkinit_erl.c
+++ /dev/null
[snip]


More information about the reviews mailing list