Skip to content
Snippets Groups Projects
Makefile 4.03 KiB
Newer Older
Linus Tolke's avatar
Linus Tolke committed
#
# $Id: Makefile,v 0.38 1993/10/03 16:01:14 ceder Exp $
Linus Tolke's avatar
Linus Tolke committed
# 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. 
#
include Topdir.make
Per Cederqvist's avatar
.
Per Cederqvist committed
SCRIPTDIR = $(TOPDIR)/scripts

include $(SCRIPTDIR)/import.make

Per Cederqvist's avatar
Per Cederqvist committed
SUBDIRS = doc junk scripts src config
SERVER-VER = 1.4.1
Per Cederqvist's avatar
.
Per Cederqvist committed

Per Cederqvist's avatar
Per Cederqvist committed
all: msg includes libraries binaries end-msg
includes: $(INCLUDEDIR) $(INCLUDEDIR)/m-config.h
	for i in $(SUBDIRS) ;	\
	do	\
		[ -d $$i ] && { echo making includes in directory $$i; \
		(cd $$i; $(MAKE) $(EXPORTS) includes) }	\
libraries: $(INCLUDEDIR) $(INCLUDEDIR)/m-config.h
Linus Tolke's avatar
Linus Tolke committed
	-$(MKDIR) $(LIBDIR)
Per Cederqvist's avatar
.
Per Cederqvist committed
	for i in $(SUBDIRS) ;	\
	do	\
		[ -d $$i ] && { echo making libraries in directory $$i; \
		(cd $$i; $(MAKE) $(EXPORTS) libraries) }  \
include $(SCRIPTDIR)/sub-binaries.make
include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-depend.make
Per Cederqvist's avatar
Per Cederqvist committed
.PHONY: clean
clean:
	$(RM) $(GENERIC-CLEAN)
	-for i in $(SUBDIRS); \
	do \
	   [ -d $$i ] && { echo making clean in directory $$i; \
	   (cd $$i; $(MAKE) $(EXPORTS) clean) } \
	done

distcleandescend:
Linus Tolke's avatar
Linus Tolke committed
	$(RM) $(GENERIC-DIST-CLEAN)
	$(RM) -r $(INCLUDEDIR)
	$(RM) -r $(LIBDIR)
	-for i in $(SUBDIRS); \
	do \
	   [ -d $$i ] && { echo making distclean in directory $$i; \
	   (cd $$i; $(MAKE) $(EXPORTS) distclean) } \
	done

distclean: clean distcleandescend
	$(RM) $(SCRIPTDIR)/import.make
Linus Tolke's avatar
Linus Tolke committed

depend: $(INCLUDEDIR) $(INCLUDEDIR)/m-config.h msg includes
distribution: distclean
Per Cederqvist's avatar
Per Cederqvist committed
	find . -name '#*#' -print
	-$(RM) -r lyskom-$(SERVER-VER)
Linus Tolke's avatar
Linus Tolke committed
	$(MKDIR) lyskom-$(SERVER-VER)
	cp README-serverrelease lyskom-$(SERVER-VER)/README
	cp COPYING INSTALL Config Build Makefile lyskom-$(SERVER-VER)/
Linus Tolke's avatar
Linus Tolke committed
	$(MKDIR) lyskom-$(SERVER-VER)/src
	cp src/Makefile lyskom-$(SERVER-VER)/src/
Linus Tolke's avatar
Linus Tolke committed
	$(MKDIR) lyskom-$(SERVER-VER)/src/libraries
	cp src/libraries/Makefile lyskom-$(SERVER-VER)/src/libraries/
Linus Tolke's avatar
Linus Tolke committed
	$(MKDIR) lyskom-$(SERVER-VER)/doc
	for i in ADMINISTRATION Makefile misc_items prot-A.txt	\
		server-async.extend server.extend what-is-unread.swe; 	\
	do 								\
		cp doc/$$i lyskom-$(SERVER-VER)/doc/$i;			\
	done
	cp -r doc/man lyskom-$(SERVER-VER)/doc/man
	cp -r config lyskom-$(SERVER-VER)/config
	cp -r scripts lyskom-$(SERVER-VER)/scripts
	$(RM) lyskom-$(SERVER-VER)/scripts/import.make
Per Cederqvist's avatar
Per Cederqvist committed
	cp -r run-support lyskom-$(SERVER-VER)/run-support
	cp -r src/libraries/libansi lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/libcommon lyskom-$(SERVER-VER)/src/libraries
Per Cederqvist's avatar
Per Cederqvist committed
	cp -r src/libraries/libisc-new lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/libmisc lyskom-$(SERVER-VER)/src/libraries
	cp -r src/libraries/regex lyskom-$(SERVER-VER)/src/libraries
	cp -r src/server lyskom-$(SERVER-VER)/src
	cp -r src/include lyskom-$(SERVER-VER)/src/include
	cp -r db-crypt lyskom-$(SERVER-VER)
	cp -r db-nocrypt lyskom-$(SERVER-VER)
	find lyskom-$(SERVER-VER) -name CVS.adm -print -exec rm -rf {} \; -prune
	find lyskom-$(SERVER-VER) -name Topdir.make -print -exec rm -rf {} \;
	tar cvf lyskom-$(SERVER-VER).tar lyskom-$(SERVER-VER)
	$(RM) lyskom-$(SERVER-VER).tar.Z
	compress lyskom-$(SERVER-VER).tar
	$(RM) -r lyskom-$(SERVER-VER)
Per Cederqvist's avatar
Per Cederqvist committed

msg:
	@echo Top-level source directory is believed to be $(TOPDIR)
	@date
	@echo

end-msg:
	@echo
	@echo Finished at
	@date

$(INCLUDEDIR) $(INCLUDEDIR)/m-config.h:
Per Cederqvist's avatar
Per Cederqvist committed
	@echo You must run Config before Build or make.
	@exit 1