From 877481dc0ac8e558a227a048fb0cbf6d89d11a68 Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Tue, 17 Mar 1998 06:08:07 +0000 Subject: [PATCH] Make install directories from top down. Quiet client script test. --- client/Makefile.dist | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/client/Makefile.dist b/client/Makefile.dist index 77db1120..00938401 100644 --- a/client/Makefile.dist +++ b/client/Makefile.dist @@ -1,6 +1,6 @@ # Makefile.dist # -# Copyright (c) 1996, 1997 The Internet Software Consortium. +# Copyright (c) 1996, 1997, 1998 The Internet Software Consortium. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -45,26 +45,31 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) all: $(PROG) $(CATMANPAGES) install: $(PROG) $(CATMANPAGES) + @for dir in $(CLIENTBINDIR) $(ETC) $(ADMMANDIR) $(FFMANDIR) $(VARDB); \ + do \ + case $$dir in \ + /*) base=/ ;; \ + *) base="" ;; \ + esac; \ + slash=""; \ + for elt in `echo $$dir |sed -e 's/\// /g'`; do \ + if [ ! -d $$base/$$elt ]; then \ + echo Making $$base/$$elt; \ + mkdir $$base/$$elt; \ + chmod 755 $$base/$$elt; \ + fi; \ + base=$$base$$slash$$elt; \ + slash=/; \ + done; \ + done $(INSTALL) dhclient $(CLIENTBINDIR) $(CHMOD) 755 $(CLIENTBINDIR)/dhclient - if [ x$(SCRIPT) = xnone ]; then \ + @if [ x$(SCRIPT) = xnone ]; then \ echo "No client script available."; \ else \ $(INSTALL) scripts/$(SCRIPT) $(ETC)/dhclient-script; \ $(CHMOD) 700 $(ETC)/dhclient-script; \ fi - if [ ! -d $(ADMMANDIR) ]; then \ - mkdir $(ADMMANDIR); \ - chmod 755 $(ADMMANDIR); \ - fi - if [ ! -d $(FFMANDIR) ]; then \ - mkdir $(FFMANDIR); \ - chmod 755 $(FFMANDIR); \ - fi - if [ ! -d $(VARDB) ]; then \ - mkdir $(VARDB); \ - chmod 755 $(VARDB); \ - fi $(MANINSTALL) $(MANFROM) dhclient.cat8 $(MANTO) \ $(ADMMANDIR)/dhclient$(ADMMANEXT) $(MANINSTALL) $(MANFROM) dhclient-script.cat8 $(MANTO) \