summaryrefslogtreecommitdiff
path: root/source3/Makefile.in
diff options
context:
space:
mode:
authorAlexandre Oliva <oliva@samba.org>1998-09-24 08:34:21 +0000
committerAlexandre Oliva <oliva@samba.org>1998-09-24 08:34:21 +0000
commit6de1659640fa5d2a3b27bec69cd13d87b905d5c4 (patch)
treed8f5e7d6b3657f8904bfb4bd544e8ebc1e6f2d53 /source3/Makefile.in
parente5948ffd7f276b4c3ee6916d1dc6c5d8b28ad557 (diff)
downloadsamba-6de1659640fa5d2a3b27bec69cd13d87b905d5c4.tar.gz
samba-6de1659640fa5d2a3b27bec69cd13d87b905d5c4.tar.bz2
samba-6de1659640fa5d2a3b27bec69cd13d87b905d5c4.zip
check whether system type is the same as stored in the cache (full
stand-alone macro, candidate for inclusion in the next release of autoconf) create configure flag --enable-maintainer-mode, that enables automatic rebuilding of configure from configure.in and aclocal.m4, and of config.h.in based on acconfig.h. This assumes autoconf and autoheader are available. Maintainer mode also introduces automatic dependency tracking of include files, but it depends on features provided by gcc and GNU make, so you must not enable maintainer mode if you are not using any of these (This used to be commit 64cba1cc8e689bcde2dc124c511da086c33fa4a8)
Diffstat (limited to 'source3/Makefile.in')
-rw-r--r--source3/Makefile.in38
1 files changed, 32 insertions, 6 deletions
diff --git a/source3/Makefile.in b/source3/Makefile.in
index 55c52df51d..16f94789d3 100644
--- a/source3/Makefile.in
+++ b/source3/Makefile.in
@@ -201,9 +201,12 @@ CHECK:
@echo "Using FLAGS = $(FLAGS)"
@echo "Using LIBS = $(LIBS)"
-.c.o: $(INCLUDES)
+.c.o: @MAINT@ .deps/.dummy
@echo Compiling $*.c
- @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< -o $@
+ @$(CC) -I. -I$(srcdir) $(FLAGS) -c $< -o $@ \
+ @MAINT@ -Wp,-MD,.deps/`echo $* | sed s,/,_,g`.P && : >.deps/.stamp
+# the line above is for atomatic dependency tracking
+# it will only work with GNU make, gcc and --enable-maintainer-mode
bin/smbd: $(SMBD_OBJ)
@echo Linking $@
@@ -301,7 +304,7 @@ uninstallcp:
@$(SHELL) $(srcdir)/script/uninstallcp.sh $(CODEPAGEDIR) $(CODEPAGELIST)
clean:
- -rm -f core */*~ *~ */*.o
+ -rm -f core */*~ *~ */*.o
proto:
@echo rebuilding include/proto.h
@@ -319,6 +322,7 @@ realclean: clean
distclean: realclean
-rm -f include/config.h include/stamp-h */dummy Makefile
-rm -f config.status config.cache
+ -rm -rf .deps
# this target is really just for my use. It only works on a limited
# range of machines and is used to produce a list of potentially
@@ -328,6 +332,14 @@ finddead:
nm */*.o |grep 'T ' | awk '{print $$3}' | sort -u > nmfns.txt
comm -13 nmused.txt nmfns.txt
+# Rules for maintainers (--enable-maintainer-mode)
+AUTOCONF=@AUTOCONF@
+AUTOHEADER=@AUTOHEADER@
+
+# when configure.in is updated, reconfigure
+$(srcdir)/configure: @MAINT@ $(srcdir)/configure.in $(srcdir)/aclocal.m4
+ cd $(srcdir) && $(AUTOCONF)
+
config.status: $(srcdir)/configure
$(SHELL) ./config.status --recheck
@@ -341,10 +353,24 @@ include/config.h: include/stamp-h
include/stamp-h: $(srcdir)/include/config.h.in config.status
CONFIG_FILES= CONFIG_HEADERS=include/config.h $(SHELL) ./config.status
- @ls -l config.status $(srcdir)/include/config.h.in > include/stamp-h
+ @echo > include/stamp-h
$(srcdir)/include/config.h.in: $(srcdir)/include/stamp-h.in
@:
-$(srcdir)/include/stamp-h.in: $(srcdir)/acconfig.h $(srcdir)/configure.in
- @cd $(srcdir) && ls -l acconfig.h configure.in > include/stamp-h.in
+$(srcdir)/include/stamp-h.in: @MAINT@ $(srcdir)/acconfig.h $(srcdir)/configure.in
+ cd $(srcdir) && $(AUTOHEADER)
+ @cd $(srcdir) && echo > include/stamp-h.in
+
+# automatic dependency tracking rules
+.deps/.dummy:
+ @-if test ! -d .deps; then rm -rf .deps; mkdir .deps; fi
+ @: >$@
+
+.deps/.stamp: .deps/.dummy
+ @:
+
+.deps/.P: .deps/.stamp
+ @-cat .deps/*.P >$@ 2>/dev/null
+
+@MAINT@-include .deps/.P