summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbringert <unknown>2004-06-23 13:09:56 +0000
committerbringert <unknown>2004-06-23 13:09:56 +0000
commitf753d01a0b4771ad84649ebbdf7ad178b2308690 (patch)
treeec9b155684d2d8d2aee4005a9f62dd3f0a3f4a0e /src
parent6802bcca2c9a1e7d3e079b308844ec6422a2af48 (diff)
Added ReleaseProcedure. Added configureation and makefiles for binary packages. Configure now lets you specify which javac and jar to use.
Diffstat (limited to 'src')
-rw-r--r--src/INSTALL.binary16
-rw-r--r--src/Makefile19
-rw-r--r--src/Makefile.binary11
-rw-r--r--src/ReleaseProcedure65
-rw-r--r--src/config.mk.in3
-rw-r--r--src/configure.ac30
6 files changed, 135 insertions, 9 deletions
diff --git a/src/INSTALL.binary b/src/INSTALL.binary
new file mode 100644
index 000000000..94ef1676f
--- /dev/null
+++ b/src/INSTALL.binary
@@ -0,0 +1,16 @@
+Installing a binary GF distribution:
+
+1. Untar the distribution file:
+
+ $ gtar -zxf GF-2.0-[host].tar.gz
+
+2. If you don't want to install the files under /usr/local,
+ run configure with the right installation prefix:
+
+ E.g.
+
+ $ ./configure --prefix=/usr
+
+3. Install:
+
+ $ make install
diff --git a/src/Makefile b/src/Makefile
index 86f112f5b..40ccec930 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -101,10 +101,10 @@ ghci-nofud:
today:
util/mktoday.sh
javac:
- javac -target 1.4 -source 1.4 java/*.java
+ $(JAVAC) -target 1.4 -source 1.4 java/*.java
jar: javac
- cd java; jar -cmf manifest.txt gf-java.jar *.class
+ cd java; $(JAR) -cmf manifest.txt gf-java.jar *.class
help:
cd util ; runhugs MkHelpFile ; mv HelpFile.hs .. ; cd ..
@@ -123,7 +123,6 @@ dist:
find $(DIST_DIR) -name .cvsignore -exec rm -f {} ';'
cd $(DIST_DIR) && rm -rf $(NOT_IN_DIST)
gtar -zcf $(DIST_DIR).tar.gz $(DIST_DIR)
- zip -r $(DIST_DIR).zip $(DIST_DIR)
rm -rf $(DIST_DIR)
rpm: dist
@@ -132,9 +131,15 @@ rpm: dist
binary-dist:
rm -rf $(BIN_DIST_DIR)
mkdir $(BIN_DIST_DIR)
- ./configure CPPFLAGS="`lib__readline -I` `lib__ncurses -I`" LDFLAGS="`lib__readline -l` `lib__ncurses -l`"
- make unix gfdoc jar
- make prefix=$(BIN_DIST_DIR)/$(prefix) install
+ ./configure --host="$(host)" CPPFLAGS="`lib__readline -I` `lib__ncurses -I`" LDFLAGS="`lib__readline -l` `lib__ncurses -l`"
+# make unix gfdoc jar
+ make gfdoc jar
+ make prefix=$(BIN_DIST_DIR)/$(prefix) install
+ $(INSTALL) configure $(BIN_DIST_DIR)
+ $(INSTALL) -m 0644 config.mk.in config.mk jgf.in $(BIN_DIST_DIR)
+ $(INSTALL) -m 0644 ../README ../LICENSE $(BIN_DIST_DIR)
+ $(INSTALL) -m 0644 INSTALL.binary $(BIN_DIST_DIR)/INSTALL
+ $(INSTALL) -m 0644 Makefile.binary $(BIN_DIST_DIR)/Makefile
gtar -zcf GF-$(PACKAGE_VERSION)-$(host).tar.gz $(BIN_DIST_DIR)
rm -rf $(BIN_DIST_DIR)
@@ -149,7 +154,7 @@ install-gfdoc:
install-editor:
$(INSTALL) -d $(libdir)/GF-$(PACKAGE_VERSION)
$(INSTALL) jgf $(bindir)
- $(INSTALL) java/gf-java.jar $(libdir)/GF-$(PACKAGE_VERSION)
+ $(INSTALL) -m 0644 java/gf-java.jar $(libdir)/GF-$(PACKAGE_VERSION)
install: install-gf install-gfdoc install-editor
diff --git a/src/Makefile.binary b/src/Makefile.binary
new file mode 100644
index 000000000..32ce409b6
--- /dev/null
+++ b/src/Makefile.binary
@@ -0,0 +1,11 @@
+include config.mk
+
+GF_LIB_DIR=$(libdir)/GF-$(PACKAGE_VERSION)
+
+install:
+ $(INSTALL) -d $(bindir)
+ $(INSTALL) ./$(bindir)/* $(bindir)
+# overwrite the old one with the newly configured one if there is one
+ [ -f jgf ] && $(INSTALL) jgf $(bindir)
+ $(INSTALL) -d $(GF_LIB_DIR)
+ $(INSTALL) -m 0644 ./$(GF_LIB_DIR)/* $(GF_LIB_DIR)
diff --git a/src/ReleaseProcedure b/src/ReleaseProcedure
new file mode 100644
index 000000000..c08541c48
--- /dev/null
+++ b/src/ReleaseProcedure
@@ -0,0 +1,65 @@
+Procedure for making a GF release:
+
+1. Make sure everything the should be in the release has been
+ checked in.
+
+2. Go to the src/ dir.
+
+ $ cd src
+
+3. Edit configure.ac to set the right version number
+ (the second argument to the AC_INIT macro).
+
+4. Edit gf.spec to set the version and release numbers
+ (change %define version and %define release).
+
+5. Commit configure.ac and gf.spec:
+
+ $ cvs commit -m 'Updated version numbers.' configure.ac gf.spec
+
+6. Go back to the root of the tree.
+
+ $ cd ..
+
+7. Tag the release. (X_X should be replaced by the version number, with
+ _ instead of ., e.g. 2_0)
+
+ $ cvs tag RELEASE-X_X
+
+8. Build a source package:
+
+ $ cd src
+ $ ./configure
+ $ make dist
+
+9. Build an x86/linux RPM (should be done on a Mandrake Linux box):
+
+ $ cd src
+ $ ./configure
+ $ make rpm
+
+10. Build a generic binary x86/linux (should be done on a Linux box,
+ e.g. banded.medic.chalmers.se):
+
+ $ cd src
+ $ ./configure --host=i386-pc-linux-gnu
+ $ make binary-dist
+
+11. Build a generic binary sparc/solaris package (should be done on a Solaris box,
+ e.g. remote1.cs.chalmers.se):
+
+ $ cd src
+ $ ./configure --host=sparc-sun-solaris2
+ $ make binary-dist
+
+12. Build a Mac OS X package:
+
+ ???
+
+13. Build a Windows package:
+
+ ???
+
+14. Update website.
+
+15. Party!
diff --git a/src/config.mk.in b/src/config.mk.in
index 356e163bb..806714580 100644
--- a/src/config.mk.in
+++ b/src/config.mk.in
@@ -17,3 +17,6 @@ INSTALL = @INSTALL@
GHC = @GHC@
GHCI = @GHCI@
+
+JAVAC = @JAVAC@
+JAR = @JAR@ \ No newline at end of file
diff --git a/src/configure.ac b/src/configure.ac
index c36de72ea..b8dc606b2 100644
--- a/src/configure.ac
+++ b/src/configure.ac
@@ -4,11 +4,11 @@ AC_INIT([GF],[2.0],[aarne@cs.chalmers.se],[GF])
AC_PREREQ(2.53)
-AC_REVISION($Revision: 1.4 $)
+AC_REVISION($Revision: 1.5 $)
AC_CONFIG_FILES([config.mk jgf])
-AC_CANONICAL_SYSTEM
+AC_CANONICAL_HOST
dnl ***********************************************
@@ -28,6 +28,32 @@ AC_SUBST(GHC)
AC_SUBST(GHCI)
dnl ***********************************************
+dnl javac
+dnl ***********************************************
+
+AC_ARG_WITH(javac,
+ AC_HELP_STRING([--with-javac=<javac command>],
+ [Use a different command instead of
+ 'javac' for the Java compiler.]),
+ [AC_CHECK_FILE("$withval",JAVAC="$withval",[AC_PATH_PROG(JAVAC,"$withval")])],
+ [AC_PATH_PROG(JAVAC,javac)])
+
+AC_SUBST(JAVAC)
+
+dnl ***********************************************
+dnl jar
+dnl ***********************************************
+
+AC_ARG_WITH(jar,
+ AC_HELP_STRING([--with-jar=<jar command>],
+ [Use a different command instead of
+ 'jar' for the Java archive tool.]),
+ [AC_CHECK_FILE("$withval",JAR="$withval",[AC_PATH_PROG(JAR,"$withval")])],
+ [AC_PATH_PROG(JAR,jar)])
+
+AC_SUBST(JAR)
+
+dnl ***********************************************
dnl Other programs
dnl ***********************************************