1# ************************************************************* 2# 3# Licensed to the Apache Software Foundation (ASF) under one 4# or more contributor license agreements. See the NOTICE file 5# distributed with this work for additional information 6# regarding copyright ownership. The ASF licenses this file 7# to you under the Apache License, Version 2.0 (the 8# "License"); you may not use this file except in compliance 9# with the License. You may obtain a copy of the License at 10# 11# http://www.apache.org/licenses/LICENSE-2.0 12# 13# Unless required by applicable law or agreed to in writing, 14# software distributed under the License is distributed on an 15# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16# KIND, either express or implied. See the License for the 17# specific language governing permissions and limitations 18# under the License. 19# 20# ************************************************************* 21PRJ=. 22PRJNAME=readlicense_oo 23TARGET=source 24 25# ------------------------------------------------------------------ 26.INCLUDE: settings.mk 27# ------------------------------------------------------------------ 28 29.IF "$(GUI)"=="WNT" 30SYSLICBASE=license.txt license.html license.rtf 31SYSLICDEST=$(MISC)$/license$/wnt 32.ELIF "$(GUI)"=="OS2" 33SYSLICBASE=license.txt license.html license.rtf 34SYSLICDEST=$(MISC)$/license$/os2 35.ELSE # "$(GUI)"=="WNT" 36SYSLICBASE=LICENSE LICENSE.html 37SYSLICDEST=$(MISC)$/license$/unx 38.ENDIF # "$(GUI)"=="WNT" 39 40SOURCELICENCES=$(foreach,i,$(SYSLICBASE) $(SYSLICDEST)$/$(i:b)_en-US$(i:e)) 41 42fallbacklicenses=$(foreach,i,{$(subst,$(defaultlangiso), $(alllangiso))} $(foreach,j,$(SYSLICBASE) $(SYSLICDEST)$/$(j:b)_$i$(j:e))) 43 44ALL_LICENSE=..$/LICENSE 45ALL_NOTICE=..$/NOTICE 46.IF "${ENABLE_CATEGORY_B}"=="YES" 47 # extend the install set's LICENSE and NOTICE files 48 # for content distributed under category-B licenses 49 ALL_LICENSE+=..$/LICENSE_category_b 50 ALL_NOTICE+=..$/NOTICE_category_b 51.ENDIF 52.IF "${BUNDLED_EXTENSION_BLOBS}"!="" 53 # extend the install set's LICENSE and NOTICE files 54 # for content distributed as mere aggregations 55 ALL_LICENSE+=..$/LICENSE_aggregated 56 ALL_NOTICE+=..$/NOTICE_aggregated 57.ENDIF 58SUM_LICENSE=$(MISC)$/SUM_LICENSE 59SUM_NOTICE=$(MISC)$/SUM_NOTICE 60 61# ------------------------------------------------------------------ 62.INCLUDE: target.mk 63# ------------------------------------------------------------------ 64 65ALLTAR: ${SUM_LICENSE} ${SUM_NOTICE} $(SOURCELICENCES) $(fallbacklicenses) just_for_nice_optics 66 67${SUM_LICENSE} : ${ALL_LICENSE} 68 cat $< > $@ 69 70${SUM_NOTICE} : ${ALL_NOTICE} 71 cat $< > $@ 72 73.IF "$(fallbacklicenses)"!="" 74$(fallbacklicenses) : $(SOURCELICENCES) 75 @$(ECHON) . 76 @$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@ 77.ENDIF # "$(fallbacklicenses)"!="" 78 79just_for_nice_optics: $(fallbacklicenses) 80 @$(ECHONL) 81 82# for windows, convert line ends to CR/LF 83$(SYSLICDEST)$/license_en-US.% : source$/license$/license_en-US.% 84 @-$(MKDIRHIER) $(SYSLICDEST) 85 $(PERL) -p -e 's/\r?\n$$/\r\n/' < $< > $@ 86 87# for others just copy 88$(SYSLICDEST)$/LICENSE_en-US : source$/license$/license_en-US.txt 89 @-$(MKDIRHIER) $(SYSLICDEST) 90 $(COPY) $< $@ 91 92$(SYSLICDEST)$/LICENSE_en-US.html : source$/license$/license_en-US.html 93 @-$(MKDIRHIER) $(SYSLICDEST) 94 $(COPY) $< $@ 95