Search can open File URL's in mozilla/djview/xpdf/xchm
[sfinx.git] / Makefile
blobbf4cda285a376108fe48cd5d2b9b32321486d8a7
2 # Sfinx makefile
5 include Rules.Make
7 DIRS = lib sfinx faraon
9 .PHONY: lib sfinx faraon clean push pull initdb todo dcp commit install tgz
11 all: lib sfinx faraon
13 dist: clean dep all
15 depend dep:
16 @echo Making depend.
17 @for dir in $(DIRS); do\
18 (cd $$dir;$(MAKE) dep);\
19 done
21 lib:
22 (cd lib; $(MAKE))
24 sfinx:
25 (cd sfinx; $(MAKE))
27 faraon:
28 (cd faraon; $(MAKE))
30 clean:
31 @echo Cleaning garbage.
32 @for dir in $(DIRS); do\
33 (cd $$dir;$(MAKE) clean);\
34 done
35 @rm -rf *out DEAD* errorlog.make *tgz
37 push:
38 @git-push ssh://git@sfinx.od.ua/home/git/Harbour/sfinx
40 pull:
41 @git-pull ssh://git@sfinx.od.ua/home/git/Harbour/sfinx
43 initdb:
44 @echo -n "All Sfinx data ($(INSTALL_PREFIX)/share/sfinx/sfinx.fdb) will be DESTROYED ! Are you shure [Ny] ? "; \
45 read answer; \
46 case "$$answer" in \
47 [yY]) echo "Deleting Database ..." ; \
48 echo "TODO: check for running server !"; \
49 rm -f $(INSTALL_PREFIX)/share/sfinx/sfinx.fdb; \
50 echo "create database '$(INSTALL_PREFIX)/share/sfinx/sfinx.fdb' user 'sysdba' password 'harbour' page_size 16384 default character set koi8r;" > /tmp/create.sql ; \
51 isql -ch koi8r -s 3 -q -i /tmp/create.sql; \
52 rm -f /tmp/create.sql ; \
53 isql -ch koi8r -s 3 -q -u sysdba -p harbour -i ./scripts/db.sql $(INSTALL_PREFIX)/share/sfinx/sfinx.fdb ; \
54 echo Sfinx database initialized ;; \
55 *) exit;; \
56 esac
58 commit:
59 @git-diff
60 @git-commit -a
62 # diff/commit/push
64 dcp: commit push
66 todo:
67 @setterm -foreground red
68 @cat STATUS
69 @echo
70 install:
71 @strip -s sfinx/sfinx faraon/faraon
72 cp -f sfinx/sfinx $(INSTALL_PREFIX)/bin
73 cp -f faraon/faraon $(INSTALL_PREFIX)/bin
75 tgz:
76 @strip -s sfinx/sfinx faraon/faraon
77 @rm -rf /tmp/tgz/$(INSTALL_PREFIX)
78 @mkdir -p /tmp/tgz/$(INSTALL_PREFIX)/bin
79 @mkdir -p /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/etc
80 @mkdir -p /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/doc
81 @mkdir -p /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/backup
82 @cp -f README STATUS LICENSE INSTALL CREDITS NEWS /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/doc
83 @cp -f scripts/rc.sfinx /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/etc
84 @cp -f sfinx/sfinx faraon/faraon scripts/faraon.sh /tmp/tgz/$(INSTALL_PREFIX)/bin
85 @cp -a /usr/local/share/sfinx/libs /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx
86 @echo "create database '/tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/sfinx.fdb' user 'sysdba' password 'harbour' page_size 16384 default character set koi8r;" > /tmp/create.sql
87 @isql -ch koi8r -s 3 -q -i /tmp/create.sql
88 @rm -f /tmp/create.sql
89 @isql -ch koi8r -s 3 -q -u sysdba -p harbour -i ./scripts/db.sql /tmp/tgz/$(INSTALL_PREFIX)/share/sfinx/sfinx.fdb
90 @tar cfzp sfinx-current.x86.tgz -C /tmp/tgz .
91 @rm -rf /tmp/tgz
93 ###