Commit a1ba6335 authored by Eddie Kohler's avatar Eddie Kohler

Linuxmodule: Installation also installs the fixed Linux include files.

parent 2b1b143b
......@@ -19,8 +19,8 @@ ACLOCAL = :
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA_IF_CHANGED = @INSTALL_IF_CHANGED@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DATA_IF_CHANGED = $(INSTALL_IF_CHANGED) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
EXTRA_PROVIDES =
......@@ -115,7 +115,7 @@ install-local-include: stamp-h installch
$(mkinstalldirs) $(DESTDIR)$(netincludedir)
$(INSTALL_DATA_IF_CHANGED) $(srcdir)/include/clicknet/*.h $(DESTDIR)$(netincludedir)
install-include: install-local-include
@cd tools && $(MAKE) install-include
@for d in $(ALL_TARGETS) tools; do (cd $$d && $(MAKE) install-include) || exit 1; done
install-lib:
@if echo $(ALL_TARGETS) | grep userlevel >/dev/null 2>&1; then cd userlevel && $(MAKE) install-lib; fi
@if echo $(ALL_TARGETS) | grep tools >/dev/null 2>&1; then cd tools && $(MAKE) install-lib; fi
......
......@@ -24,7 +24,7 @@ LD = @LD@
STRIP = @STRIP@
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
mkinstalldirs = @top_srcdir@/mkinstalldirs
ifeq ($(V),1)
......@@ -140,8 +140,10 @@ endif
install: $(INSTALLOBJS)
$(mkinstalldirs) $(DESTDIR)$(libdir)
for i in $(INSTALLOBJS); do $(INSTALL_DATA) $$i $(DESTDIR)$(libdir)/$$i; done
install-include:
@:
install-man:
:
@:
uninstall:
for i in $(INSTALLOBJS); do /bin/rm -f $(DESTDIR)$(libdir)/$$i; done
......@@ -151,4 +153,5 @@ clean:
distclean: clean
-rm -f Makefile
.PHONY: all clean distclean elemlist install uninstall
.PHONY: all clean distclean elemlist \
install install-include install-man uninstall
......@@ -606,6 +606,8 @@ perl5
AUTOCONF
GMAKE
SUBMAKE
CLICK_BUILD_INSTALL_IF_CHANGED
CLICK_BUILD_INSTALL
CLICKINSTALL
INSTALL_IF_CHANGED
INSTALL_DATA
......@@ -6978,7 +6980,7 @@ else
ac_cv_endian=0
cat > conftest.$ac_ext <<EOF
#line 6981 "configure"
#line 6983 "configure"
#include "confdefs.h"
#include <$endian_hdr>
#ifdef __BYTE_ORDER
......@@ -11201,6 +11203,10 @@ $as_echo "no" >&6; }
CLICKINSTALL=`echo "$INSTALL" | sed 's|^\$(.*)/|\$(clickdatadir)/|'`
CLICK_BUILD_INSTALL="$INSTALL"
CLICK_BUILD_INSTALL_IF_CHANGED="`echo "$INSTALL_IF_CHANGED" | sed 's|(INSTALL)|(CLICK_BUILD_INSTALL)|'`"
if test "${GMAKE-NO}" = NO; then
......
......@@ -17,7 +17,7 @@ infodir = @infodir@
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_INFO = @INSTALL_INFO@
MAKEINFO = @MAKEINFO@
TEXI2DVI = @TEXI2DVI@
......
......@@ -18,8 +18,8 @@ ACLOCAL = aclocal -I m4
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA_IF_CHANGED = @INSTALL_IF_CHANGED@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DATA_IF_CHANGED = $(INSTALL_IF_CHANGED) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
prefix = @prefix@
......
......@@ -18,8 +18,8 @@ ACLOCAL = aclocal -I m4
PERL = @PERL@
INSTALL = @INSTALL@
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA_IF_CHANGED = @INSTALL_IF_CHANGED@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DATA_IF_CHANGED = $(INSTALL_IF_CHANGED) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
prefix = @prefix@
......
......@@ -69,7 +69,7 @@ CXXCPP = @CXXCPP@
LD = @LD@
STRIP = @STRIP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
mkinstalldirs = @top_srcdir@/mkinstalldirs
.SUFFIXES:
......
......@@ -10,6 +10,7 @@ exec_prefix = @exec_prefix@
bindir = @bindir@
sbindir = @sbindir@
libdir = @libdir@
includedir = @includedir@
linux_builddir = @linux_builddir@
linux_srcdir = @linux_srcdir@
linux_makeargs = @linux_makeargs@
......@@ -78,8 +79,10 @@ endif
top_builddir := $(obj)/..
endif
CLICKINSTALL = @INSTALL@
CLICKINSTALL_DATA = @INSTALL@ -m 644
CLICK_BUILD_INSTALL = @CLICK_BUILD_INSTALL@
CLICK_BUILD_INSTALL_IF_CHANGED = @CLICK_BUILD_INSTALL_IF_CHANGED@
CLICK_BUILD_INSTALL_DATA = $(CLICK_BUILD_INSTALL) -m 644
CLICK_BUILD_INSTALL_DATA_IF_CHANGED = $(CLICK_BUILD_INSTALL_IF_CHANGED) -m 644
CLICKmkinstalldirs = $(conf_auxdir)/mkinstalldirs
CLICK_ELEM2MAKE = $(top_builddir)/click-buildtool elem2make --linux26
......@@ -174,13 +177,18 @@ endif
# Don't install in Linux directories for now
# $(MAKE) -C $(KERNELPATH) M=$(shell pwd) modules_install
install: Makefile $(ELEMENTSCONF).mk $(ELEMENTSCONF).cc all
install: install-local install-include
install-local: Makefile $(ELEMENTSCONF).mk $(ELEMENTSCONF).cc all
$(CLICKmkinstalldirs) $(DESTDIR)$(libdir)
for i in $(patsubst %.o,%.ko,$(INSTALLOBJS)); do $(CLICKINSTALL_DATA) $$i $(DESTDIR)$(libdir)/$$i; done
for i in $(patsubst %.o,%.ko,$(INSTALLOBJS)); do $(CLICK_BUILD_INSTALL_DATA) $$i $(DESTDIR)$(libdir)/$$i; done
install-include:
(cd $(top_builddir)/include/click-linuxmodule; find . -type d) | grep / | sed 's ^\.\(.*\) '"$(DESTDIR)$(includedir)/click-linuxmodule"'\1 ' | xargs -L 1 $(CLICKmkinstalldirs)
(cd $(top_builddir)/include/click-linuxmodule; find . -type f) | grep / | sed 's ^\.\(.*\) '"$(top_builddir)/include/click-linuxmodule"'\1'" $(DESTDIR)$(includedir)/click-linuxmodule"'\1 ' | xargs -L 1 $(CLICK_BUILD_INSTALL_DATA_IF_CHANGED)
install-man:
:
@:
uninstall:
for i in $(patsubst %.o,%.ko,$(INSTALLOBJS)); do /bin/rm -f $(DESTDIR)$(libdir)/$$i; done
(cd $(top_builddir)/include/click-linuxmodule; find . -type f) | grep / | sed 's ^\.\(.*\) '"$(top_builddir)/include/click-linuxmodule"'\1'" $(DESTDIR)$(includedir)/click-linuxmodule"'\1 ' | xargs -L 1 rm -f
else
......@@ -200,7 +208,7 @@ CXXCPP = @CXXCPP@
LD = @LD@
STRIP = @STRIP@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA = $(INSTALL) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
CLICK_ELEM2MAKE = $(top_builddir)/click-buildtool elem2make
......@@ -270,11 +278,14 @@ ifneq ($(DEPFILES),)
include $(DEPFILES)
endif
install: $(INSTALLOBJS)
install: install-local
install-local: $(INSTALLOBJS)
$(mkinstalldirs) $(DESTDIR)$(libdir)
for i in $(INSTALLOBJS); do $(INSTALL_DATA) $$i $(DESTDIR)$(libdir)/$$i; done
install-include:
@:
install-man:
:
@:
uninstall:
for i in $(INSTALLOBJS); do /bin/rm -f $(DESTDIR)$(libdir)/$$i; done
......@@ -310,4 +321,5 @@ clean:
distclean: clean
-rm -f Makefile
.PHONY: all clean distclean elemlist install uninstall always
.PHONY: always all clean distclean elemlist \
install install-local install-include install-man uninstall
......@@ -367,6 +367,10 @@ AC_DEFUN([CLICK_PROG_INSTALL], [
AC_SUBST(INSTALL_IF_CHANGED)
CLICKINSTALL=`echo "$INSTALL" | sed 's|^\$(.*)/|\$(clickdatadir)/|'`
AC_SUBST(CLICKINSTALL)
CLICK_BUILD_INSTALL="$INSTALL"
AC_SUBST(CLICK_BUILD_INSTALL)
CLICK_BUILD_INSTALL_IF_CHANGED="`echo "$INSTALL_IF_CHANGED" | sed 's|(INSTALL)|(CLICK_BUILD_INSTALL)|'`"
AC_SUBST(CLICK_BUILD_INSTALL_IF_CHANGED)
])
......
......@@ -136,6 +136,8 @@ endif
install: $(INSTALLLIBS)
$(mkinstalldirs) $(DESTDIR)$(libdir)
for i in $(INSTALLLIBS); do $(INSTALL) $$i $(DESTDIR)$(libdir)/$$i; done
install-include:
@:
uninstall:
for i in $(INSTALLLIBS); do rm -f $(DESTDIR)$(libdir)/$$i; done
......@@ -145,4 +147,5 @@ clean:
distclean: clean
-rm -f Makefile
.PHONY: all clean distclean elemlist install uninstall
.PHONY: all clean distclean elemlist \
install install-include uninstall
......@@ -25,8 +25,9 @@ BUILD_CXX = @BUILD_CXX@
BUILD_AR_CREATE = @BUILD_AR@ @AR_CREATEFLAGS@
BUILD_RANLIB = @BUILD_RANLIB@
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL@ -m 644
INSTALL_DATA_IF_CHANGED = @INSTALL_IF_CHANGED@ -m 644
INSTALL_IF_CHANGED = @INSTALL_IF_CHANGED@
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DATA_IF_CHANGED = $(INSTALL_IF_CHANGED) -m 644
mkinstalldirs = $(conf_auxdir)/mkinstalldirs
ifeq ($(V),1)
......
......@@ -137,11 +137,13 @@ endif
install: $(INSTALLPROGS) install-lib
$(mkinstalldirs) $(DESTDIR)$(bindir)
for i in $(INSTALLPROGS); do $(INSTALL) $$i $(DESTDIR)$(bindir)/$$i; done
install-include:
@:
install-lib: $(INSTALLLIBS)
$(mkinstalldirs) $(DESTDIR)$(libdir)
for i in $(INSTALLLIBS); do $(INSTALL) $$i $(DESTDIR)$(libdir)/$$i; done
install-man:
:
@:
uninstall:
for i in $(INSTALLLIBS); do rm -f $(DESTDIR)$(libdir)/$$i; done
for i in $(INSTALLPROGS); do rm -f $(DESTDIR)$(bindir)/$$i; done
......@@ -154,4 +156,4 @@ distclean: clean
-rm -f Makefile
.PHONY: all clean clean-lib distclean elemlist \
install install-lib uninstall
install install-include install-lib install-man uninstall
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment