summaryrefslogtreecommitdiff
path: root/source3/Makefile.in
diff options
context:
space:
mode:
authorMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
committerMartin Pool <mbp@samba.org>2001-11-19 02:49:53 +0000
commitf741f656737f4ec46cd318e986b6bf412ed309d2 (patch)
treefb2b1999441e25ae5db177631dd42abb051a9bce /source3/Makefile.in
parenta1b9de0b9872b91574e75bb360d49b887a072389 (diff)
downloadsamba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.gz
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.tar.bz2
samba-f741f656737f4ec46cd318e986b6bf412ed309d2.zip
Store some path names in global variables initialized to configure
default, rather than in preprocessor macros. (This used to be commit 79ec88f0da40faebe1e587f1b3e87b5f2b184f58)
Diffstat (limited to 'source3/Makefile.in')
-rw-r--r--source3/Makefile.in33
1 files changed, 28 insertions, 5 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 7546ded1fa..480513123f 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -33,6 +33,9 @@ SHELL=/bin/sh
# will search for a POSIX-compliant shell, and that might not be
# /bin/sh on some platforms. I guess it's not a big problem -- mbp
+# See the autoconf manual "Installation Directory Variables" for a
+# discussion of thesubtle use of these variables.
+
BASEDIR= @prefix@
BINDIR = @bindir@
# sbindir is mapped to bindir when compiling SAMBA in 2.0.x compatibility mode.
@@ -67,14 +70,16 @@ LOCKDIR = @lockdir@
man_langs = "@manlangs@"
PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
-FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -DLOGFILEBASE=\"$(LOGFILEBASE)\"
+FLAGS1 = $(CFLAGS) -Iinclude -I$(srcdir)/include -I$(srcdir)/ubiqx -I$(srcdir)/smbwrapper $(CPPFLAGS) -I. -I$(srcdir)
FLAGS2 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
-FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DSBINDIR=\"$(SBINDIR)\" -DLOCKDIR=\"$(LOCKDIR)\"
-FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DBINDIR=\"$(BINDIR)\" -DFORMSFILE=\"$(FORMSFILE)\" -DNTDRIVERSDIR=\"$(NTDRIVERSDIR)\" -DLIBDIR=\"$(LIBDIR)\"
+FLAGS3 = -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\"
+FLAGS4 = -DDRIVERFILE=\"$(DRIVERFILE)\" -DFORMSFILE=\"$(FORMSFILE)\" -DNTDRIVERSDIR=\"$(NTDRIVERSDIR)\" -DLIBDIR=\"$(LIBDIR)\"
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4) -DHAVE_INCLUDES_H
FLAGS = $(ISA) $(FLAGS5) $(PASSWD_FLAGS)
FLAGS32 = $(ISA32) $(FLAGS5) $(PASSWD_FLAGS)
+PATH_FLAGS = -DSBINDIR=\"$(SBINDIR)\" -DBINDIR=\"$(BINDIR)\" -DLOGFILEBASE=\"$(LOGFILEBASE)\"
+
WINBIND_PROGS = bin/wbinfo
WINBIND_SPROGS = bin/winbindd
WINBIND_PAM_PROGS = nsswitch/pam_winbind.so
@@ -113,14 +118,14 @@ LIB_OBJ = lib/charcnv.o lib/debug.o lib/fault.o \
lib/ms_fnmatch.o lib/select.o lib/error.o lib/messages.o \
lib/md5.o lib/hmacmd5.o lib/iconv.o lib/smbpasswd.o \
nsswitch/wb_client.o nsswitch/wb_common.o \
- intl/lang_tdb.o $(TDB_OBJ)
+ intl/lang_tdb.o $(TDB_OBJ)
READLINE_OBJ = lib/readline.o
UBIQX_OBJ = ubiqx/ubi_BinTree.o ubiqx/ubi_Cache.o ubiqx/ubi_SplayTree.o \
ubiqx/ubi_dLinkList.o ubiqx/ubi_sLinkList.o ubiqx/debugparse.o
-PARAM_OBJ = param/loadparm.o param/params.o
+PARAM_OBJ = param/loadparm.o param/params.o dynconfig.o
LIBSMB_OBJ = libsmb/clientgen.o libsmb/cliconnect.o libsmb/clifile.o \
libsmb/clikrb5.o libsmb/clispnego.o libsmb/asn1.o \
@@ -476,6 +481,24 @@ MAKEDIR = || exec false; \
-o $@
@BROKEN_CC@ -mv `echo $@ | sed 's%^.*/%%g'` $@
+# These dependencies are only approximately correct: we want to make
+# sure Samba's paths are updated if ./configure is re-run. Really it
+# would be nice if "make prefix=/opt/samba all" also rebuilt things,
+# but since we also require "make install prefix=/opt/samba" *not* to
+# rebuild it's a bit hard.
+
+dynconfig.o: dynconfig.c Makefile
+ @echo Compiling $*.c
+ @$(CC) $(FLAGS) $(PATH_FLAGS) -c $< -o $@
+
+dynconfig.po: dynconfig.c Makefile
+ @if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
+ dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi
+ @echo Compiling $*.c with @PICFLAG@
+ @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) @PICFLAG@ -c $< -o $*.@PICSUFFIX@
+@BROKEN_CC@ -mv `echo $@ | sed -e 's%^.*/%%g' -e 's%\.po$$%.o%'` $@
+@POBAD_CC@ @mv $*.po.o $@
+
.c.po:
@if (: >> $@ || : > $@) >/dev/null 2>&1; then rm -f $@; else \
dir=`echo $@ | sed 's,/[^/]*$$,,;s,^$$,.,'` $(MAKEDIR); fi