From b21c23e78935452774f066cbb0c9a3f24204c951 Mon Sep 17 00:00:00 2001 From: "donm%netscape.com" Date: Thu, 16 Jul 1998 23:57:55 +0000 Subject: [PATCH] update build_number automatically. approved by: briano --- config/Makefile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/config/Makefile b/config/Makefile index 609dcc976a4..dc3ee42fd40 100644 --- a/config/Makefile +++ b/config/Makefile @@ -31,6 +31,9 @@ PLSRCS = nfspwd.pl revdepth.pl TARGETS = $(PROGRAM) $(PLSRCS:.pl=) +# Generate the build number on the fly. +TARGETS += $(DEPTH)/build/build_number + ifneq ($(subst /,_,$(shell uname -s)),WINNT) PROGRAM = nsinstall$(BIN_SUFFIX) TARGETS += $(OBJDIR)/bsdecho$(BIN_SUFFIX) @@ -119,6 +122,18 @@ $(OBJDIR)/gtscc$(BIN_SUFFIX): $(OBJDIR)/gtscc.o $(CCF) $(LDFLAGS) -o $@ $< -lelf $(INSTALL) -m 444 $@ $(DIST)/bin +#update build number from within make script +$(DEPTH)/build/build_number: $(OBJDIR)/bdate$(BIN_SUFFIX) FORCE + $(RM) $@ + $(OBJDIR)/bdate$(BIN_SUFFIX) > $@ + +$(OBJDIR)/bdate$(BIN_SUFFIX): $(OBJDIR)/bdate.o + @$(MAKE_OBJDIR) + $(CCF) $(LDFLAGS) -o $@ $< + $(INSTALL) -m 444 $@ $(DIST)/bin + +FORCE: + ifdef MKDEPEND_DIR clean clobber realclean clobber_all:: cd $(MKDEPEND_DIR); $(MAKE) $@