Added file ./bootstrap; Added $(DESTDIR) to */Makefile.am make alternate root installs possible

This commit is contained in:
Richard Hacker 2006-10-09 12:59:09 +00:00
parent 14b7f84cbf
commit f9b50c6654
8 changed files with 24 additions and 23 deletions

View File

@ -35,13 +35,9 @@
# #
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
SUBDIRS = master/ devices/ SUBDIRS = master/ devices/ script/
initdir = $(sysconfdir)/init.d
sysdir = $(sysconfdir)/sysconfig
include_HEADERS = include/ecdb.h include/ecrt.h include_HEADERS = include/ecdb.h include/ecrt.h
noinst_SCRIPTS = script/lsec.pl script/ethercat.sh script/sysconfig
MINI_FILES = \ MINI_FILES = \
examples/mini/Kbuild \ examples/mini/Kbuild \
@ -66,7 +62,7 @@ MSR_FILES = \
examples/msr/msrserv.pl \ examples/msr/msrserv.pl \
examples/msr/msr_unload examples/msr/msr_unload
EXTRA_DIST = $(noinst_SCRIPTS) documentation/ethercat_doc.pdf \ EXTRA_DIST = documentation/ethercat_doc.pdf \
$(MINI_FILES) $(RTAI_FILES) $(MSR_FILES) $(MINI_FILES) $(RTAI_FILES) $(MSR_FILES)
mydist: mydist:
@ -79,19 +75,7 @@ dist-hook:
fi fi
install-data-local: install-data-local:
$(mkinstalldirs) $(bindir) $(DEPMOD) -b "$(DESTDIR)" $(LINUX_KERNEL_VERSION)
$(mkinstalldirs) $(initdir)
$(mkinstalldirs) $(sysdir)
$(INSTALL_SCRIPT) $(srcdir)/script/lsec.pl $(bindir)/lsec
$(INSTALL_SCRIPT) $(srcdir)/script/ethercat.sh $(initdir)/ethercat
$(INSTALL_DATA) $(srcdir)/script/sysconfig $(sysdir)/ethercat
$(DEPMOD) $(LINUX_KERNEL_VERSION)
uninstall-local:
rm -rf $(LINUX_MODULES_DIR)/ethercat
rm $(bindir)/lsec
rm $(initdir)/ethercat
rm $(sysdir)/ethercat
doc: doc:
doxygen Doxyfile doxygen Doxyfile

7
bootstrap Executable file
View File

@ -0,0 +1,7 @@
#!/bin/bash
set -x
aclocal -I config
autoheader
automake --add-missing
autoconf

View File

@ -5,10 +5,6 @@
AC_INIT([ethercat],[1.1],[fp@igh-essen.com]) AC_INIT([ethercat],[1.1],[fp@igh-essen.com])
AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2]) AM_INIT_AUTOMAKE([-Wall -Werror foreign dist-bzip2])
AC_PREFIX_DEFAULT([/opt/etherlab]) AC_PREFIX_DEFAULT([/opt/etherlab])
AC_CONFIG_FILES([Makefile master/Makefile devices/Makefile \
examples/mini/Makefile \
examples/rtai/Makefile \
examples/msr/Makefile])
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
# Linux sources # Linux sources
@ -53,6 +49,15 @@ fi
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------
AC_CONFIG_FILES([
Makefile
master/Makefile
devices/Makefile
script/Makefile
examples/mini/Makefile
examples/rtai/Makefile
examples/msr/Makefile
])
AC_OUTPUT AC_OUTPUT
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -51,6 +51,7 @@ clean-local:
install-data-local: install-data-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \ $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \
INSTALL_MOD_PATH="$(DESTDIR)" \
INSTALL_MOD_DIR="ethercat" modules_install INSTALL_MOD_DIR="ethercat" modules_install
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -45,6 +45,7 @@ clean-local:
install-data-local: install-data-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \ $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \
INSTALL_MOD_PATH="$(DESTDIR)" \
INSTALL_MOD_DIR="ethercat" modules_install INSTALL_MOD_DIR="ethercat" modules_install
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -52,6 +52,7 @@ clean-local:
install-data-local: install-data-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \ $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \
INSTALL_MOD_PATH="$(DESTDIR)" \
INSTALL_MOD_DIR="ethercat" modules_install INSTALL_MOD_DIR="ethercat" modules_install
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -47,6 +47,7 @@ clean-local:
install-data-local: install-data-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \ $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \
INSTALL_MOD_PATH="$(DESTDIR)" \
INSTALL_MOD_DIR="ethercat" modules_install INSTALL_MOD_DIR="ethercat" modules_install
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------

View File

@ -61,6 +61,7 @@ clean-local:
install-data-local: install-data-local:
$(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \ $(MAKE) -C "$(LINUX_SOURCE_DIR)" M="$(ABSSRCDIR)" \
INSTALL_MOD_PATH="$(DESTDIR)" \
INSTALL_MOD_DIR="ethercat" modules_install INSTALL_MOD_DIR="ethercat" modules_install
#------------------------------------------------------------------------------ #------------------------------------------------------------------------------