mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
r13713: Added installcifsmount and uninstallcifsmount rules for mount.cifs and
unmount.cifs. This is controlled via CIFSMOUNT_PROGS which is set by
configure by default to yes on linux systems only. It's possible to
disable with --without-cifsmount anyhow.
Added ROOTSBINDIR to the Makefile to allow us an install to /sbin and
not $prefix/sbin. Configurable with --with-rootsbindir.
(This used to be commit a2ab4cc824
)
This commit is contained in:
parent
e54786b535
commit
94893f645b
@ -59,6 +59,7 @@ BASEDIR= @prefix@
|
||||
BINDIR = @bindir@
|
||||
# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
|
||||
SBINDIR = @sbindir@
|
||||
ROOTSBINDIR = @rootsbindir@
|
||||
LIBDIR = @libdir@
|
||||
VFSLIBDIR = $(LIBDIR)/vfs
|
||||
PDBLIBDIR = $(LIBDIR)/pdb
|
||||
@ -130,6 +131,8 @@ PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
|
||||
|
||||
SBIN_PROGS = bin/smbd@EXEEXT@ bin/nmbd@EXEEXT@ bin/swat@EXEEXT@ @EXTRA_SBIN_PROGS@
|
||||
|
||||
ROOT_SBIN_PROGS = @CIFSMOUNT_PROGS@
|
||||
|
||||
BIN_PROGS1 = bin/smbclient@EXEEXT@ bin/net@EXEEXT@ bin/smbspool@EXEEXT@ \
|
||||
bin/testparm@EXEEXT@ bin/smbstatus@EXEEXT@ bin/smbget@EXEEXT@
|
||||
BIN_PROGS2 = bin/smbcontrol@EXEEXT@ bin/smbtree@EXEEXT@ bin/tdbbackup@EXEEXT@ \
|
||||
@ -582,6 +585,10 @@ MNT_OBJ = client/smbmnt.o lib/replace.o $(VERSION_OBJ) $(SNPRINTF_OBJ)
|
||||
|
||||
UMOUNT_OBJ = client/smbumount.o
|
||||
|
||||
CIFS_MOUNT_OBJ = client/mount.cifs.o
|
||||
|
||||
CIFS_UMOUNT_OBJ = client/umount.cifs.o
|
||||
|
||||
NMBLOOKUP_OBJ = utils/nmblookup.o $(PARAM_OBJ) $(LIBNMB_OBJ) $(RPC_PARSE_OBJ1) $(DOSERR_OBJ) \
|
||||
$(LIB_NONSMBD_OBJ) $(POPT_LIB_OBJ) $(SECRETS_OBJ) $(LIBSAMBA_OBJ)
|
||||
|
||||
@ -742,8 +749,8 @@ NTLM_AUTH_OBJ = ${NTLM_AUTH_OBJ1} $(LIBSAMBA_OBJ) $(POPT_LIB_OBJ) \
|
||||
######################################################################
|
||||
# now the rules...
|
||||
######################################################################
|
||||
all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(SHLIBS) \
|
||||
$(MODULES) @EXTRA_ALL_TARGETS@
|
||||
all : SHOWFLAGS proto_exists $(SBIN_PROGS) $(BIN_PROGS) $(ROOT_SBIN_PROGS) \
|
||||
$(SHLIBS) $(MODULES) @EXTRA_ALL_TARGETS@
|
||||
|
||||
pam_smbpass : SHOWFLAGS bin/pam_smbpass.@SHLIBEXT@
|
||||
|
||||
@ -812,7 +819,7 @@ MAKEDIR = || exec false; \
|
||||
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
|
||||
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
|
||||
@echo Compiling $*.c
|
||||
@$(CC) -I. -I$(srcdir) $(FLAGS) @PIE_CFLAGS@ -c $< \
|
||||
@$(CC) -I. -I$(srcdir) $(FLAGS) $(MY_FLAGS) @PIE_CFLAGS@ -c $< \
|
||||
-o $@
|
||||
@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
|
||||
|
||||
@ -931,6 +938,14 @@ bin/smbumount@EXEEXT@: $(UMOUNT_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
|
||||
|
||||
bin/mount.cifs@EXEEXT@: $(CIFS_MOUNT_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(CIFS_MOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
|
||||
|
||||
bin/umount.cifs@EXEEXT@: $(CIFS_UMOUNT_OBJ) bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(CIFS_UMOUNT_OBJ) $(DYNEXP) $(LDFLAGS)
|
||||
|
||||
bin/testparm@EXEEXT@: $(TESTPARM_OBJ) @BUILD_POPT@ bin/.dummy
|
||||
@echo Linking $@
|
||||
@$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(DYNEXP) $(LIBS) @POPTLIBS@
|
||||
@ -1372,7 +1387,7 @@ bin/t_push_ucs2@EXEEXT@: bin/libbigballofmud.@SHLIBEXT@ torture/t_push_ucs2.o
|
||||
|
||||
bin/t_snprintf@EXEEXT@: lib/snprintf.c
|
||||
$(CC) $(FLAGS) @PIE_LDFLAGS@ -o $@ $(DYNEXP) -DTEST_SNPRINTF lib/snprintf.c -lm
|
||||
install: installservers installbin installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
|
||||
install: installservers installbin @INSTALL_CIFSMOUNT@ installman installscripts installdat installswat installmodules @INSTALL_LIBSMBCLIENT@ @INSTALL_LIBMSRPC@
|
||||
|
||||
install-everything: install installmodules
|
||||
|
||||
@ -1393,6 +1408,9 @@ installservers: all installdirs
|
||||
installbin: all installdirs
|
||||
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(BINDIR) $(BIN_PROGS)
|
||||
|
||||
installcifsmount: @CIFSMOUNT_PROGS@
|
||||
@$(SHELL) $(srcdir)/script/installdirs.sh $(INSTALLPERMS) $(DESTDIR) $(ROOTSBINDIR)
|
||||
@$(SHELL) $(srcdir)/script/installbin.sh $(INSTALLPERMS) $(DESTDIR) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
|
||||
|
||||
# Some symlinks are required for the 'probing' of modules.
|
||||
# This mechanism should go at some point..
|
||||
@ -1491,7 +1509,7 @@ showlayout:
|
||||
@echo " swatdir: $(SWATDIR)"
|
||||
|
||||
|
||||
uninstall: uninstallman uninstallservers uninstallbin uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@
|
||||
uninstall: uninstallman uninstallservers uninstallbin @UNINSTALL_CIFSMOUNT@ uninstallscripts uninstalldat uninstallswat uninstallmodules @UNINSTALL_LIBSMBCLIENT@ @UNINSTALL_LIBMSRPC@
|
||||
|
||||
uninstallman:
|
||||
@$(SHELL) $(srcdir)/script/uninstallman.sh $(DESTDIR)$(MANDIR) $(srcdir) C
|
||||
@ -1502,6 +1520,9 @@ uninstallservers:
|
||||
uninstallbin:
|
||||
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) $(BINDIR) $(BIN_PROGS)
|
||||
|
||||
uninstallcifsmount:
|
||||
@$(SHELL) $(srcdir)/script/uninstallbin.sh $(INSTALLPERMS) $(DESTDIR) $(ROOTSBINDIR) @CIFSMOUNT_PROGS@
|
||||
|
||||
uninstallmodules:
|
||||
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(BASEDIR) $(VFSLIBDIR) $(VFS_MODULES)
|
||||
@$(SHELL) $(srcdir)/script/uninstallmodules.sh $(INSTALLPERMS) $(DESTDIR) $(BASEDIR) $(PDBLIBDIR) $(PDB_MODULES)
|
||||
@ -1537,7 +1558,7 @@ TOPFILES=dynconfig.o dynconfig.@PICSUFFIX@
|
||||
|
||||
clean: delheaders python_clean
|
||||
-rm -f core */*~ *~ */*.o */*.@PICSUFFIX@ */*.@SHLIBEXT@ \
|
||||
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(MODULES) \
|
||||
$(TOPFILES) $(BIN_PROGS) $(SBIN_PROGS) $(ROOT_SBIN_PROGS) $(MODULES) \
|
||||
$(TORTURE_PROGS) $(LIBSMBCLIENT) $(LIBSMBSHAREMODES) \
|
||||
$(EVERYTHING_PROGS) $(LIBMSRPC) .headers.stamp
|
||||
-rm -rf t_dir
|
||||
|
@ -22,6 +22,7 @@ fi
|
||||
# ones...
|
||||
AC_PREFIX_DEFAULT(/usr/local/samba)
|
||||
|
||||
rootsbindir="/sbin"
|
||||
lockdir="\${VARDIR}/locks"
|
||||
piddir="\${VARDIR}/locks"
|
||||
mandir="\${prefix}/man"
|
||||
@ -62,6 +63,22 @@ AC_ARG_WITH(privatedir,
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set root sbin directory location
|
||||
AC_ARG_WITH(rootsbindir,
|
||||
[ --with-rootsbindir=DIR Which directory to use for root sbin (/sbin)],
|
||||
[ case "$withval" in
|
||||
yes|no)
|
||||
#
|
||||
# Just in case anybody calls it without argument
|
||||
#
|
||||
AC_MSG_WARN([--with-rootsbindir called without argument - will use default])
|
||||
;;
|
||||
* )
|
||||
rootsbindir="$withval"
|
||||
;;
|
||||
esac])
|
||||
|
||||
#################################################
|
||||
# set lock directory location
|
||||
AC_ARG_WITH(lockdir,
|
||||
@ -201,6 +218,7 @@ AC_SUBST(privatedir)
|
||||
AC_SUBST(swatdir)
|
||||
AC_SUBST(bindir)
|
||||
AC_SUBST(sbindir)
|
||||
AC_SUBST(rootsbindir)
|
||||
|
||||
dnl Unique-to-Samba variables we'll be playing with.
|
||||
AC_SUBST(SHELL)
|
||||
@ -242,6 +260,9 @@ AC_SUBST(SMBWRAPPER)
|
||||
AC_SUBST(SMBWRAP_OBJS)
|
||||
AC_SUBST(SMBWRAP_INC)
|
||||
AC_SUBST(EXTRA_BIN_PROGS)
|
||||
AC_SUBST(CIFSMOUNT_PROGS)
|
||||
AC_SUBST(INSTALL_CIFSMOUNT)
|
||||
AC_SUBST(UNINSTALL_CIFSMOUNT)
|
||||
AC_SUBST(EXTRA_SBIN_PROGS)
|
||||
AC_SUBST(EXTRA_ALL_TARGETS)
|
||||
AC_SUBST(CONFIG_LIBS)
|
||||
@ -3567,6 +3588,46 @@ AC_ARG_WITH(smbmount,
|
||||
AC_MSG_RESULT(no)
|
||||
)
|
||||
|
||||
#################################################
|
||||
# check for mount- and umount.cifs support
|
||||
CIFSMOUNT_PROGS=""
|
||||
INSTALL_CIFSMOUNT=""
|
||||
UNINSTALL_CIFSMOUNT=""
|
||||
AC_MSG_CHECKING(whether to build mount.cifs and umount.cifs)
|
||||
AC_ARG_WITH(cifsmount,
|
||||
[ --with-cifsmount Include mount.cifs and umount.cifs (Linux only) support (default=yes)],
|
||||
[ case "$withval" in
|
||||
no)
|
||||
AC_MSG_RESULT(no)
|
||||
;;
|
||||
*)
|
||||
case "$host_os" in
|
||||
*linux*)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs and umount.cifs])
|
||||
CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
|
||||
INSTALL_CIFSMOUNT="installcifsmount"
|
||||
UNINSTALL_CIFSMOUNT="uninstallcifsmount"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(not on a linux system!)
|
||||
;;
|
||||
esac
|
||||
;;
|
||||
esac ],
|
||||
[ case "$host_os" in
|
||||
*linux*)
|
||||
AC_MSG_RESULT(yes)
|
||||
AC_DEFINE(WITH_CIFSMOUNT,1,[Whether to build mount.cifs and umount.cifs])
|
||||
CIFSMOUNT_PROGS="bin/mount.cifs bin/umount.cifs"
|
||||
INSTALL_CIFSMOUNT="installcifsmount"
|
||||
UNINSTALL_CIFSMOUNT="uninstallcifsmount"
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR(not on a linux system!)
|
||||
;;
|
||||
esac ]
|
||||
)
|
||||
|
||||
|
||||
#################################################
|
||||
|
Loading…
Reference in New Issue
Block a user