bin/cvsignore: deleted, so that bin can be removed from the repository
authorAlexandre Oliva <oliva@samba.org>
Sun, 4 Oct 1998 22:42:05 +0000 (22:42 +0000)
committerAlexandre Oliva <oliva@samba.org>
Sun, 4 Oct 1998 22:42:05 +0000 (22:42 +0000)
.cvsignore: added bin; it is no longer part of the source tree

smbwrapper/smbsh: now auto-generated from smbsh.in
smbwrapper/.cvsignore: added smbsh

configure.in: generate @builddir@
configure, include/stamp-h.in: regen

Makefile.in: new target `smbwrapper'; sped up directory creation
(This used to be commit 8f95ee8fc32d74f20cca489ecd3f7e34e773db2f)

source3/.cvsignore
source3/Makefile.in
source3/bin/.cvsignore [deleted file]
source3/configure
source3/configure.in
source3/include/stamp-h.in
source3/smbwrapper/.cvsignore
source3/smbwrapper/smbsh.in [moved from source3/smbwrapper/smbsh with 59% similarity, mode: 0644]

index 413503e263f04782c5c3e92ce6958518d9860550..7d823233f55ba87fa55eb364645e8829727fbdf6 100644 (file)
@@ -1,4 +1,5 @@
 .deps
+bin
 Makefile
 Makefile.RPM
 config
index b4ed4f1a85bdb5be2a68d5d905efdcb097c45ead..6d27ffddce77955bac6954c4893e78ee62ec7c59 100644 (file)
@@ -19,6 +19,7 @@ INSTALLCMD=@INSTALL@
 
 VPATH=@srcdir@
 srcdir=@srcdir@
+builddir=@builddir@
 SHELL=/bin/sh
 
 BASEDIR=$(prefix)/samba
@@ -227,21 +228,16 @@ PICOBJS = $(SMBWRAPPER_OBJ:%.o=%.po)
 
 all : CHECK $(SPROGS) $(PROGS) 
 
+smbwrapper : CHECK smbwrapper/smbsh smbwrapper/smbwrapper.so
+
 .SUFFIXES:
 .SUFFIXES: .c .o .h .po
 
 CHECK:
        @echo "Using FLAGS = $(FLAGS)"
        @echo "Using LIBS = $(LIBS)"
-       @(cd $(srcdir) && ls -1d */*.c && echo bin/.) | \
-        sed 's,/[^/]*$$,,;s,^$$,.,' | \
-        while read dir; do \
-          if test ! -d "$$dir"; then \
-            echo mkdir "$$dir" && mkdir "$$dir" || true; \
-          else true; fi; \
-        done
 
-.c.o: @MAINT@ .deps/.dummy obj-dirs
+.c.o: @MAINT@ .deps/.dummy
        @echo Compiling $*.c
        @dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` && \
           if test ! -d "$$dir"; then \
@@ -253,7 +249,7 @@ CHECK:
 # it will only work with GNU make, gcc and --enable-maintainer-mode
 
 
-.c.po: @MAINT@ .deps/.dummy obj-dirs
+.c.po: @MAINT@ .deps/.dummy
        @echo Compiling $*.c with -fpic
        @dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` && \
           if test ! -d "$$dir"; then \
@@ -262,97 +258,86 @@ CHECK:
        @$(CC) -I. -I$(srcdir) $(FLAGS) -fpic -c $< -o $@ \
        @MAINT@ -Wp,-MD,.deps/`echo $* | sed s,/,_,g`.P && : >.deps/.stamp
 
-MKDIR_BIN = if test ! -d bin; then echo mkdir bin && mkdir bin || true; else true; fi
+bin/.dummy:
+       if test ! -d bin; then echo mkdir bin && mkdir bin || true; else true; fi
+       @: > $@ # create it
 
-bin/smbd: $(SMBD_OBJ)
+bin/smbd: $(SMBD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBD_OBJ) $(LDFLAGS) $(LIBS) 
 
-bin/nmbd: $(NMBD_OBJ)
+bin/nmbd: $(NMBD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(NMBD_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/swat: $(SWAT_OBJ)
+bin/swat: $(SWAT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SWAT_OBJ) $(LDFLAGS) $(LIBS) 
 
-bin/smbrun: $(SMBRUN_OBJ)
+bin/smbrun: $(SMBRUN_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBRUN_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/rpcclient: $(RPCCLIENT_OBJ)
+bin/rpcclient: $(RPCCLIENT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(RPCCLIENT_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbclient: $(CLIENT_OBJ)
+bin/smbclient: $(CLIENT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(CLIENT_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbmount: $(MOUNT_OBJ)
+bin/smbmount: $(MOUNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MOUNT_OBJ) $(LIBS)
 
-bin/smbmnt: $(MNT_OBJ)
+bin/smbmnt: $(MNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MNT_OBJ) $(LIBS)
 
-bin/smbumount: $(UMOUNT_OBJ)
+bin/smbumount: $(UMOUNT_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(UMOUNT_OBJ) $(LIBS)
 
-bin/testparm: $(TESTPARM_OBJ)
+bin/testparm: $(TESTPARM_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(TESTPARM_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/testprns: $(TESTPRNS_OBJ)
+bin/testprns: $(TESTPRNS_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(TESTPRNS_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbstatus: $(STATUS_OBJ)
+bin/smbstatus: $(STATUS_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(STATUS_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbpasswd: $(SMBPASSWD_OBJ)
+bin/smbpasswd: $(SMBPASSWD_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBPASSWD_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ)
+bin/make_smbcodepage: $(MAKE_SMBCODEPAGE_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MAKE_SMBCODEPAGE_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/nmblookup: $(NMBLOOKUP_OBJ)
+bin/nmblookup: $(NMBLOOKUP_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(NMBLOOKUP_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/make_printerdef: $(MAKE_PRINTERDEF_OBJ)
+bin/make_printerdef: $(MAKE_PRINTERDEF_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(MAKE_PRINTERDEF_OBJ) $(LDFLAGS) $(LIBS)
 
-bin/smbtorture: $(SMBTORTURE_OBJ)
+bin/smbtorture: $(SMBTORTURE_OBJ) bin/.dummy
        @echo Linking $@
-       @$(MKDIR_BIN)
        @$(CC) $(FLAGS) -o $@ $(SMBTORTURE_OBJ) $(LDFLAGS) $(LIBS)
 
 smbwrapper/smbwrapper.so: $(PICOBJS)
        @echo Linking shared library $@
        @$(LD) @LDSHFLAGS@ -o $@ $(PICOBJS)
 
+smbwrapper/smbsh: smbwrapper/smbsh.in config.status
+       CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
+       chmod +x $@
+
 install: installbin installman installscripts installcp installswat
 
 installdirs:
@@ -409,7 +394,7 @@ ctags:
        ctags `find . -name "*.[ch]"`
 
 realclean: clean
-       -rm -f config.log $(PROGS) $(SPROGS)
+       -rm -f config.log $(PROGS) $(SPROGS) smbsh
 
 distclean: realclean
        -rm -f include/config.h include/stamp-h Makefile
diff --git a/source3/bin/.cvsignore b/source3/bin/.cvsignore
deleted file mode 100644 (file)
index 0038aca..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-make_printerdef
-make_smbcodepage
-nmbd
-nmblookup
-smbclient
-smbd
-smbpasswd
-smbrun
-smbstatus
-smbtorture
-swat
-testparm
-testprns
-rpcclient
index c8c87d71388136d09197101b791281440406c1ef..285107973ab1b0b88898c91ed6989e1d29251b50 100755 (executable)
@@ -6207,6 +6207,9 @@ rm -fr conftest*
 fi
 
 
+builddir=`pwd`
+
+
 trap '' 1 2 15
 cat > confcache <<\EOF
 # This file is a shell script that caches the results of configure
@@ -6365,6 +6368,7 @@ s%@AUTOCONF@%$AUTOCONF%g
 s%@AUTOHEADER@%$AUTOHEADER%g
 s%@CPP@%$CPP%g
 s%@LIBOBJS@%$LIBOBJS%g
+s%@builddir@%$builddir%g
 
 CEOF
 EOF
index 626dc6c49490526720099897181b94273e755948..a5d75779eb1bc241bfe988a55bdd7843d41c449c 100644 (file)
@@ -874,4 +874,7 @@ AC_TRY_RUN([#include "${srcdir-.}/tests/summary.c"],
            echo "configure OK";,
           AC_MSG_ERROR([summary failure. Aborting config]),:)
 
+builddir=`pwd`
+AC_SUBST(builddir)
+
 AC_OUTPUT(include/stamp-h Makefile)
index 7aae7732de70c7117ad8d0e02d852ae950e29824..96ffedef4afdced06eef69830f0bafcc0732be22 100644 (file)
@@ -1 +1 @@
-Tue Sep 29 04:45:55 UTC 1998
+Sun Oct  4 22:04:34 UTC 1998
index 6d609cec52bfa8ec66916564302c3273f2d07a98..0ad505ff413e99f23080efff316b407c96a2f110 100644 (file)
@@ -1 +1,2 @@
 *.po
+smbsh
old mode 100755 (executable)
new mode 100644 (file)
similarity index 59%
rename from source3/smbwrapper/smbsh
rename to source3/smbwrapper/smbsh.in
index 2c83b45..f5a5614
@@ -1,15 +1,15 @@
-#!/bin/sh
+#! /bin/sh
 
-LIBDIR=/home/tridge/samba/source/smbwrapper
+SMBW_LIBDIR=${SMBW_LIBDIR-@builddir@/smbwrapper}
 
-if [ ! -f $LIBDIR/smbwrapper.so ]; then
+if [ ! -f ${SMBW_LIBDIR}/smbwrapper.so ]; then
     echo You need to set LIBDIR in smbsh
     exit
 fi
 
 # a simple launcher for the smbwrapper.so preloadde library
 
-if [ x$SMBW_USER = x ]; then
+if [ x"${SMBW_USER+set}" != x"set" ]; then
     echo username?
     read user
     SMBW_USER=$user
@@ -17,19 +17,19 @@ if [ x$SMBW_USER = x ]; then
 fi
 
 # this doesn't hide the password - we need a proper launch app for that
-if [ x$SMBW_PASSWORD = x ]; then
+if [ x"${SMBW_PASSWORD+set}" != x"set" ]; then
     echo password?
     read pass
     SMBW_PASSWORD=$pass
     export SMBW_PASSWORD
 fi
 
-LD_PRELOAD=$LIBDIR/smbwrapper.so
-export LD_PRELOAD
-
 PWD=`pwd`
 export PWD
 PS1='smbsh$ '
 export PS1
-bash
-echo done
+
+LD_PRELOAD=$SMBW_LIBDIR/smbwrapper.so
+export LD_PRELOAD
+
+exec ${SMBW_SHELL-${SHELL-/bin/sh}} ${1+"$@"}