File: Makefile

package info (click to toggle)
geneweb 4.10-8
  • links: PTS
  • area: main
  • in suites: sarge
  • size: 5,524 kB
  • ctags: 2,713
  • sloc: ml: 44,386; sh: 1,720; perl: 782; makefile: 579
file content (74 lines) | stat: -rw-r--r-- 1,916 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# $Id: Makefile,v 4.8 2002/02/14 10:19:38 ddr Exp $

include ../tools/Makefile.inc

OCAMLI=-I ../wserver -I ../src
OBJS=../wserver/wserver.cmo ../src/version.cmo ../src/argl.cmo ../src/buff.cmo ../src/translate.cmo setup.cmo

all:: out

out:: setup.out
	$(RM) gwsetup
	cp setup.out gwsetup

opt:: setup.opt
	$(RM) gwsetup
	cp setup.opt gwsetup
	$(STRIP) gwsetup

clean::
	$(RM) gwsetup *.bat
	$(RM) -rf test

test: test_dir wrappers

wrappers:
	if test "$(CAMLP4F)" = "-DWIN95"; then \
	  echo 'cd gw' > test/gwd.bat; \
	  echo 'gwd' >> test/gwd.bat; \
	  echo 'cd gw' > test/gwsetup.bat; \
	  echo 'gwsetup' >> test/gwsetup.bat; \
	else \
	  (echo '#!/bin/sh'; \
	   echo 'mkdir -p bases'; \
	   echo 'cd bases'; \
	   echo 'exec ../gw/gwd -hd ../gw "$$@"') > test/gwd; \
	  (echo '#!/bin/sh'; \
	   echo 'mkdir -p bases'; \
	   echo 'cd bases'; \
	   echo 'exec ../gw/gwsetup -gd ../gw "$$@"') > test/gwsetup; \
	  chmod +x test/gwd test/gwsetup; \
	fi
	cd test; ln -s ../../etc/START.htm .

test_dir:
	mkdir test
	mkdir test/gw
	cd test/gw; ln -s ../../gwsetup gwsetup
	cd test/gw; ln -s ../.. setup
	cd test/gw; ln -s ../../../doc .
	cd test/gw; ln -s ../../../src/gwc .
	cd test/gw; cp ../../../src/gwd .
	cd test/gw; ln -s ../../../src/gwu .
	cd test/gw; ln -s ../../../src/consang .
	cd test/gw; ln -s ../../../hd/lang .
	cd test/gw; ln -s ../../../hd/images .
	cd test/gw; ln -s ../../../hd/etc .
	cd test/gw; ln -s ../../../ged2gwb/ged2gwb .
	cd test/gw; ln -s ../../../gwb2ged/gwb2ged .
	cd test/gw; ln -s ../../../etc/INSTALL.htm .
	cd test/gw; echo "127.0.0.1" > only.txt
	cd test/gw; echo "-setup_link" > gwd.arg

setup.out: $(OBJS)
	$(OCAMLC) -custom $(STATIC) unix.cma $(LIBUNIX) $(OBJS) -o setup.out

setup.opt: $(OBJS:.cmo=.cmx)
	$(OCAMLOPT) $(STATIC) unix.cmxa $(LIBUNIX) $(OBJS:.cmo=.cmx) -o setup.opt

depend:
	TOP=.. ../tools/camlp4_depend.sh $(OCAMLI) *.ml* > .depend

always:

include .depend