]> git.ipfire.org Git - thirdparty/dhcp.git/commitdiff
Fix up to support build subdirectories. Fix depend target.
authorTed Lemon <source@isc.org>
Tue, 20 Jun 2000 20:01:06 +0000 (20:01 +0000)
committerTed Lemon <source@isc.org>
Tue, 20 Jun 2000 20:01:06 +0000 (20:01 +0000)
client/Makefile.dist
common/Makefile.dist
dhcpctl/Makefile.dist

index eb54352670b20e9f4772649b07eed9dada10ece7..c0166e87e10a8a6ee96da3716c4bf17c46a00349 100644 (file)
@@ -27,7 +27,7 @@ PROG   = dhclient
 MAN    = dhclient.8 dhclient.conf.5 dhclient-script.8 dhclient.leases.5
 
 DEBUG  = -g
-INCLUDES = -I.. $(BINDINC) -I../includes
+INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
 DHCPLIB = ../common/libdhcp.a ../omapip/libomapi.a $(BINDLIB)
 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
 
@@ -50,7 +50,8 @@ install: all
        if [ x$(SCRIPT) = xnone ]; then \
          echo "No client script available."; \
        else \
-         $(INSTALL) scripts/$(SCRIPT) $(DESTDIR)$(ETC)/dhclient-script; \
+         $(INSTALL) $(TOP)/client/scripts/$(SCRIPT)\
+                                       $(DESTDIR)$(ETC)/dhclient-script; \
          $(CHMOD) 700 $(DESTDIR)$(ETC)/dhclient-script; \
        fi
        $(MANINSTALL) $(MANFROM) dhclient.$(MANCAT)8 $(MANTO) \
@@ -63,7 +64,7 @@ install: all
                        $(DESTDIR)$(FFMANDIR)/dhclient.leases$(FFMANEXT)
 
 depend:
-       mkdep $(INCLUDES) $(PREDEFINES) $(SRCS)
+       $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRCS)
 
 clean:
        -rm -f $(OBJS)
@@ -74,6 +75,14 @@ realclean: clean
 distclean: realclean
        -rm -f Makefile
 
+links:
+       for foo in $(SRCS) $(MAN); do \
+         if [ ! -b $$foo ]; then \
+           rm -f $$foo; \
+         fi; \
+         ln -s $(TOP)/client/$$foo $$foo; \
+       done
+
 # These should only be done on 4.4 BSD-based systems, since the mandoc
 # macros aren't available on older unices.   Catted man pages are
 # provided in the distribution so that this doesn't become a problem.
index e5833000800381aaafe05f0588b67b6740b2292b..d809e6ade611711ba9671b63cc5e6b75892e2629 100644 (file)
@@ -30,7 +30,7 @@ OBJ    = raw.o parse.o nit.o icmp.o dispatch.o conflex.o upf.o bpf.o socket.o \
 MAN    = dhcp-options.5 dhcp-contrib.5 dhcp-eval.5
 
 DEBUG  = -g
-INCLUDES = -I.. $(BINDINC) -I../includes
+INCLUDES = -I$(TOP) $(BINDINC) -I$(TOP)/includes
 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
 
 all:   libdhcp.a $(CATMANPAGES)
@@ -59,7 +59,7 @@ install: all
                                $(DESTDIR)$(FFMANDIR)/dhcp-contrib$(FFMANEXT)
 
 depend:
-       mkdep $(INCLUDES) $(PREDEFINES) $(SRC)
+       $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
 
 clean:
        -rm -f $(OBJ)
@@ -70,6 +70,14 @@ realclean: clean
 distclean: realclean
        -rm -f Makefile
 
+links:
+       for foo in $(SRC) $(MAN); do \
+         if [ ! -b $$foo ]; then \
+           rm -f $$foo; \
+         fi; \
+         ln -s $(TOP)/common/$$foo $$foo; \
+       done
+
 dhcp-options.cat5:     dhcp-options.man5
        nroff -man dhcp-options.man5 >dhcp-options.cat5
 
index 1589de336480b3db9d3457f079ed42f9a3bfbdc0..02e3a833931d407c8dc347b699756717fc42a875 100644 (file)
@@ -22,9 +22,10 @@ SEDMANPAGES = dhcpctl.man3
 SRC    = dhcpctl.c callback.c remote.c
 OBJ    = dhcpctl.o callback.o remote.o
 MAN    = dhcpctl.3
+HDRS   = dhcpctl.h
 
 DEBUG  = -g
-INCLUDES = $(BINDINC) -I../includes
+INCLUDES = $(BINDINC) -I$(TOP)/includes
 CFLAGS = $(DEBUG) $(PREDEFINES) $(INCLUDES) $(COPTS)
 
 all:   libdhcpctl.a test cltest $(CATMANPAGES)
@@ -65,7 +66,7 @@ install: all
        done
 
 depend:
-       mkdep $(INCLUDES) $(PREDEFINES) $(SRC)
+       $(MKDEP) $(INCLUDES) $(PREDEFINES) $(SRC)
 
 clean:
        -rm -f $(OBJ) test.o test cltest.o cltest
@@ -76,6 +77,14 @@ realclean: clean
 distclean: realclean
        -rm -f Makefile
 
+links:
+       for foo in $(SRC) $(MAN) test.c cltest.c $(HDRS); do \
+         if [ ! -b $$foo ]; then \
+           rm -f $$foo; \
+         fi; \
+         ln -s $(TOP)/dhcpctl/$$foo $$foo; \
+       done
+
 dhcpctl.cat3:  dhcpctl.man3
        nroff -man dhcpctl.man3 >dhcpctl.cat3