summaryrefslogtreecommitdiffstats
path: root/source/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
commit64cba1cc8e689bcde2dc124c511da086c33fa4a8 (patch)
tree857398a0a8b5189e2a07cb3d3169b682f4f022cd /source/Makefile.in
parentf123172c42b1f9ac73e57856e4ee8715fdfb76cd (diff)
downloadsamba-64cba1cc8e689bcde2dc124c511da086c33fa4a8.tar.gz
samba-64cba1cc8e689bcde2dc124c511da086c33fa4a8.tar.xz
samba-64cba1cc8e689bcde2dc124c511da086c33fa4a8.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
Diffstat (limited to 'source/Makefile.in')
-rw-r--r--source/Makefile.in38
1 files changed, 32 insertions, 6 deletions
diff --git a/source/Makefile.in b/source/Makefile.in
index 55c52df51dd..16f94789d3f 100644
--- a/source/Makefile.in
+++ b/source/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