From: Ted Lemon Date: Tue, 20 Jun 2000 20:01:06 +0000 (+0000) Subject: Fix up to support build subdirectories. Fix depend target. X-Git-Tag: V3-BETA-2-PATCH-1~141 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=b515ff35f22373a3788ff9e22d23f5ea5bca82e5;p=thirdparty%2Fdhcp.git Fix up to support build subdirectories. Fix depend target. --- diff --git a/client/Makefile.dist b/client/Makefile.dist index eb5435267..c0166e87e 100644 --- a/client/Makefile.dist +++ b/client/Makefile.dist @@ -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. diff --git a/common/Makefile.dist b/common/Makefile.dist index e58330008..d809e6ade 100644 --- a/common/Makefile.dist +++ b/common/Makefile.dist @@ -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 diff --git a/dhcpctl/Makefile.dist b/dhcpctl/Makefile.dist index 1589de336..02e3a8339 100644 --- a/dhcpctl/Makefile.dist +++ b/dhcpctl/Makefile.dist @@ -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