open-src/font/sun-aliases/Makefile
changeset 1288 cbb688257dda
parent 970 272328fe1b4a
child 1356 73c3eb360de2
equal deleted inserted replaced
1287:23c6db466a10 1288:cbb688257dda
     1 ###############################################################################
     1 ###############################################################################
     2 #
     2 #
     3 # Copyright (c) 2008, 2010, Oracle and/or its affiliates. All rights reserved.
     3 # Copyright (c) 2008, 2012, Oracle and/or its affiliates. All rights reserved.
     4 #
     4 #
     5 # Permission is hereby granted, free of charge, to any person obtaining a
     5 # Permission is hereby granted, free of charge, to any person obtaining a
     6 # copy of this software and associated documentation files (the "Software"),
     6 # copy of this software and associated documentation files (the "Software"),
     7 # to deal in the Software without restriction, including without limitation
     7 # to deal in the Software without restriction, including without limitation
     8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
     8 # the rights to use, copy, modify, merge, publish, distribute, sublicense,
    66 ALIAS_DIRS = $(ALIAS_DIRS_$(BUILD_TYPE))
    66 ALIAS_DIRS = $(ALIAS_DIRS_$(BUILD_TYPE))
    67 ALIAS_FILES = $(ALIAS_DIRS:%=$(INSTDIR)/%/fonts.alias)
    67 ALIAS_FILES = $(ALIAS_DIRS:%=$(INSTDIR)/%/fonts.alias)
    68 
    68 
    69 install_aliases: $(ALIAS_FILES)
    69 install_aliases: $(ALIAS_FILES)
    70 
    70 
    71 $(INSTDIR)/%-ISO8859-1/fonts.alias.all: $(INSTDIR)/%/fonts.alias.all
    71 $(ALIAS_DIRS:%=$(INSTDIR)/%):
       
    72 	mkdir -p $@
       
    73 
       
    74 $(INSTDIR)/%-ISO8859-1/fonts.alias.all: $(INSTDIR)/%/fonts.alias.all $(INSTDIR)/%-ISO8859-1
    72 	-rm -f $@
    75 	-rm -f $@
    73 	mkdir -p $(@D)
       
    74 	cp -pf $< $@
    76 	cp -pf $< $@
    75 
    77 
    76 $(INSTDIR)/%/fonts.alias.all: fonts.alias.%
    78 $(INSTDIR)/%/fonts.alias.all: fonts.alias.% $(INSTDIR)/%
    77 	-rm -f $@
    79 	-rm -f $@
    78 	mkdir -p $(@:fonts.alias.all=)
       
    79 	@if [[ -f $(@:.all=) ]] ; then \
    80 	@if [[ -f $(@:.all=) ]] ; then \
    80 		$(START_CMD_ECHO) ; \
    81 		$(START_CMD_ECHO) ; \
    81 		cat $(@:.all=) > $@ ; \
    82 		cat $(@:.all=) > $@ ; \
    82 	fi
    83 	fi
    83 	cat $< >> $@
    84 	cat $< >> $@
    84 
    85 
    85 $(INSTDIR)/%/fonts.alias: $(INSTDIR)/%/fonts.alias.all $(INSTDIR)/%/fonts.dir
    86 $(INSTDIR)/%/fonts.alias: $(INSTDIR)/%/fonts.alias.all $(INSTDIR)/%/fonts.dir
    86 	(cd $(@:fonts.alias=) ; \
    87 	(cd $(@D) ; \
    87 	 LD_LIBRARY_PATH="$(FONT_LIBS_PATH)" $(INSTALLALIAS) fonts.alias.all .)
    88 	 LD_LIBRARY_PATH="$(FONT_LIBS_PATH)" $(INSTALLALIAS) fonts.alias.all .)
    88 
    89 
    89 # Needed when installing to alternate protodir, such as when
    90 $(INSTDIR)/%/fonts.dir: $(INSTDIR)/%
    90 # generating pkg manifests
    91 	$(MKFONTDIR) $(@D)
    91 $(INSTDIR)/%/fonts.dir:
       
    92 	print '0' > [email protected]
       
    93 	ln [email protected] $@ ; rm [email protected]
       
    94 
    92 
    95 manifest_%: 
    93 manifest_%: 
    96 	$(MAKE) $(MAKEFLAGS) manifest-per-type \
    94 	$(MAKE) $(MAKEFLAGS) manifest-per-type \
    97 		BUILD_TYPES="$(@:manifest_%=%)" \
    95 		BUILD_TYPES="$(@:manifest_%=%)" \
    98 		ALIAS_DIRS='$(@:manifest_%=$$(ALIAS_DIRS_%))' \
    96 		ALIAS_DIRS='$(@:manifest_%=$$(ALIAS_DIRS_%))' \