]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Make install directories from top down.
authorTed Lemon <source@isc.org>
Tue, 17 Mar 1998 06:08:19 +0000 (06:08 +0000)
committerTed Lemon <source@isc.org>
Tue, 17 Mar 1998 06:08:19 +0000 (06:08 +0000)
common/Makefile.dist
statmsg/Makefile.dist
sysconfd/Makefile.dist

index 4f676d80c3453fbc10a0c899ba70fee3a45b7f37..1517b59a1fd13755e9923e27eee0de11a07b7fc9 100644 (file)
@@ -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)
        
index 8a2498fa12969bd33f69e7592b0472fb81ab1475..8ebe0f807667c6c36dc3029abfe1d826ee2f3cd6 100644 (file)
@@ -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)
 
index 169e8ed9ed40e59c8ddba2ed0fccb66661e767c9..4c61b27633fbfd6914da73a063a4001c5ec47f55 100644 (file)
@@ -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)