summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/Makefile34
-rw-r--r--src/tools/MkHelpFile.hs18
2 files changed, 30 insertions, 22 deletions
diff --git a/src/Makefile b/src/Makefile
index 787f78bbf..f4c743649 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -23,7 +23,10 @@ BIN_DIST_DIR=$(DIST_DIR)-$(host)
SNAPSHOT_DIR=GF-$(shell date +%Y%m%d)
-all: unix gfdoc jar
+.PHONY: all install install-gf install-gfdoc install-editor \
+ today help clean
+
+all: unix tools/gfdoc jar
temp: today touch-files noopt
@@ -74,9 +77,11 @@ nofud-links:
ln -s ../for-ghc/Arch.hs for-ghc-nofud
api:
- $(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) API.hs
+ $(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) GF/API.hs
+
shell:
- $(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) Shell.hs
+ $(GHMAKE) $(GHCFLAGS) $(GHCINCLUDE) GF/Shell.hs
+
clean:
-rm -rf */*.o */*.hi *.o *.hi */*.ghi *.ghi *~ */*~
-rm -f GF/*.{o,hi,ghi} GF/*/*.{o,hi,ghi} GF/*/*/*.{o,hi,ghi}
@@ -85,7 +90,7 @@ clean:
distclean: clean
-rm -f for-ghc-nofud/*.hs
-rm -f java/gf-java.jar jgf
- -rm -f util/gfdoc
+ -rm -f tools/gfdoc
-rm -f config.status config.mk config.log
-rm -f *.tgz *.zip
-rm -rf $(DIST_DIR) $(BIN_DIST_DIR)
@@ -102,8 +107,11 @@ javac:
jar: javac
cd java; $(JAR) -cmf manifest.txt gf-java.jar *.class
-help:
- cd util ; runhugs MkHelpFile ; mv HelpFile.hs .. ; cd ..
+tools/MkHelpFile: tools/MkHelpFile.hs
+ $(GHMAKE) -o $@ $^
+
+help: tools/MkHelpFile
+ tools/MkHelpFile
# added by peb:
tracing: GHCFLAGS += -DTRACING
@@ -144,8 +152,8 @@ binary-dist:
rm -rf $(BIN_DIST_DIR)
mkdir $(BIN_DIST_DIR)
./configure --host="$(host)" CPPFLAGS="`lib__readline -I` `lib__ncurses -I`" LDFLAGS="`lib__readline -l` `lib__ncurses -l`"
- $(MAKE) unix gfdoc jar
- $(INSTALL) ../bin/gf util/gfdoc $(BIN_DIST_DIR)
+ $(MAKE) all
+ $(INSTALL) ../bin/gf tools/gfdoc $(BIN_DIST_DIR)
$(INSTALL) -m 0644 java/gf-java.jar $(BIN_DIST_DIR)
$(INSTALL) configure config.guess config.sub install-sh $(BIN_DIST_DIR)
$(INSTALL) -m 0644 config.mk.in jgf.in $(BIN_DIST_DIR)
@@ -155,20 +163,20 @@ binary-dist:
gtar -zcf GF-$(PACKAGE_VERSION)-$(host).tgz $(BIN_DIST_DIR)
rm -rf $(BIN_DIST_DIR)
+install: install-gf install-gfdoc install-editor
+
install-gf:
$(INSTALL) -d $(bindir)
$(INSTALL) ../bin/gf $(bindir)
install-gfdoc:
$(INSTALL) -d $(bindir)
- $(INSTALL) util/gfdoc $(bindir)
+ $(INSTALL) tools/gfdoc $(bindir)
install-editor:
$(INSTALL) -d $(datadir)/GF-$(PACKAGE_VERSION)
$(INSTALL) jgf $(bindir)
$(INSTALL) -m 0644 java/gf-java.jar $(datadir)/GF-$(PACKAGE_VERSION)
-install: install-gf install-gfdoc install-editor
-
-gfdoc:
- cd util ; $(GHMAKE) GFDoc.hs -o gfdoc ; cd ..
+tools/gfdoc: tools/GFDoc.hs
+ $(GHMAKE) -o $@ $^
diff --git a/src/tools/MkHelpFile.hs b/src/tools/MkHelpFile.hs
index ab88e6c7f..89e8c3634 100644
--- a/src/tools/MkHelpFile.hs
+++ b/src/tools/MkHelpFile.hs
@@ -4,9 +4,9 @@
-- Stability : (stable)
-- Portability : (portable)
--
--- > CVS $Date: 2005/04/16 05:40:51 $
--- > CVS $Author: peb $
--- > CVS $Revision: 1.7 $
+-- > CVS $Date: 2005/04/21 11:38:24 $
+-- > CVS $Author: bringert $
+-- > CVS $Revision: 1.8 $
--
-- Compile @HelpFile.hs@ from the text file @HelpFile@.
-----------------------------------------------------------------------------
@@ -16,11 +16,11 @@ module Main (main) where
main = do
s <- readFile "HelpFile"
let s' = mkHsFile (lines s)
- writeFile "HelpFile.hs" s'
+ writeFile "GF/Shell/HelpFile.hs" s'
mkHsFile ss =
helpHeader ++
- "module HelpFile where\n\n" ++
+ "module GF.Shell.HelpFile where\n\n" ++
"import Operations\n\n" ++
"txtHelpFileSummary =\n" ++
" unlines $ map (concat . take 1 . lines) $ paragraphs txtHelpFile\n\n" ++
@@ -43,14 +43,14 @@ mkOne s = " \"" ++ pref s ++ (escs s) ++ "\" ++"
helpHeader = unlines [
"----------------------------------------------------------------------",
"-- |",
- "-- Module : HelpFile",
+ "-- Module : GF.Shell.HelpFile",
"-- Maintainer : Aarne Ranta",
"-- Stability : (stable)",
"-- Portability : (portable)",
"--",
- "-- > CVS $Date: 2005/04/16 05:40:51 $",
- "-- > CVS $Author: peb $",
- "-- > CVS $Revision: 1.7 $",
+ "-- > CVS $Date: 2005/04/21 11:38:24 $",
+ "-- > CVS $Author: bringert $",
+ "-- > CVS $Revision: 1.8 $",
"--",
"-- Help on shell commands. Generated from HelpFile by 'make help'.",
"-- PLEASE DON'T EDIT THIS FILE.",