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

Fixed so that make depend works.

parent 1d31ebf6
TOPDIR = /usr/lyskom/src
TOPDIR = /usr/lyskom
SCRIPTDIR = $(TOPDIR)/scripts
include $(SCRIPTDIR)/import.make
SUBDIRS = doc include junk lib scripts src
SUBDIRS = doc junk scripts src
all:
all: includes libraries binaries
includes:
-mkdir $(INCLUDEDIR)
for i in $(SUBDIRS) ; \
do \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes) \
done
libraries:
-$(RM) -r $(LIBDIR)
mkdir $(LIBDIR)
for i in $(SUBDIRS) ; \
do \
echo making all in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) all) \
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
......@@ -20,9 +41,8 @@ install:
(cd $$i; $(MAKE) $(EXPORTS) install) \
done
depend:
(cd src/include; make $(EXPORTS) install)
(cd src/libraries; make $(EXPORTS) install-headers)
depend: includes
for i in $(SUBDIRS) ; \
do \
echo making depend in directory $$i; \
......
TOPDIR = /usr/lyskom/src
TOPDIR = /usr/lyskom
SCRIPTDIR = $(TOPDIR)/scripts
include $(SCRIPTDIR)/import.make
......@@ -7,6 +7,9 @@ SUBDIRS = man
all:;
depend:;
includes:;
libraries:;
binaries:;
clean:
$(RM) *~ core
......
all:;
depend:;
install:;
includes:;
libraries:;
binaries:;
clean:
......
# temp-B-Makefile temp-C-Makefile \
# temp-D-Makefile temp-E-Makefile
depend: temp-A-Makefile
depend: temp-A-Makefile temp-B-Makefile temp-C-Makefile \
temp-D-Makefile temp-E-Makefile
rm -f dependencies
cat temp-?-Makefile >dependencies
rm temp-?-Makefile temp-?-files
......
......@@ -4,16 +4,33 @@ SCRIPTDIR = $(TOPDIR)/scripts
include $(SCRIPTDIR)/import.make
# All directories that make should traverse to when doing clean etc.
# Note htat libraries MUST be made before the rest. Otherwise you will
# be linking with old versions...
SUBDIRS = include libraries server komutils clients
all:
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 all in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) all) \
echo making binaries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) binaries) \
done
......
......@@ -9,23 +9,22 @@ SUBDIRS = ansi server
INSTALL-HDRS = $(wildcard *.h)
all:
for i in $(SUBDIRS); \
do \
echo making all in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) all); \
done
all: includes libraries binaries
libraries:;
binaries:;
.PHONY : install
install:
(cd $(INCLUDEDIR); $(RM) $(INSTALL-HDRS))
cp $(INSTALL-HDRS) $(INCLUDEDIR)/
.PHONY : includes
includes:
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
done
for i in $(SUBDIRS); \
do \
echo making install in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install); \
echo making includes in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) includes); \
done
clean:
......
......@@ -7,14 +7,19 @@ TARGET = -DCLIENT
INSTALL-HDRS = smalloc.h
all:;
all: includes libraries binaries
libraries:;
binaries:;
.PHONY : install
.PHONY : includes
install:
-mkdir $(INCLUDEDIR)/server
(cd $(INCLUDEDIR)/server; $(RM) $(INSTALL-HDRS))
cp $(INSTALL-HDRS) $(INCLUDEDIR)/server/
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/server/$$i \
|| cp $$i $(INCLUDEDIR)/server/$$i; \
done
clean:
rm -vf ${OBJECTS} *~ core temp-Makefile Distfile *.o
......
......@@ -8,14 +8,28 @@ include $(SCRIPTDIR)/import.make
SUBDIRS = libansi libmisc libisc libcommon client-support
all:
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 all in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) all) \
echo making libraries in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) libraries) \
done
binaries:;
depend:
for i in $(SUBDIRS) ; \
do \
......@@ -32,14 +46,6 @@ install:
done
install-headers:
for i in $(SUBDIRS) ; \
do \
echo making install-headers in directory $$i; \
(cd $$i; $(MAKE) $(EXPORTS) install-headers) \
done
clean:
rm -vf *~ core
for i in $(SUBDIRS); \
......
......@@ -16,13 +16,14 @@ libmisc.a: $(LIBOBJS)
ar qc $(LIBNAME) $(LIBOBJS)
ranlib $(LIBNAME)
install-headers:;
includes:;
install: $(LIBNAME)
libraries: $(LIBNAME)
$(RM) $(LIBDIR)/$(LIBNAME)
cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
ranlib $(LIBDIR)/$(LIBNAME)
binaries:;
clean:
rm -vf ${LIBOBJS} *~ core temp-Makefile Distfile *.o
......
......@@ -44,15 +44,20 @@ liblyskom-client.a: client-dir
clean:
$(RM) -r *.o core Distfile *~ client-dir server-dir $(LIBRARIES)
install: all install-headers
libraries: includes all
(cd $(LIBDIR); $(RM) $(LIBRARIES))
cp $(LIBRARIES) $(LIBDIR)
(cd $(LIBDIR); ranlib -t $(LIBRARIES))
.PHONY: install-headers
install-headers:
(cd $(INCLUDEDIR); $(RM) $(HDRS))
cp $(HDRS) $(INCLUDEDIR)
.PHONY: includes
includes:
for i in $(HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
done
binaries:;
tags:
etags -t $(INCLUDEDIR)/*.h *.[hc]
......
kom-errno.o : kom-errno.c /users/ceder/gurka/lyskom/include/ansi/stdio.h \
/users/ceder/gurka/lyskom/include/config.h \
/users/ceder/gurka/lyskom/include/kom-errno.h \
/usr/gnu/lib/gcc-include/sys/types.h /usr/include/sys/types.h \
kom-errno.o : kom-errno.c /users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/config.h \
/users/ceder/lyskom/include/kom-errno.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h
misc-parser.o : misc-parser.c misc-parser.h \
/users/ceder/lyskom/include/kom-types.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /usr/gnu/lib/gcc-include/limits.h \
/users/ceder/lyskom/include/ansi/time.h /usr/include/time.h \
/users/ceder/lyskom/include/s-string.h \
/users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/misc-types.h \
/users/ceder/lyskom/include/s-collat-tabs.h
parser.o : parser.c /users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /users/ceder/lyskom/include/s-string.h \
/usr/gnu/lib/gcc-include/limits.h /users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/misc-types.h \
/users/ceder/lyskom/include/s-collat-tabs.h parser.h \
/users/ceder/lyskom/include/zmalloc.h \
/users/ceder/lyskom/include/compiler.h
......@@ -32,14 +32,18 @@ $(LIBNAME): $(LIBOBJS)
ar r $(LIBNAME) $?
ranlib $(LIBNAME)
install: $(LIBNAME) install-headers
libraries: $(LIBNAME)
$(RM) $(LIBDIR)/$(LIBNAME)
cp $(LIBNAME) $(LIBDIR)/$(LIBNAME)
ranlib -t $(LIBDIR)/$(LIBNAME)
install-headers:
(cd $(INCLUDEDIR); $(RM) $(INSTALL-HDRS))
cp $(INSTALL-HDRS) $(INCLUDEDIR)/
includes:
for i in $(INSTALL-HDRS);\
do \
cmp $$i $(INCLUDEDIR)/$$i || cp $$i $(INCLUDEDIR)/$$i; \
done
binaries:;
testnumlist: testnumlist.o numlist.o
$(CC) -o testnumlist testnumlist.o numlist.o
......@@ -56,6 +60,6 @@ include $(SCRIPTDIR)/Parallell-depend.make
tags:
etags -t $(INCLUDEDIR)/*.h *.[hc]
specials:;
specials: includes;
include dependencies
numlist.o : numlist.c /users/ceder/gurka/lyskom/include/ansi/stdio.h \
/users/ceder/gurka/lyskom/include/ansi/stdlib.h \
/users/ceder/gurka/lyskom/include/ansi/stddef.h \
/usr/gnu/lib/gcc-include/sys/types.h /usr/include/sys/types.h \
numlist.o : numlist.c /users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/ansi/stdlib.h \
/users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /users/ceder/gurka/lyskom/include/misc-types.h \
/usr/include/sys/sysmacros.h /users/ceder/lyskom/include/misc-types.h \
numlist.h
testnumlist.o : testnumlist.c \
/users/ceder/gurka/lyskom/include/ansi/stdio.h \
/users/ceder/gurka/lyskom/include/ansi/stdlib.h \
/users/ceder/gurka/lyskom/include/ansi/stddef.h \
/usr/gnu/lib/gcc-include/sys/types.h /usr/include/sys/types.h \
testnumlist.o : testnumlist.c /users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/ansi/stdlib.h \
/users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /users/ceder/gurka/lyskom/include/misc-types.h \
/usr/include/sys/sysmacros.h /users/ceder/lyskom/include/misc-types.h \
numlist.h
numlist2.o : numlist2.c /users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/ansi/stdlib.h \
/users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /users/ceder/lyskom/include/misc-types.h \
numlist2.h
zmalloc.o : zmalloc.c /users/ceder/lyskom/include/ansi/stddef.h \
/users/ceder/lyskom/include/ansi/sys/types.h /usr/include/sys/types.h \
/usr/gnu/lib/gcc-include/sys/stdtypes.h /usr/include/sys/stdtypes.h \
/usr/include/sys/sysmacros.h /users/ceder/lyskom/include/ansi/malloc.h \
/users/ceder/lyskom/include/ansi/string.h \
/users/ceder/lyskom/include/compiler.h zmalloc.h
pom.o : pom.c /users/ceder/lyskom/include/ansi/sys/types.h \
/usr/include/sys/types.h /usr/gnu/lib/gcc-include/sys/stdtypes.h \
/usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h \
/users/ceder/lyskom/include/ansi/time.h /usr/include/time.h \
/users/ceder/lyskom/include/ansi/math.h /usr/include/math.h \
/usr/include/floatingpoint.h /usr/include/sys/ieeefp.h \
/users/ceder/lyskom/include/ansi/stdio.h pom.h
s-collat-tabs.o : s-collat-tabs.c s-collat-tabs.h \
/usr/gnu/lib/gcc-include/limits.h
s-string.o : s-string.c /users/ceder/lyskom/include/ansi/sys/types.h \
/usr/include/sys/types.h /usr/gnu/lib/gcc-include/sys/stdtypes.h \
/usr/include/sys/stdtypes.h /usr/include/sys/sysmacros.h \
/users/ceder/lyskom/include/ansi/stdio.h \
/users/ceder/lyskom/include/ansi/string.h \
/users/ceder/lyskom/include/ansi/ctype.h /usr/include/ctype.h \
/users/ceder/lyskom/include/ansi/stdlib.h \
/users/ceder/lyskom/include/ansi/stddef.h /usr/gnu/lib/gcc-include/assert.h \
/users/ceder/lyskom/include/misc-types.h s-collat-tabs.h \
/usr/gnu/lib/gcc-include/limits.h s-string.h
......@@ -80,7 +80,10 @@ SRCS = $(GEN_SRCS) $(RAM_SRCS) $(DISK_SRCS) $(LYS_SRCS) $(DBCK_SRCS)
PROGRAMS = ramkomd diskomd dbck
all: $(PROGRAMS)
all binaries: $(PROGRAMS)
includes:;
libraries:;
ramkomd: $(RAMOBJS) $(GENOBJS)
$(CC) $(LDFLAGS) -o ramkomd $(RAMOBJS) $(GENOBJS) $(LIBS)
......
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