Commit 5a7be8d0 authored by Per Cederqvist's avatar Per Cederqvist
Browse files

Minor fixes to make it compile smoothly.

parent 693b551d
#!/bin/sh
make TOPDIR=`pwd` depend
make TOPDIR=`pwd`
make TOPDIR=`pwd` depend && echo '*** Depend ready. Making binaries. ***' \
&& make TOPDIR=`pwd`
......@@ -30,6 +30,7 @@ include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
depend: includes
distribution: clean
-$(RM) -r lyskom-$(SERVER-VER)
......
......@@ -40,15 +40,19 @@ 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}" \
OPTIMIZE-FLAGS="${OPTIMIZE-FLAGS}" \
MISC-CFLAGS="${MISC-CFLAGS}" PIPE="${PIPE}" \
LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" \
LYSKOMSYSBIN="${LYSKOMSYSBIN}" LYSKOMUSRBIN="${LYSKOMUSRBIN}" \
TOPDIR="${TOPDIR}" SCRIPTDIR="${SCRIPTDIR}" AR="${AR}" \
ARFLAGS="${ARFLAGS}" GENERIC-CLEAN="${GENERIC-CLEAN}"
# Too ugly... and it swells...
#
# EXPORTS = CC="${CC}" SHELL="${SHELL}" AWK="${AWK}" SED="${SED}" \
# RM="${RM}" INCLUDEDIR="${INCLUDEDIR}" LIBDIR="${LIBDIR}" \
# ANSIDIR="${ANSIDIR}" INCLUDES="${INCLUDES}" \
# OPTIMIZE-FLAGS="${OPTIMIZE-FLAGS}" \
# MISC-CFLAGS="${MISC-CFLAGS}" PIPE="${PIPE}" \
# LDFLAGS="${LDFLAGS}" CFLAGS="${CFLAGS}" \
# LYSKOMSYSBIN="${LYSKOMSYSBIN}" LYSKOMUSRBIN="${LYSKOMUSRBIN}" \
# TOPDIR="${TOPDIR}" SCRIPTDIR="${SCRIPTDIR}" AR="${AR}" \
# ARFLAGS="${ARFLAGS}" GENERIC-CLEAN="${GENERIC-CLEAN}"
EXPORTS =
# The Makefiles also dependes on the variables
# AR, ARFLAGS
......
.PHONY: binaries
binaries:
for i in $(SUBDIRS) ; \
-for i in $(SUBDIRS) ; \
do \
[ -d $$i ] && { echo making binaries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) binaries) } \
......
.PHONY: clean
clean:
$(RM) $(GENERIC-CLEAN)
for i in $(SUBDIRS); \
-for i in $(SUBDIRS); \
do \
[ -d $$i ] && { echo making clean in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) clean) } \
......
......@@ -3,10 +3,8 @@ dependencies:
.PHONY: depend
depend:
for i in $(SUBDIRS) ; \
-for i in $(SUBDIRS) ; \
do \
[ -d $$i ] && { echo making depend in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) depend) } \
done
# No trailing blank line, so that this rule can be continued in
# the calling file. See src/komutils/Makefile for example.
\ No newline at end of file
.PHONY: includes
includes:
for i in $(SUBDIRS) ; \
-for i in $(SUBDIRS) ; \
do \
[ -d $$i ] && { (echo making includes in directory $$i; \
[ -d $$i ] && { echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) } \
done
.PHONY: install
install:
for i in $(SUBDIRS) ; \
-for i in $(SUBDIRS) ; \
do \
[ -d $$i ] && { echo making install in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install) } \
......
.PHONY: libraries
libraries:
for i in $(SUBDIRS) ; \
-for i in $(SUBDIRS) ; \
do \
[ -d $$i ] && { echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) } \
......
......@@ -9,12 +9,12 @@ SUBDIRS = include libraries server komutils clients
all: includes libraries binaries
include $(SCRIPTDIR)/includes.make
include $(SCRIPTDIR)/libraries.make
include $(SCRIPTDIR)/binaries.make
include $(SCRIPTDIR)/install.make
include $(SCRIPTDIR)/clean.make
include $(SCRIPTDIR)/depend.make
include $(SCRIPTDIR)/sub-includes.make
include $(SCRIPTDIR)/sub-libraries.make
include $(SCRIPTDIR)/sub-binaries.make
include $(SCRIPTDIR)/sub-install.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
......
......@@ -17,16 +17,16 @@ binaries:;
.PHONY : includes
includes:
for i in $(INSTALL-HDRS);\
for i in $(INSTALL-HDRS) ; \
do \
{ cmp $$i $(INCLUDEDIR)/$$i 2>/dev/null } \
( cmp $$i $(INCLUDEDIR)/$$i 2>/dev/null ) \
|| cp $$i $(INCLUDEDIR)/$$i; \
done
done;
for i in $(SUBDIRS); \
do \
[ -d $$i ] && { echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes); } \
done
[ -d $$i ] && ( echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes); ) \
done;
clean:
$(RM) $(GENERIC-CLEAN)
......
......@@ -17,7 +17,7 @@ includes:
-mkdir $(INCLUDEDIR)/server
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/server/$$i \
( cmp $$i $(INCLUDEDIR)/server/$$i 2>/dev/null ) \
|| cp $$i $(INCLUDEDIR)/server/$$i; \
done
......
......@@ -10,10 +10,10 @@ SUBDIRS = libansi libmisc libisc libcommon client-support
all: includes libraries binaries
include $(SCRIPTDIR)/includes.make
include $(SCRIPTDIR)/libraries.make
include $(SCRIPTDIR)/clean.make
include $(SCRIPTDIR)/depend.make
include $(SCRIPTDIR)/install.make
include $(SCRIPTDIR)/sub-includes.make
include $(SCRIPTDIR)/sub-libraries.make
include $(SCRIPTDIR)/sub-clean.make
include $(SCRIPTDIR)/sub-depend.make
include $(SCRIPTDIR)/sub-install.make
binaries:;
......@@ -29,12 +29,10 @@ clean:
# Recreate the Makefile
include $(SCRIPTDIR)/Parallell-depend.make
include $(SCRIPTDIR)/Single-depend.make
tags:
etags -t *.[hc]
specials:;
include dependencies
......@@ -5,4 +5,4 @@
*/
/* #define HAVE_STRERROR /* */
/* #define HAVE_STRERROR */
......@@ -24,7 +24,7 @@ server-dir:
.PHONY: liblyskom-server.a
liblyskom-server.a: server-dir
(cd server-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DSERVER)
(cd server-dir;$(MAKE) $(EXPORTS) -f ../Makefile ../$@ TARGET=-DSERVER)
ranlib $@
......@@ -33,7 +33,7 @@ liblyskom-server.a: server-dir
.PHONY: liblyskom-client.a
liblyskom-client.a: client-dir
(cd client-dir; make $(EXPORTS) -f ../Makefile ../$@ TARGET=-DCLIENT)
(cd client-dir;$(MAKE) $(EXPORTS) -f ../Makefile ../$@ TARGET=-DCLIENT)
ranlib $@
......@@ -59,8 +59,6 @@ tags:
# Recreate the Makefile from Makefile
include $(SCRIPTDIR)/Parallell-depend.make
specials:;
include $(SCRIPTDIR)/Single-depend.make
include dependencies
# Makefile for LysKOM
#
###############################################################################
#
# SPECIAL CONSIDERATIONS:
#
# - Requires GNU make.
# - CC, OPTIMIZE-FLAGS and other make variables are passed down
# in the environment.
# - C compiler must be ANSI conformant.
#
###############################################################################
#
# SPECIAL TARGETS:
###############################################################################
TOPDIR = /usr/lyskom/src
SCRIPTDIR = $(TOPDIR)/scripts
......@@ -50,12 +35,10 @@ clean:
# Recreate the Makefile
include $(SCRIPTDIR)/Parallell-depend.make
include $(SCRIPTDIR)/Single-depend.make
tags:
etags -t $(INCLUDEDIR)/*.h *.[hc]
specials: includes;
include dependencies
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