make-rules/ips.mk
changeset 2208 393dee918e3c
parent 2142 813e4817e573
child 3739 1ad120fc17bb
equal deleted inserted replaced
2207:64e8c961a4a2 2208:393dee918e3c
   226 	$(foreach ver,$(shell echo $(PYTHON_VERSIONS) | tr -d .), \
   226 	$(foreach ver,$(shell echo $(PYTHON_VERSIONS) | tr -d .), \
   227 		$(call mkgeneric,runtime/python,$(ver)))
   227 		$(call mkgeneric,runtime/python,$(ver)))
   228 
   228 
   229 # Build Python version-wrapping manifests from the generic version.
   229 # Build Python version-wrapping manifests from the generic version.
   230 # Creates build/manifest-*-modulename.p5m file.
   230 # Creates build/manifest-*-modulename.p5m file.
       
   231 # Note that the mkgeneric transform uses the literal string "###PYV###"
       
   232 # as the place-holder for the Python version (for mkgeneric-python) and
       
   233 # the Perl version (for mkgeneric-perl below) and the Ruby version (for
       
   234 # mkgeneric-ruby further below).  The authors did not anticipate that this
       
   235 # mechanism would be extended beyond Python when they wrote it; something
       
   236 # more generic like LANGVER might make more sense, but for now we are
       
   237 # sticking with something known to work.
   231 $(MANIFEST_BASE)-%.p5m: %-PYVER.p5m $(BUILD_DIR)/mkgeneric-python
   238 $(MANIFEST_BASE)-%.p5m: %-PYVER.p5m $(BUILD_DIR)/mkgeneric-python
   232 	$(PKGMOGRIFY) -D PYV=###PYV### $(BUILD_DIR)/mkgeneric-python \
   239 	$(PKGMOGRIFY) -D PYV=###PYV### $(BUILD_DIR)/mkgeneric-python \
   233 		$(WS_TOP)/transforms/mkgeneric $< > $@
   240 		$(WS_TOP)/transforms/mkgeneric $< > $@
   234 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   241 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   235 
   242 
   250 	$(RM) $@
   257 	$(RM) $@
   251 	$(foreach ver,$(shell echo $(PERL_VERSIONS) | tr -d .), \
   258 	$(foreach ver,$(shell echo $(PERL_VERSIONS) | tr -d .), \
   252 		$(call mkgeneric,runtime/perl,$(ver)))
   259 		$(call mkgeneric,runtime/perl,$(ver)))
   253 
   260 
   254 # Build Perl version-wrapping manifests from the generic version.
   261 # Build Perl version-wrapping manifests from the generic version.
       
   262 # See the block comment above about why "###PYV###" is used here even
       
   263 # though this is for Perl rather than Python.
   255 $(MANIFEST_BASE)-%.p5m: %-PERLVER.p5m $(BUILD_DIR)/mkgeneric-perl
   264 $(MANIFEST_BASE)-%.p5m: %-PERLVER.p5m $(BUILD_DIR)/mkgeneric-perl
   256 	$(PKGMOGRIFY) -D PLV=### $(BUILD_DIR)/mkgeneric-perl \
   265 	$(PKGMOGRIFY) -D PLV=###PYV### $(BUILD_DIR)/mkgeneric-perl \
   257 		$(WS_TOP)/transforms/mkgeneric $< > $@
   266 		$(WS_TOP)/transforms/mkgeneric $< > $@
   258 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   267 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   259 
   268 
   260 # Define and execute a macro that generates a rule to create a manifest for a
   269 # Define and execute a macro that generates a rule to create a manifest for a
   261 # ruby module specific to a particular version of the ruby runtime.
   270 # ruby module specific to a particular version of the ruby runtime.
   288 		    cut -d. -f1,2 | tr -d .)))
   297 		    cut -d. -f1,2 | tr -d .)))
   289 
   298 
   290 # Build Ruby version-wrapping manifests from the generic version.
   299 # Build Ruby version-wrapping manifests from the generic version.
   291 # Creates build/manifest-*-modulename.p5m file.
   300 # Creates build/manifest-*-modulename.p5m file.
   292 #
   301 #
   293 # ###PYV### is used here as the mkgeneric() call used to create 
   302 # See the block comment above about why "###PYV###" is used here even
   294 # mkgeneric-ruby uses this value version subsitute key.  We also
   303 # though this is for Ruby rather than Python.
   295 # use the same key, ###PYV###, to pick up the required entry
       
   296 # in mkgeneric when pkgmogrify is invoked
       
   297 $(MANIFEST_BASE)-%.p5m: %-RUBYVER.p5m $(BUILD_DIR)/mkgeneric-ruby
   304 $(MANIFEST_BASE)-%.p5m: %-RUBYVER.p5m $(BUILD_DIR)/mkgeneric-ruby
   298 	$(PKGMOGRIFY) -D RUBYV=###PYV### $(BUILD_DIR)/mkgeneric-ruby \
   305 	$(PKGMOGRIFY) -D RUBYV=###PYV### $(BUILD_DIR)/mkgeneric-ruby \
   299 		$(WS_TOP)/transforms/mkgeneric $< > $@
   306 		$(WS_TOP)/transforms/mkgeneric $< > $@
   300 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   307 	if [ -f $*-GENFRAG.p5m ]; then cat $*-GENFRAG.p5m >> $@; fi
   301 
   308