--- Makefile.dist.orig	Fri Nov  8 00:10:08 2002
+++ Makefile.dist	Tue Apr 29 00:07:43 2003
@@ -17,47 +17,200 @@
 # http://www.isc.org for more information.
 #
 
-SUBDIRS=	common $(MINIRES) dst omapip server client relay dhcpctl
+COMMON_SUBDIRS=	common
+DEVEL_SUBDIRS=	$(MINIRES) dst omapip dhcpctl
+SERVER_SUBDIRS=	omshell server
+RELAY_SUBDIRS=	relay
+CLIENT_SUBDIRS=	client
+
+DEVEL_BUILD_SUBDIRS=	${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_BUILD_SUBDIRS=	${SERVER_SUBDIRS}
+RELAY_BUILD_SUBDIRS=	${RELAY_SUBDIRS}
+CLIENT_BUILD_SUBDIRS=	${CLIENT_SUBDIRS}
+
+DEVEL_INSTALL_SUBDIRS=	${COMMON_SUBDIRS} ${DEVEL_SUBDIRS}
+SERVER_INSTALL_SUBDIRS=	${COMMON_SUBDIRS} ${SERVER_SUBDIRS}
+RELAY_INSTALL_SUBDIRS=	${RELAY_SUBDIRS}
+CLIENT_INSTALL_SUBDIRS=	${COMMON_SUBDIRS} ${CLIENT_SUBDIRS}
 
-all:
-	@for dir in ${SUBDIRS}; do \
+all: all.server all.relay all.client
+
+all.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+		echo "Making all in $$dir"; \
+		(cd $$dir; $(MAKE) all) || exit 1; \
+	done
+
+all.server: all.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
+		echo "Making all in $$dir"; \
+		(cd $$dir; $(MAKE) all) || exit 1; \
+	done
+
+all.relay: all.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
+		echo "Making all in $$dir"; \
+		(cd $$dir; $(MAKE) all) || exit 1; \
+	done
+
+all.client: all.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
 		echo "Making all in $$dir"; \
 		(cd $$dir; $(MAKE) all) || exit 1; \
-	 done
+	done
+
+install: install.devel install.server install.relay install.client
+
+install.devel:
+	@for dir in ${DEVEL_INSTALL_SUBDIRS}; do \
+		echo "Installing in $$dir"; \
+		(cd $$dir; $(MAKE) install) || exit 1; \
+	done
 
-install:
-	@for dir in ${SUBDIRS}; do \
+install.server:
+	@for dir in ${SERVER_INSTALL_SUBDIRS}; do \
 		echo "Installing in $$dir"; \
 		(cd $$dir; $(MAKE) install) || exit 1; \
-	 done
+	done
 
-depend:
-	@for dir in ${SUBDIRS}; do \
+install.relay:
+	@for dir in ${RELAY_INSTALL_SUBDIRS}; do \
+		echo "Installing in $$dir"; \
+		(cd $$dir; $(MAKE) install) || exit 1; \
+	done
+
+install.client:
+	@for dir in ${CLIENT_INSTALL_SUBDIRS}; do \
+		echo "Installing in $$dir"; \
+		(cd $$dir; $(MAKE) install) || exit 1; \
+	done
+
+depend: depend.server depend.relay depend.client
+
+depend.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+		echo "Making dependencies in $$dir"; \
+		(cd $$dir; $(MAKE) depend) || exit 1; \
+	done
+
+depend.server: depend.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
+		echo "Making dependencies in $$dir"; \
+		(cd $$dir; $(MAKE) depend) || exit 1; \
+	done
+
+depend.relay: depend.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
 		echo "Making dependencies in $$dir"; \
 		(cd $$dir; $(MAKE) depend) || exit 1; \
-	 done
+	done
+
+depend.client: depend.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+		echo "Making dependencies in $$dir"; \
+		(cd $$dir; $(MAKE) depend) || exit 1; \
+	done
+
+clean: clean.server clean.relay clean.client
+
+clean.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+		echo "Cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) clean) || exit 1; \
+	done
+
+clean.server: clean.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
+		echo "Cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) clean) || exit 1; \
+	done
+
+clean.relay: clean.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
+		echo "Cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) clean) || exit 1; \
+	done
 
-clean:
-	@for dir in ${SUBDIRS}; do \
+clean.client: clean.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
 		echo "Cleaning in $$dir"; \
 		(cd $$dir; $(MAKE) clean) || exit 1; \
-	 done
+	done
+
+realclean: realclean.server realclean.relay realclean.client
+
+realclean.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+		echo "Really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) realclean) || exit 1; \
+	done
 
-realclean:
-	@for dir in ${SUBDIRS}; do \
+realclean.server: realclean.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
 		echo "Really cleaning in $$dir"; \
 		(cd $$dir; $(MAKE) realclean) || exit 1; \
-	 done
+	done
 
-distclean:
-	@for dir in ${SUBDIRS}; do \
+realclean.relay: realclean.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
+		echo "Really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) realclean) || exit 1; \
+	done
+
+realclean.client: realclean.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+		echo "Really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) realclean) || exit 1; \
+	done
+
+distclean: distclean.server distclean.relay distclean.client
+
+distclean.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
 		echo "Really, really cleaning in $$dir"; \
 		(cd $$dir; $(MAKE) distclean) || exit 1; \
-	 done
-	@rm -f Makefile
+	done
+
+distclean.server: distclean.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
+		echo "Really, really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) distclean) || exit 1; \
+	done
+
+distclean.relay: distclean.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
+		echo "Really, really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) distclean) || exit 1; \
+	done
+
+distclean.client: distclean.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
+		echo "Really, really cleaning in $$dir"; \
+		(cd $$dir; $(MAKE) distclean) || exit 1; \
+	done
+
+links: links.server links.relay links.client
+
+links.devel:
+	@for dir in ${DEVEL_BUILD_SUBDIRS}; do \
+		echo "Making links in $$dir"; \
+		(cd $$dir; $(MAKE) links) || exit 1; \
+	done
+
+links.server: links.devel
+	@for dir in ${SERVER_BUILD_SUBDIRS}; do \
+		echo "Making links in $$dir"; \
+		(cd $$dir; $(MAKE) links) || exit 1; \
+	done
+
+links.relay: links.devel
+	@for dir in ${RELAY_BUILD_SUBDIRS}; do \
+		echo "Making links in $$dir"; \
+		(cd $$dir; $(MAKE) links) || exit 1; \
+	done
 
-links:
-	@for dir in ${SUBDIRS}; do \
+links.client: links.devel
+	@for dir in ${CLIENT_BUILD_SUBDIRS}; do \
 		echo "Making links in $$dir"; \
 		(cd $$dir; $(MAKE) links) || exit 1; \
-	 done
+	done


syntax highlighted by Code2HTML, v. 0.9.1