Print this page
11626 introduce /etc/versions/build
11627 clean up UUID code for ::status

@@ -20,10 +20,12 @@
 #
 #
 # Copyright 2010 Sun Microsystems, Inc.  All rights reserved.
 # Use is subject to license terms.
 #
+# Copyright 2019 Joyent, Inc.
+#
 
 PROG= profile .login ksh.kshrc system
 PROGSKEL= .profile .kshrc
 PROGROOT= .profile .bashrc
 

@@ -30,10 +32,12 @@
 include ../Makefile.cmd
 
 ROOTROOT= $(ROOT)/root
 ROOTETCSKEL= $(ROOTETC)/skel
 ROOTETCSKELPROG= $(PROGSKEL:%=$(ROOTETCSKEL)/%)
+ROOTETCVERSIONS= $(ROOTETC)/versions
+ROOTETCVERSIONSPROG= $(ROOTETCVERSIONS)/build
 ROOTROOTPROG= $(PROGROOT:%=$(ROOTROOT)/%)
 FILEMODE= 0644
 
 CLOBBERFILES = profile .bashrc .profile .login .kshrc
 

@@ -64,16 +68,25 @@
 $(ROOTROOT)/% \
 $(ROOTETCSKEL)/%: %
         $(INS.file)
 
 $(ROOTROOT) \
+$(ROOTETCVERSIONS) \
 $(ROOTETCSKEL):
         $(INS.dir)
 
-install: all $(ROOTETCSKEL) $(ROOTETCPROG) $(ROOTETCSKELPROG) $(ROOTROOTPROG)
+$(ROOTETCVERSIONSPROG): $(ROOTETCVERSIONS) FRC
+        if [[ -n "$$BUILDVERSION_EXEC" ]]; then \
+                $$BUILDVERSION_EXEC >$(ROOTETCVERSIONSPROG) ; \
+        else \
+                touch $(ROOTETCVERSIONSPROG) ; \
+        fi
 
+install: all $(ROOTETCSKEL) $(ROOTETCPROG) \
+    $(ROOTETCSKELPROG) $(ROOTROOTPROG) $(ROOTETCVERSIONSPROG)
+
 clean:
 
 clobber:
         $(RM) $(CLOBBERFILES)
 
-lint:
+FRC: