Makefile.src 4.31 KB
Newer Older
1
# $Id: Makefile.src,v 1.12 1994/03/09 01:58:31 ceder Exp $
Per Cederqvist's avatar
Per Cederqvist committed
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (C) 1991  Lysator Academic Computer Association.
#
# This file is part of the LysKOM server.
# 
# LysKOM is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by 
# the Free Software Foundation; either version 1, or (at your option) 
# any later version.
# 
# LysKOM is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
# 
# You should have received a copy of the GNU General Public License
# along with LysKOM; see the file COPYING.  If not, write to
# Lysator, c/o ISY, Linkoping University, S-581 83 Linkoping, SWEDEN,
# or the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, 
# MA 02139, USA.
#
# Please mail bug reports to bug-lyskom@lysator.liu.se. 
#

25
26
27
LK_STD([msg includes stamp-depend libraries binaries end-msg])
[SUBDIRS = doc scripts src run-support
SERVER-VER = 1.6]
Per Cederqvist's avatar
Per Cederqvist committed
28

29
30
define([dodistclean],dnl
[[	$(RM) $(GENERIC-DISTCLEAN) config.status
31
	$(RM) lib/lib*.a stamp-depend
Per Cederqvist's avatar
Per Cederqvist committed
32
33
34
35
36
37
	rmdir lib
]])dnl
dnl
dnl Most of the real installation is done from various other Makefiles, but
dnl most directories are created here.
define([doinstall],dnl
38
39
[[	$(SCRIPTDIR)/mkinstalldirs $(prefix) $(exec_prefix) $(bindir) $(dbdir)\
		$(etcdir) $(coredir)
Per Cederqvist's avatar
Per Cederqvist committed
40
41
42
43
44
45
	chmod 700 $(dbdir)
	if [ ! -f $(dbdir)/lyskomd-data ] && [ ! -f $(dbdir)/lyskomd-texts ];\
	  then cp $(srcdir)/db-crypt/db/lyskomd-data $(dbdir)/lyskomd-data && \
	       cp $(srcdir)/db-crypt/db/lyskomd-texts $(dbdir)/lyskomd-texts ;\
	  else true; fi
]])dnl
46
[
Per Cederqvist's avatar
Per Cederqvist committed
47
includes: $(INCLUDEDIR)
48
libraries: lib
Per Cederqvist's avatar
Per Cederqvist committed
49

50
51
52
lib:
	mkdir lib

53
54
$(srcdir)/configure: configure.in
	autoconf $(srcdir)/configure.in > $(srcdir)/configure
55

56
57
58
59
60
61
62
# Make depend must be run once before we start to compile, but since
# it takes a long time we don't want to run it everytime somebody says
# "make".  If you make big changes you should run "make depend".
stamp-depend:
	$(MAKE) depend
	touch stamp-depend

63
64
.PHONY: dist
dist: $(srcdir)/configure
65
	[ ! -f $(srcdir)/Makefile ]
66
	cd $(srcdir); ./mkmi
Per Cederqvist's avatar
Per Cederqvist committed
67
	-$(RM) -r lyskom-$(SERVER-VER)
Per Cederqvist's avatar
Per Cederqvist committed
68
69
70
71
72
73
74
75
76
77
78
	for i in "" /src /src/libraries /doc /scripts; do\
		$(MKDIR) lyskom-$(SERVER-VER)$$i||exit 1;\
	done
	if [ -f $(srcdir)/README-serverrelease ] ;then \
		cp $(srcdir)/README-serverrelease lyskom-$(SERVER-VER)/README;\
	else\
		cp $(srcdir)/README lyskom-$(SERVER-VER)/README;\
	fi
	for i in COPYING INSTALL configure configure.in Build Makefile.in \
		Makefile.src mkmi; \
	    do cp $(srcdir)/$$i lyskom-$(SERVER-VER)/||exit 1; done
79
	cp $(srcdir)/src/Makefile.in lyskom-$(SERVER-VER)/src/
Per Cederqvist's avatar
Per Cederqvist committed
80
	cp $(srcdir)/src/Makefile.src lyskom-$(SERVER-VER)/src/
81
82
	cp $(srcdir)/src/libraries/Makefile.in \
	    lyskom-$(SERVER-VER)/src/libraries/
Per Cederqvist's avatar
Per Cederqvist committed
83
84
	cp $(srcdir)/src/libraries/Makefile.src \
	    lyskom-$(SERVER-VER)/src/libraries/
85
	for i in ADMINISTRATION Makefile.in misc_items prot-A.txt	\
Per Cederqvist's avatar
Per Cederqvist committed
86
87
		server-async.extend server.extend what-is-unread.swe 	\
		server-config.extend Makefile.src;			\
Per Cederqvist's avatar
Per Cederqvist committed
88
	do 								\
Per Cederqvist's avatar
Per Cederqvist committed
89
		cp $(srcdir)/doc/$$i lyskom-$(SERVER-VER)/doc/$i||exit 1;\
Per Cederqvist's avatar
Per Cederqvist committed
90
	done
91
	cp -r $(srcdir)/doc/man lyskom-$(SERVER-VER)/doc/man
92
	for i in mkmi.m4 Makefile.src Makefile.in mkinstalldirs; do\
Per Cederqvist's avatar
Per Cederqvist committed
93
94
	    cp $(srcdir)/scripts/$$i lyskom-$(SERVER-VER)/scripts/||exit 1; \
	done
95
	cp -r $(srcdir)/run-support lyskom-$(SERVER-VER)/run-support
Per Cederqvist's avatar
Per Cederqvist committed
96
	for i in libansi libcommon libisc-new libmisc regex ; do \
97
98
99
100
101
102
		cp -r $(srcdir)/src/libraries/$$i \
			lyskom-$(SERVER-VER)/src/libraries \
		|| exit 1 ; \
	done
	cp -r $(srcdir)/src/server lyskom-$(SERVER-VER)/src
	cp -r $(srcdir)/src/include lyskom-$(SERVER-VER)/src/include
103
	$(RM) -r lyskom-$(SERVER-VER)/src/include/ansi
104
105
	cp -r $(srcdir)/db-crypt lyskom-$(SERVER-VER)
	cp -r $(srcdir)/db-nocrypt lyskom-$(SERVER-VER)
Per Cederqvist's avatar
Per Cederqvist committed
106
107
108
	find lyskom-$(SERVER-VER) \
	    \( -name CVS -o -name '*~' -o -name '#*#' -o -name 'lib*.a' \
		 -o -name '*.o' -o -name '.#*' -o -name core \
109
		 -o -name Makefile.in2 -o -name 'stamp-*' \) \
Per Cederqvist's avatar
Per Cederqvist committed
110
	    -print -exec rm -rf "{}" \; -prune
Per Cederqvist's avatar
Per Cederqvist committed
111
	tar cvf lyskom-$(SERVER-VER).tar lyskom-$(SERVER-VER)
112
	$(RM) lyskom-$(SERVER-VER).tar.gz
113
	gzip -9v lyskom-$(SERVER-VER).tar
Per Cederqvist's avatar
Per Cederqvist committed
114
115
	$(RM) -r lyskom-$(SERVER-VER)

116
.PHONY: msg
Per Cederqvist's avatar
Per Cederqvist committed
117
118
119
120
msg:
	@date
	@echo

121
.PHONY: end-msg
Per Cederqvist's avatar
Per Cederqvist committed
122
123
124
125
126
127
end-msg:
	@echo
	@echo Finished at
	@date

$(INCLUDEDIR):
128
	mkdir $(INCLUDEDIR)
129
]
Per Cederqvist's avatar
Per Cederqvist committed
130
LK_DESCEND