Rename config.ml -> goaljobs_config.ml to avoid conflicting module names.
authorRichard W.M. Jones <rjones@redhat.com>
Tue, 17 Sep 2013 11:13:32 +0000 (12:13 +0100)
committerRichard W.M. Jones <rjones@redhat.com>
Tue, 17 Sep 2013 11:38:01 +0000 (12:38 +0100)
It would be useful to allow user scripts to use the module
name 'Config'.

.depend
.gitignore
Makefile.am
TODO [new file with mode: 0644]
configure.ac
goaljobs.ml
goaljobs_config.ml.in [moved from config.ml.in with 100% similarity]

diff --git a/.depend b/.depend
index 2440c82..e4f3d09 100644 (file)
--- a/.depend
+++ b/.depend
@@ -1,5 +1,5 @@
-config.cmo :
-config.cmx :
 goaljobs.cmi :
-goaljobs.cmo : config.cmo goaljobs.cmi
-goaljobs.cmx : config.cmx goaljobs.cmi
+goaljobs.cmo : goaljobs_config.cmo goaljobs.cmi
+goaljobs.cmx : goaljobs_config.cmx goaljobs.cmi
+goaljobs_config.cmo :
+goaljobs_config.cmx :
index 78fe55c..68cd58c 100644 (file)
@@ -17,12 +17,12 @@ Makefile
 /config.h
 /config.h.in
 /config.log
-/config.ml
 /config.status
 /config.sub
 /configure
 /examples/compile-c/compile
 /examples/compile-c/program
+/goaljobs_config.ml
 /goaljobs.spec
 /goaljobs-*.tar.gz
 /install-sh
index 53f50d3..e752ae5 100644 (file)
@@ -20,21 +20,23 @@ include common-rules.mk
 ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = \
-       config.ml.in \
        COPYING \
        goaljobs \
+       goaljobs_config.ml.in \
+       goaljobs.ml \
+       goaljobs.mli \
        goaljobs.spec \
        goaljobs.spec.in \
        META.in \
        NOTES \
+       pa_goal.ml \
        README \
-       $(sources) \
-       pa_goal.ml
+       TODO
 
 SUBDIRS = . examples tests
 
 sources = \
-       config.ml \
+       goaljobs_config.ml \
        goaljobs.ml \
        goaljobs.mli
 
@@ -46,10 +48,10 @@ bin_SCRIPTS = goaljobs
 noinst_SCRIPTS = goaljobs.cma goaljobs.cmxa pa_goal.cmo
 
 # Library.
-goaljobs.cma: config.cmo goaljobs.cmo
+goaljobs.cma: goaljobs_config.cmo goaljobs.cmo
        $(OCAMLFIND) ocamlc -a -o $@ $(OCAMLCFLAGS) $(OCAMLCPACKAGES) $^
 
-goaljobs.cmxa: config.cmx goaljobs.cmx
+goaljobs.cmxa: goaljobs_config.cmx goaljobs.cmx
        $(OCAMLFIND) ocamlopt -a -o $@ $(OCAMLOPTFLAGS) $(OCAMLOPTPACKAGES) $^
 
 # Preprocessor for goaljobs scripts.
diff --git a/TODO b/TODO
new file mode 100644 (file)
index 0000000..50b3c4b
--- /dev/null
+++ b/TODO
@@ -0,0 +1,6 @@
+Enhancements to pa_goal:
+
+ - Include the goal name, source file location in the generated
+   rule so we can improve error messages.
+
+ - Implement some sort of tracing based on the above.
index 3466970..7097795 100644 (file)
@@ -89,7 +89,7 @@ if test "x$PERLDOC" = "x"; then
 fi
 
 AC_CONFIG_HEADERS([config.h])
-AC_CONFIG_FILES([config.ml
+AC_CONFIG_FILES([goaljobs_config.ml
                  goaljobs.spec
                  Makefile
                  META
index c68bc31..53db37c 100644 (file)
@@ -19,6 +19,8 @@
 open Unix
 open Printf
 
+open Goaljobs_config
+
 type goal_result_t = Goal_OK | Goal_failed of string
 exception Goal_result of goal_result_t
 
@@ -168,7 +170,7 @@ let init () =
   let args = ref [] in
 
   let display_version () =
-    printf "%s %s\n" Config.package_name Config.package_version;
+    printf "%s %s\n" package_name package_version;
     exit 0
   in
 
similarity index 100%
rename from config.ml.in
rename to goaljobs_config.ml.in