summaryrefslogtreecommitdiffstats
path: root/testsuite
diff options
context:
space:
mode:
authorGünther Deschner <gd@samba.org>2004-11-12 22:05:27 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:53:15 -0500
commit0a02eac76714ada5192c238416013f68eb4e63d5 (patch)
treec024ff625cbf89e49ce2c1a7107bd3abf5fe16a7 /testsuite
parentbcb9105c5488a97944d2dfee8681d662e9c9b818 (diff)
downloadsamba-0a02eac76714ada5192c238416013f68eb4e63d5.tar.gz
samba-0a02eac76714ada5192c238416013f68eb4e63d5.tar.xz
samba-0a02eac76714ada5192c238416013f68eb4e63d5.zip
r3709: Allow to build testsuite for libsmbclient when libsmbclient.so is
located not in -L/root/samba-head-old/source/bin. Patch from Lars Mueller <lmuelle@suse.de>, closes Bugzilla #2013. Guenther
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/libsmbclient/src/Makefile36
1 files changed, 34 insertions, 2 deletions
diff --git a/testsuite/libsmbclient/src/Makefile b/testsuite/libsmbclient/src/Makefile
index a59f1342801..8b4658f7db3 100644
--- a/testsuite/libsmbclient/src/Makefile
+++ b/testsuite/libsmbclient/src/Makefile
@@ -1,6 +1,6 @@
CC = gcc
-CFLAGS = -Wall -W -O2 -g
-LFLAGS = -L/root/samba-head-old/source/bin
+CFLAGS = -Wall -W -O2 -g -I../../../source/include
+LFLAGS = -L../../../source/bin
LIBS= -L/usr/lib -lsmbclient
INCPATH= -I. -I/usr/include -I./include
@@ -10,6 +10,13 @@ SUB_DIRS=init fstat open unlink chown close opendir closedir rename lseek lseekd
getdents creat read readdir mkdir rmdir write chmod open_print_job list_print_jobs \
print_file telldir unlink_print_job
+MAKEDIR = || exec false; \
+ if test -d "$$dir"; then :; else \
+ echo mkdir "$$dir"; \
+ mkdir -p "$$dir" >/dev/null 2>&1 || \
+ test -d "$$dir" || \
+ mkdir "$$dir" || \
+ exec false; fi || exec false
G_INIT = $(BIN_DIR)/init_1 \
$(BIN_DIR)/init_2 \
@@ -712,98 +719,122 @@ $(BIN_DIR)/read_13: read/read_13.o
$(BIN_DIR)/chmod_1: chmod/chmod_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ chmod/chmod_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/telldir_1: telldir/telldir_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ telldir/telldir_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/telldir_2: telldir/telldir_2.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ telldir/telldir_2.o $(INCPATH) $(LIBS)
$(BIN_DIR)/telldir_3: telldir/telldir_3.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ telldir/telldir_3.o $(INCPATH) $(LIBS)
$(BIN_DIR)/telldir_4: telldir/telldir_4.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ telldir/telldir_4.o $(INCPATH) $(LIBS)
$(BIN_DIR)/telldir_5: telldir/telldir_5.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ telldir/telldir_5.o $(INCPATH) $(LIBS)
$(BIN_DIR)/print_file_1: print_file/print_file_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ print_file/print_file_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/print_file_2: print_file/print_file_2.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ print_file/print_file_2.o $(INCPATH) $(LIBS)
$(BIN_DIR)/print_file_3: print_file/print_file_3.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ print_file/print_file_3.o $(INCPATH) $(LIBS)
$(BIN_DIR)/print_file_4: print_file/print_file_4.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ print_file/print_file_4.o $(INCPATH) $(LIBS)
$(BIN_DIR)/open_print_job_1: open_print_job/open_print_job_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ open_print_job/open_print_job_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/open_print_job_2: open_print_job/open_print_job_2.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ open_print_job/open_print_job_2.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_1: list_print_jobs/list_print_jobs_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_2: list_print_jobs/list_print_jobs_2.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_2.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_3: list_print_jobs/list_print_jobs_3.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_3.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_4: list_print_jobs/list_print_jobs_4.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_4.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_5: list_print_jobs/list_print_jobs_5.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_5.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_6: list_print_jobs/list_print_jobs_6.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_6.o $(INCPATH) $(LIBS)
$(BIN_DIR)/list_print_jobs_7: list_print_jobs/list_print_jobs_7.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ list_print_jobs/list_print_jobs_7.o $(INCPATH) $(LIBS)
$(BIN_DIR)/unlink_print_job_1: unlink_print_job/unlink_print_job_1.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_1.o $(INCPATH) $(LIBS)
$(BIN_DIR)/unlink_print_job_2: unlink_print_job/unlink_print_job_2.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_2.o $(INCPATH) $(LIBS)
$(BIN_DIR)/unlink_print_job_3: unlink_print_job/unlink_print_job_3.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_3.o $(INCPATH) $(LIBS)
$(BIN_DIR)/unlink_print_job_4: unlink_print_job/unlink_print_job_4.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_4.o $(INCPATH) $(LIBS)
$(BIN_DIR)/unlink_print_job_5: unlink_print_job/unlink_print_job_5.o
@echo Linking $@
+ @dir=$(BIN_DIR) $(MAKEDIR)@
@$(CC) $(LFLAGS) -o $@ unlink_print_job/unlink_print_job_5.o $(INCPATH) $(LIBS)
@@ -813,5 +844,6 @@ clean:
done
@rm -f $(GROUPS)
+ @rm -rf $(BIN_DIR)
@echo "Done"