summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorJames Peach <jpeach@samba.org>2007-05-15 05:25:10 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:22:05 -0500
commitc0d467462fe332284416a3a7d4cc7535147a2eba (patch)
treeab391713001f07120a8ca953b63f0f206481fe51 /source3
parent9e2d1e8fe68ded4e60b78bd35d2f3911e3255298 (diff)
downloadsamba-c0d467462fe332284416a3a7d4cc7535147a2eba.tar.gz
samba-c0d467462fe332284416a3a7d4cc7535147a2eba.tar.bz2
samba-c0d467462fe332284416a3a7d4cc7535147a2eba.zip
r22879: Tidy the build rules for targets that need the installation paths.
(This used to be commit c16ad8d58c05ed5c93dcb64880aec85ad4989263)
Diffstat (limited to 'source3')
-rw-r--r--source3/Makefile.in47
1 files changed, 32 insertions, 15 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 1efcd15c94..fb5ced6d1d 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -139,15 +139,19 @@ FLAGS4 =
FLAGS5 = $(FLAGS1) $(FLAGS2) $(FLAGS3) $(FLAGS4)
FLAGS = $(ISA) $(FLAGS5) -I$(srcdir)/lib -D_SAMBA_BUILD_=3
-PASSWD_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" -DPRIVATE_DIR=\"$(PRIVATE_DIR)\"
-PATH_FLAGS1 = -DCONFIGFILE=\"$(CONFIGFILE)\" -DSBINDIR=\"$(SBINDIR)\"
-PATH_FLAGS2 = $(PATH_FLAGS1) -DBINDIR=\"$(BINDIR)\"
-PATH_FLAGS3 = $(PATH_FLAGS2) -DLMHOSTSFILE=\"$(LMHOSTSFILE)\"
-PATH_FLAGS4 = $(PATH_FLAGS3) -DSWATDIR=\"$(SWATDIR)\" -DLOCKDIR=\"$(LOCKDIR)\" -DPIDDIR=\"$(PIDDIR)\"
-PATH_FLAGS5 = $(PATH_FLAGS4) -DLIBDIR=\"$(LIBDIR)\" \
- -DLOGFILEBASE=\"$(LOGFILEBASE)\" -DSHLIBEXT=\"@SHLIBEXT@\"
-PATH_FLAGS6 = $(PATH_FLAGS5) -DCONFIGDIR=\"$(CONFIGDIR)\"
-PATH_FLAGS = $(PATH_FLAGS6) $(PASSWD_FLAGS)
+PATH_FLAGS = -DSMB_PASSWD_FILE=\"$(SMB_PASSWD_FILE)\" \
+ -DPRIVATE_DIR=\"$(PRIVATE_DIR)\" \
+ -DCONFIGFILE=\"$(CONFIGFILE)\" \
+ -DSBINDIR=\"$(SBINDIR)\" \
+ -DBINDIR=\"$(BINDIR)\" \
+ -DLMHOSTSFILE=\"$(LMHOSTSFILE)\" \
+ -DSWATDIR=\"$(SWATDIR)\" \
+ -DLOCKDIR=\"$(LOCKDIR)\" \
+ -DPIDDIR=\"$(PIDDIR)\" \
+ -DLIBDIR=\"$(LIBDIR)\" \
+ -DLOGFILEBASE=\"$(LOGFILEBASE)\" \
+ -DSHLIBEXT=\"@SHLIBEXT@\" \
+ -DCONFIGDIR=\"$(CONFIGDIR)\"
# Note that all executable programs now provide for an optional executable suffix.
@@ -1012,8 +1016,12 @@ MAKEDIR = || exec false; \
mkdir "$$dir" || \
exec false; fi || exec false
+# Run a static checker.
CHECK_CC = $(CC_CHECKER) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
+# Compile a source file.
COMPILE_CC = $(CC) -I. -I$(srcdir) $(FLAGS) $(PICFLAG) -c $< -o $@
+# Compile a source file with the installation paths defined.
+COMPILE_CC_PATH = $(CC) -I. -I$(srcdir) $(PATH_FLAGS) $(FLAGS) $(PICFLAG) -c $< -o $@
COMPILE = $(COMPILE_CC)
@@ -1069,22 +1077,31 @@ $(PRECOMPILED_HEADER): $(srcdir)/include/includes.h
dynconfig.o: dynconfig.c Makefile
@echo Compiling $*.c
- @$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@ && exit 0;\
+ @$(COMPILE_CC_PATH) && exit 0;\
echo "The following command failed:" 1>&2;\
- echo "$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@" 1>&2;\
- $(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/dynconfig.c -o $@ >/dev/null 2>&1
+ echo "$(COMPILE_CC_PATH)" 1>&2;\
+ $(COMPILE_CC_PATH) >/dev/null 2>&1
lib/pidfile.o: lib/pidfile.c
@echo Compiling $*.c
- @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/lib/pidfile.c -o $@
+ @$(COMPILE_CC_PATH) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC_PATH)" 1>&2;\
+ $(COMPILE_CC_PATH) >/dev/null 2>&1
lib/version.o: lib/version.c include/version.h
@echo Compiling $*.c
- @$(CC) -I. -I$(srcdir) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c $(srcdir)/lib/version.c -o $@
+ @$(COMPILE_CC_PATH) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC_PATH)" 1>&2;\
+ $(COMPILE_CC_PATH) >/dev/null 2>&1
smbd/build_options.o: smbd/build_options.c Makefile include/config.h include/build_env.h include/proto.h
@echo Compiling $*.c
- @$(CC) $(FLAGS) $(PATH_FLAGS) $(PICFLAG) -c smbd/build_options.c -o $@
+ @$(COMPILE_CC_PATH) && exit 0;\
+ echo "The following command failed:" 1>&2;\
+ echo "$(COMPILE_CC_PATH)" 1>&2;\
+ $(COMPILE_CC_PATH) >/dev/null 2>&1
smbd/build_options.c: include/config.h.in script/mkbuildoptions.awk
@echo Generating $@