equal
deleted
inserted
replaced
45 PKGLINT = /usr/bin/pkglint |
45 PKGLINT = /usr/bin/pkglint |
46 else |
46 else |
47 PKGLINT = ${WS_TOOLS}/pkglint |
47 PKGLINT = ${WS_TOOLS}/pkglint |
48 endif |
48 endif |
49 PKGMANGLE = $(WS_TOOLS)/userland-mangler |
49 PKGMANGLE = $(WS_TOOLS)/userland-mangler |
|
50 |
|
51 GENERATE_HISTORY= $(WS_TOOLS)/generate-history |
|
52 HISTORY= history |
50 |
53 |
51 WS_TRANSFORMS = $(WS_TOP)/transforms |
54 WS_TRANSFORMS = $(WS_TOP)/transforms |
52 |
55 |
53 # Package headers should all pretty much follow the same format |
56 # Package headers should all pretty much follow the same format |
54 METADATA_TEMPLATE = $(WS_TOP)/transforms/manifest-metadata-template |
57 METADATA_TEMPLATE = $(WS_TOP)/transforms/manifest-metadata-template |
130 PKG_PROTO_DIRS += $(MANGLED_DIR) $(PROTO_DIR) $(@D) $(COMPONENT_DIR) $(COMPONENT_SRC) $(WS_LICENSES) |
133 PKG_PROTO_DIRS += $(MANGLED_DIR) $(PROTO_DIR) $(@D) $(COMPONENT_DIR) $(COMPONENT_SRC) $(WS_LICENSES) |
131 |
134 |
132 MANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH) |
135 MANIFEST_BASE = $(BUILD_DIR)/manifest-$(MACH) |
133 |
136 |
134 CANONICAL_MANIFESTS = $(wildcard *.p5m) |
137 CANONICAL_MANIFESTS = $(wildcard *.p5m) |
|
138 ifneq ($(wildcard $(HISTORY)),) |
|
139 HISTORICAL_MANIFESTS = $(shell $(NAWK) -v FUNCTION=name -f $(GENERATE_HISTORY) < $(HISTORY)) |
|
140 endif |
135 |
141 |
136 # Look for manifests which need to be duplicated for each version of python. |
142 # Look for manifests which need to be duplicated for each version of python. |
137 ifeq ($(findstring -PYVER,$(CANONICAL_MANIFESTS)),-PYVER) |
143 ifeq ($(findstring -PYVER,$(CANONICAL_MANIFESTS)),-PYVER) |
138 UNVERSIONED_MANIFESTS = $(filter-out %GENFRAG.p5m,$(filter-out %-PYVER.p5m,$(CANONICAL_MANIFESTS))) |
144 UNVERSIONED_MANIFESTS = $(filter-out %GENFRAG.p5m,$(filter-out %-PYVER.p5m,$(CANONICAL_MANIFESTS))) |
139 PY_MANIFESTS = $(filter %-PYVER.p5m,$(CANONICAL_MANIFESTS)) |
145 PY_MANIFESTS = $(filter %-PYVER.p5m,$(CANONICAL_MANIFESTS)) |
172 |
178 |
173 VERSIONED_MANIFESTS = \ |
179 VERSIONED_MANIFESTS = \ |
174 $(PYV_MANIFESTS) $(PYNV_MANIFESTS) \ |
180 $(PYV_MANIFESTS) $(PYNV_MANIFESTS) \ |
175 $(PERLV_MANIFESTS) $(PERLNV_MANIFESTS) \ |
181 $(PERLV_MANIFESTS) $(PERLNV_MANIFESTS) \ |
176 $(RUBYV_MANIFESTS) $(RUBYNV_MANIFESTS) \ |
182 $(RUBYV_MANIFESTS) $(RUBYNV_MANIFESTS) \ |
177 $(NORUBY_MANIFESTS) |
183 $(NORUBY_MANIFESTS) $(HISTORICAL_MANIFESTS) |
178 |
184 |
179 GENERATED = $(MANIFEST_BASE)-generated |
185 GENERATED = $(MANIFEST_BASE)-generated |
180 COMBINED = $(MANIFEST_BASE)-combined |
186 COMBINED = $(MANIFEST_BASE)-combined |
181 MANIFESTS = $(VERSIONED_MANIFESTS:%=$(MANIFEST_BASE)-%) |
187 MANIFESTS = $(VERSIONED_MANIFESTS:%=$(MANIFEST_BASE)-%) |
182 |
188 |
320 $(MANIFEST_BASE)-%.p5m: %-RUBYVER.p5m $(BUILD_DIR)/mkgeneric-ruby |
326 $(MANIFEST_BASE)-%.p5m: %-RUBYVER.p5m $(BUILD_DIR)/mkgeneric-ruby |
321 $(PKGMOGRIFY) -D RUBYV=###PYV### $(BUILD_DIR)/mkgeneric-ruby \ |
327 $(PKGMOGRIFY) -D RUBYV=###PYV### $(BUILD_DIR)/mkgeneric-ruby \ |
322 $(WS_TOP)/transforms/mkgeneric $< > $@ |
328 $(WS_TOP)/transforms/mkgeneric $< > $@ |
323 if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi |
329 if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi |
324 |
330 |
|
331 # Rule to generate historical manifests from the $(HISTORY) file. |
|
332 define history-manifest-rule |
|
333 $(MANIFEST_BASE)-$(1): $(HISTORY) $(BUILD_DIR) |
|
334 $(NAWK) -v TARGET=$(1) -v FUNCTION=manifest -f $(GENERATE_HISTORY) < \ |
|
335 $(HISTORY) > $$@ |
|
336 endef |
|
337 $(foreach mfst,$(HISTORICAL_MANIFESTS),$(eval $(call history-manifest-rule,$(mfst)))) |
|
338 |
325 # mogrify non-parameterized manifests |
339 # mogrify non-parameterized manifests |
326 $(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR) |
340 $(MANIFEST_BASE)-%.mogrified: %.p5m $(BUILD_DIR) |
327 $(PKGMOGRIFY) $(PKG_OPTIONS) $< \ |
341 $(PKGMOGRIFY) $(PKG_OPTIONS) $< \ |
328 $(PUBLISH_TRANSFORMS) | \ |
342 $(PUBLISH_TRANSFORMS) | \ |
329 sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@ |
343 sed -e '/^$$/d' -e '/^#.*$$/d' | uniq >$@ |
436 echo "unsafe to install package(s) automatically" ; \ |
450 echo "unsafe to install package(s) automatically" ; \ |
437 fi |
451 fi |
438 |
452 |
439 $(RESOLVED): install |
453 $(RESOLVED): install |
440 |
454 |
441 canonical-manifests: $(CANONICAL_MANIFESTS) $(MAKEFILE_PREREQ) $(PATCHES) |
455 canonical-manifests: $(CANONICAL_MANIFESTS) $(MAKEFILE_PREREQ) $(PATCHES) \ |
|
456 $(HISTORY) |
442 ifeq ($(strip $(CANONICAL_MANIFESTS)),) |
457 ifeq ($(strip $(CANONICAL_MANIFESTS)),) |
443 # If there were no canonical manifests in the workspace, nothing will |
458 # If there were no canonical manifests in the workspace, nothing will |
444 # be published and we should fail. A sample manifest can be generated |
459 # be published and we should fail. A sample manifest can be generated |
445 # with |
460 # with |
446 # $ gmake sample-manifest |
461 # $ gmake sample-manifest |