From: Ted Lemon Date: Tue, 17 Mar 1998 06:08:19 +0000 (+0000) Subject: Make install directories from top down. X-Git-Tag: carrel-2~159 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=62f461bcf92ede9819f81734460b7a936660df3c;p=thirdparty%2Fdhcp.git Make install directories from top down. --- diff --git a/common/Makefile.dist b/common/Makefile.dist index 4f676d80c..1517b59a1 100644 --- a/common/Makefile.dist +++ b/common/Makefile.dist @@ -1,6 +1,7 @@ # Makefile.dist # -# Copyright (c) 1996 The Internet Software Consortium. All rights reserved. +# Copyright (c) 1996, 1997, 1998 The Internet Software Consortium. +# All rights reserved. # # Redistribution and use in source and binary forms, with or without # modification, are permitted provided that the following conditions @@ -52,14 +53,25 @@ libdhcp.a: $(OBJ) ranlib libdhcp.a install: $(CATMANPAGES) - if [ ! -d $(FFMANDIR) ]; then \ - mkdir $(FFMANDIR); \ - chmod 755 $(FFMANDIR); \ - fi + @for dir in $(FFMANDIR); 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 $(MANINSTALL) $(MANFROM) dhcp-options.cat5 $(MANTO) \ $(FFMANDIR)/dhcp-options$(FFMANEXT) - clean: -rm -f $(OBJ) diff --git a/statmsg/Makefile.dist b/statmsg/Makefile.dist index 8a2498fa1..8ebe0f807 100644 --- a/statmsg/Makefile.dist +++ b/statmsg/Makefile.dist @@ -1,6 +1,6 @@ # Makefile.dist # -# Copyright (c) 1997 The Internet Software Consortium. +# Copyright (c) 1997, 1998 The Internet Software Consortium. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -44,12 +44,24 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) all: $(PROG) $(CATMANPAGES) install: $(PROG) $(CATMANPAGES) + @for dir in $(BINDIR) $(ADMMANDIR); 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) statmsg $(BINDIR) $(CHMOD) 755 $(BINDIR)/statmsg - if [ ! -d $(ADMMANDIR) ]; then \ - mkdir $(ADMMANDIR); \ - chmod 755 $(ADMMANDIR); \ - fi # $(MANINSTALL) $(MANFROM) statmsg.cat8 $(MANTO) \ # $(ADMMANDIR)/statmsg$(ADMMANEXT) diff --git a/sysconfd/Makefile.dist b/sysconfd/Makefile.dist index 169e8ed9e..4c61b2763 100644 --- a/sysconfd/Makefile.dist +++ b/sysconfd/Makefile.dist @@ -1,6 +1,6 @@ # Makefile.dist # -# Copyright (c) 1997 The Internet Software Consortium. +# Copyright (c) 1997, 1998 The Internet Software Consortium. # All rights reserved. # # Redistribution and use in source and binary forms, with or without @@ -44,12 +44,24 @@ CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS) all: $(PROG) $(CATMANPAGES) install: $(PROG) $(CATMANPAGES) + @for dir in $(BINDIR) $(ADMMANDIR); 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) sysconfd $(BINDIR) $(CHMOD) 755 $(BINDIR)/sysconfd - if [ ! -d $(ADMMANDIR) ]; then \ - mkdir $(ADMMANDIR); \ - chmod 755 $(ADMMANDIR); \ - fi # $(MANINSTALL) $(MANFROM) sysconfd.cat8 $(MANTO) \ # $(ADMMANDIR)/sysconfd$(ADMMANEXT)