From 310bb382d4409c4d561025132c99b8c1850b63ad Mon Sep 17 00:00:00 2001 From: Stephan Raue Date: Sat, 11 Jun 2011 23:25:07 +0200 Subject: [PATCH] add DESTDIR support, needed for crosscompiling; dont hardcode /usr/include - use --includedir= instead on configure time Signed-off-by: Stephan Raue --- Makefile.in | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/Makefile.in b/Makefile.in index 64f03d8..d86a1b7 100644 --- a/Makefile.in +++ b/Makefile.in @@ -1,6 +1,7 @@ prefix = @prefix@ exec_prefix = @exec_prefix@ libdir = @libdir@ +includedir = @includedir@ bindir = @bindir@ LIBS=@LIBS@ INSTALLCMD = @install@ -c @@ -109,22 +110,16 @@ rquota/libnfs-raw-rquota.o: rquota/libnfs-raw-rquota.c rquota/libnfs-raw-rquota. $(CC) $(CFLAGS) -c rquota/libnfs-raw-rquota.c -o $@ install: $(LIBNFS_A) $(LIBNFS_SO) -ifeq ("$(LIBDIR)x","x") - mkdir -p $(libdir) - $(INSTALLCMD) -m 755 $(LIBNFS_SO) $(libdir) - $(INSTALLCMD) -m 755 $(LIBNFS_A) $(libdir) + mkdir -p $(DESTDIR)$(libdir) + $(INSTALLCMD) -m 755 $(LIBNFS_SO) $(DESTDIR)$(libdir) + $(INSTALLCMD) -m 755 $(LIBNFS_A) $(DESTDIR)$(libdir) @ldconfig@ -else - mkdir -p $(LIBDIR) - $(INSTALLCMD) -m 755 $(LIBISCSI_SO) $(LIBDIR) - $(INSTALLCMD) -m 755 $(LIBNFS_A) $(LIBDIR) -endif - mkdir -p $(prefix)/include/nfsc - $(INSTALLCMD) -m 644 include/libnfs.h $(prefix)/include/nfsc - $(INSTALLCMD) -m 644 include/libnfs-private.h $(prefix)/include/nfsc - $(INSTALLCMD) -m 644 mount/libnfs-raw-mount.h $(prefix)/include/nfsc - $(INSTALLCMD) -m 644 nfs/libnfs-raw-nfs.h $(prefix)/include/nfsc - $(INSTALLCMD) -m 644 portmap/libnfs-raw-portmap.h $(prefix)/include/nfsc + mkdir -p $(DESTDIR)$(includedir)/nfsc + $(INSTALLCMD) -m 644 include/libnfs.h $(DESTDIR)$(includedir)/nfsc + $(INSTALLCMD) -m 644 include/libnfs-private.h $(DESTDIR)$(includedir)/nfsc + $(INSTALLCMD) -m 644 mount/libnfs-raw-mount.h $(DESTDIR)$(includedir)/nfsc + $(INSTALLCMD) -m 644 nfs/libnfs-raw-nfs.h $(DESTDIR)$(includedir)/nfsc + $(INSTALLCMD) -m 644 portmap/libnfs-raw-portmap.h $(DESTDIR)$(includedir)/nfsc distclean: clean rm -f config.h config.log config.status configure Makefile -- 2.34.1