Commit fc90581b authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Cleaned up things for distribution.

parent 5f4631ba
......@@ -12,8 +12,8 @@ includes:
-mkdir $(INCLUDEDIR)
for i in $(SUBDIRS) ; \
do \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) \
[ -d $$i ] && { echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) } \
done
......@@ -21,56 +21,34 @@ libraries:
-mkdir $(LIBDIR)
for i in $(SUBDIRS) ; \
do \
echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) \
[ -d $$i ] && { echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) } \
done
include $(SCRIPTDIR)/sub-binaries.make
include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
binaries:
for i in $(SUBDIRS) ; \
do \
echo making binaries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) binaries) \
done
install:
for i in $(SUBDIRS) ; \
do \
echo making install in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install) \
done
depend: includes
for i in $(SUBDIRS) ; \
do \
echo making depend in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) depend); \
done
clean:
$(RM) *~ core
for i in $(SUBDIRS); \
do \
echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) \
done
distribution: clean
-$(RM) -r lyskom-$(SERVER-VER)
mkdir lyskom-$(SERVER-VER)
cp -r doc lyskom-$(SERVER-VER)/doc
cp -r scripts lyskom-$(SERVER-VER)/scripts
cp Build Makefile lyskom-$(SERVER-VER)/
mkdir lyskom-$(SERVER-VER)/src
cp src/Makefile lyskom-$(SERVER-VER)/src/
mkdir lyskom-$(SERVER-VER)/src/libraries
cp src/libraries/Makefile lyskom-$(SERVER-VER)/src/libraries/
cp -r doc lyskom-$(SERVER-VER)/doc
cp -r scripts lyskom-$(SERVER-VER)/scripts
cp -r src/libraries/libansi lyskom-$(SERVER-VER)/src/libraries
cp -r src/libraries/libcommon lyskom-$(SERVER-VER)/src/libraries
cp -r src/libraries/libisc lyskom-$(SERVER-VER)/src/libraries
cp -r src/libraries/libmisc lyskom-$(SERVER-VER)/src/libraries
cp -r src/server lyskom-$(SERVER-VER)/src
cp -r src/include lyskom-$(SERVER-VER)/src/include
find lyskom-$(SERVER-VER) -name CVS.adm -print -exec rm -rf {} \; -prune
tar cvf lyskom-$(SERVER-VER).tar lyskom-$(SERVER-VER).tar
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)
......@@ -11,18 +11,5 @@ includes:;
libraries:;
binaries:;
clean:
$(RM) *~ core
for i in $(SUBDIRS); \
do \
echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) \
done
install:
for i in $(SUBDIRS); \
do \
echo installing directory in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install) \
done
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-install.make
......@@ -10,20 +10,20 @@ all:;
depend:;
clean:
$(RM) *~ core
$(RM) $(GENERIC-CLEAN)
-for i in $(MANEXTS); \
do \
echo making clean in directory man$$i; \
(cd man$$i; $(RM) *~ core) \
[ -d man$$i ] && { echo making clean in directory man$$i; \
(cd man$$i; $(RM) *~ core) } \
done
install:
for i in $(MANEXTS); \
do \
for page in man$$i/*.$$i; \
[ -d man$$i ] && { for page in man$$i/*.$$i; \
do \
echo installing $$page; \
install $$page $(MANDIR)/man$$i; \
done \
done } \
done
ln $(MANDIR)/man8/ramkomd.8 $(MANDIR)/man8/lyskomd.8
......@@ -12,4 +12,4 @@ binaries:;
clean:
$(RM) *~ core
$(RM) $(GENERIC-CLEAN)
......@@ -24,3 +24,6 @@ c-indexes:
ls *.c|${AWK} '{ a[i++] = $$1; } \
END { for ( j = 0; j < i; j++ ) \
print a[j] > sprintf("temp-%c-files", 65 + j % 5); }
dependencies:
touch dependencies
......@@ -36,6 +36,10 @@ LYSKOMSYSBIN = /usr/lyskom/bin
LYSKOMUSRBIN = /usr/local/bin
GENERIC-CLEAN = *~ *.o dependencies core TAGS temp-Makefile temp-?-Makefile
EXPORTS = CC="${CC}" SHELL="${SHELL}" AWK="${AWK}" SED="${SED}" \
RM="${RM}" INCLUDEDIR="${INCLUDEDIR}" LIBDIR="${LIBDIR}" \
ANSIDIR="${ANSIDIR}" INCLUDES="${INCLUDES}" \
......@@ -44,7 +48,7 @@ EXPORTS = CC="${CC}" SHELL="${SHELL}" AWK="${AWK}" SED="${SED}" \
LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" \
LYSKOMSYSBIN="${LYSKOMSYSBIN}" LYSKOMUSRBIN="${LYSKOMUSRBIN}" \
TOPDIR="${TOPDIR}" SCRIPTDIR="${SCRIPTDIR}" AR="${AR}" \
ARFLAGS="${ARFLAGS}"
ARFLAGS="${ARFLAGS}" GENERIC-CLEAN="${GENERIC-CLEAN}"
# The Makefiles also dependes on the variables
# AR, ARFLAGS
......
......@@ -9,51 +9,14 @@ SUBDIRS = include libraries server komutils clients
all: includes libraries binaries
includes:
for i in $(SUBDIRS) ; \
do \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) \
done
.PHONY: libraries
libraries:
for i in $(SUBDIRS) ; \
do \
echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) \
done
binaries:
for i in $(SUBDIRS) ; \
do \
echo making binaries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) binaries) \
done
install:
for i in $(SUBDIRS) ; \
do \
echo making install in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install) \
done
depend:
for i in $(SUBDIRS) ; \
do \
echo making depend in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) depend) \
done
clean:
$(RM) *~ core
for i in $(SUBDIRS); \
do \
echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) \
done
include $(SCRIPTDIR)/includes.make
include $(SCRIPTDIR)/libraries.make
include $(SCRIPTDIR)/binaries.make
include $(SCRIPTDIR)/install.make
include $(SCRIPTDIR)/clean.make
include $(SCRIPTDIR)/depend.make
......@@ -19,20 +19,21 @@ binaries:;
includes:
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
{ cmp $$i $(INCLUDEDIR)/$$i 2>/dev/null } \
|| cp $$i $(INCLUDEDIR)/$$i; \
done
for i in $(SUBDIRS); \
do \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes); \
[ -d $$i ] && { echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes); } \
done
clean:
$(RM) *~ core temp-Makefile Distfile *.o
$(RM) $(GENERIC-CLEAN)
for i in $(SUBDIRS); \
do \
echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean); \
[ -d $$i ] && { echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean); } \
done
depend:;
\ No newline at end of file
......@@ -22,6 +22,6 @@ includes:
done
clean:
$(RM) ${OBJECTS} *~ core temp-Makefile Distfile *.o
$(RM) $(GENERIC-CLEAN)
depend:;
......@@ -10,47 +10,10 @@ SUBDIRS = libansi libmisc libisc libcommon client-support
all: includes libraries binaries
includes:
for i in $(SUBDIRS) ; \
do \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) \
done
libraries:
for i in $(SUBDIRS) ; \
do \
echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) \
done
include $(SCRIPTDIR)/includes.make
include $(SCRIPTDIR)/libraries.make
include $(SCRIPTDIR)/clean.make
include $(SCRIPTDIR)/depend.make
include $(SCRIPTDIR)/install.make
binaries:;
depend:
for i in $(SUBDIRS) ; \
do \
echo making depend in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) depend); \
done
install:
for i in $(SUBDIRS) ; \
do \
echo making install in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install) \
done
clean:
$(RM) *~ core
for i in $(SUBDIRS); \
do \
echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) \
done
......@@ -25,7 +25,7 @@ libraries: $(LIBNAME)
binaries:;
clean:
$(RM) ${LIBOBJS} *~ core temp-Makefile Distfile *.o
$(RM) ${LIBOBJS} $(GENERIC-CLEAN)
# Recreate the Makefile
......
......@@ -7,19 +7,19 @@ TARGET = -DCLIENT
LIBOBJS = kom-errno.o misc-parser.o parser.o
HDRS = misc-parser.h parser.h
INSTALL-HDRS = misc-parser.h parser.h
LIBRARIES = liblyskom-server.a liblyskom-client.a
all: $(LIBRARIES)
client-dir:
mkdir client-dir
ln -s `echo $(LIBOBJS) $(HDRS) dependencies| tr ' ' '\012' | \
ln -s `echo $(LIBOBJS) $(INSTALL-HDRS) dependencies| tr ' ' '\012' | \
sed 's/.o$$/.c/' | sed 's:^:\.\./:' ` client-dir/
server-dir:
mkdir server-dir
ln -s `echo $(LIBOBJS) $(HDRS) dependencies| tr ' ' '\012' | \
ln -s `echo $(LIBOBJS) $(INSTALL-HDRS) dependencies| tr ' ' '\012' | \
sed 's/.o$$/.c/' | sed 's:^:\.\./:' ` server-dir/
.PHONY: liblyskom-server.a
......@@ -42,20 +42,15 @@ liblyskom-client.a: client-dir
clean:
$(RM) -r *.o core Distfile *~ client-dir server-dir $(LIBRARIES)
$(RM) $(GENERIC-CLEAN) $(LIBRARIES)
$(RM) -r client-dir server-dir
libraries: includes all
(cd $(LIBDIR); $(RM) $(LIBRARIES))
cp $(LIBRARIES) $(LIBDIR)
(cd $(LIBDIR); ranlib -t $(LIBRARIES))
.PHONY: includes
includes:
for i in $(HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
done
include $(SCRIPTDIR)/install-includes.make
binaries:;
......
......@@ -37,11 +37,7 @@ libraries: $(LIBNAME)
cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
ranlib -t $(LIBDIR)/$(LIBNAME)
includes:
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
done
include $(SCRIPTDIR)/install-includes.make
binaries:;
......@@ -50,7 +46,7 @@ testnumlist: testnumlist.o numlist.o
clean:
$(RM) ${OBJECTS} *~ core temp-Makefile Distfile *.o
$(RM) ${OBJECTS} $(GENERIC-CLEAN) Distfile
# Recreate the Makefile
......
# $Id: Makefile,v 0.7 1991/08/28 02:22:07 ceder Exp $
# $Id: Makefile,v 0.8 1991/08/29 02:44:25 ceder Exp $
TOPDIR = /usr/lyskom/src
SCRIPTDIR = $(TOPDIR)/scripts
......@@ -112,7 +112,7 @@ install: $(PROGRAMS)
# Don't strip ramkomd - we want debugging info!
clean:
$(RM) *.o *~ core $(PROGRAMS) $(SPECIALS) TAGS
$(RM) $(GENERIC-CLEAN) $(PROGRAMS) $(SPECIALS)
specials: $(SPECIALS)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment