--- a/make-rules/ips.mk Sat Mar 19 10:21:10 2016 -0700
+++ b/make-rules/ips.mk Tue Mar 08 07:26:50 2016 -0800
@@ -48,6 +48,9 @@
endif
PKGMANGLE = $(WS_TOOLS)/userland-mangler
+GENERATE_HISTORY= $(WS_TOOLS)/generate-history
+HISTORY= history
+
WS_TRANSFORMS = $(WS_TOP)/transforms
# Package headers should all pretty much follow the same format
@@ -132,6 +135,9 @@
MANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH)
CANONICAL_MANIFESTS = $(wildcard *.p5m)
+ifneq ($(wildcard $(HISTORY)),)
+HISTORICAL_MANIFESTS = $(shell $(NAWK) -v FUNCTION=name -f $(GENERATE_HISTORY) < $(HISTORY))
+endif
# Look for manifests which need to be duplicated for each version of python.
ifeq ($(findstring -PYVER,$(CANONICAL_MANIFESTS)),-PYVER)
@@ -174,7 +180,7 @@
$(PYV_MANIFESTS) $(PYNV_MANIFESTS) \
$(PERLV_MANIFESTS) $(PERLNV_MANIFESTS) \
$(RUBYV_MANIFESTS) $(RUBYNV_MANIFESTS) \
- $(NORUBY_MANIFESTS)
+ $(NORUBY_MANIFESTS) $(HISTORICAL_MANIFESTS)
GENERATED = $(MANIFEST_BASE)-generated
COMBINED = $(MANIFEST_BASE)-combined
@@ -322,6 +328,14 @@
$(WS_TOP)/transforms/mkgeneric $< > $@
if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
+# Rule to generate historical manifests from the $(HISTORY) file.
+define history-manifest-rule
+$(MANIFEST_BASE)-$(1): $(HISTORY) $(BUILD_DIR)
+ $(NAWK) -v TARGET=$(1) -v FUNCTION=manifest -f $(GENERATE_HISTORY) < \
+ $(HISTORY) > $$@
+endef
+$(foreach mfst,$(HISTORICAL_MANIFESTS),$(eval $(call history-manifest-rule,$(mfst))))
+
# mogrify non-parameterized manifests
$(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR)
$(PKGMOGRIFY) $(PKG_OPTIONS) $< \
@@ -438,7 +452,8 @@
$(RESOLVED): install
-canonical-manifests: $(CANONICAL_MANIFESTS) $(MAKEFILE_PREREQ) $(PATCHES)
+canonical-manifests: $(CANONICAL_MANIFESTS) $(MAKEFILE_PREREQ) $(PATCHES) \
+ $(HISTORY)
ifeq ($(strip $(CANONICAL_MANIFESTS)),)
# If there were no canonical manifests in the workspace, nothing will
# be published and we should fail. A sample manifest can be generated