1*d71964d5SAndrew Rist# ************************************************************* 2*d71964d5SAndrew Rist# 3*d71964d5SAndrew Rist# Licensed to the Apache Software Foundation (ASF) under one 4*d71964d5SAndrew Rist# or more contributor license agreements. See the NOTICE file 5*d71964d5SAndrew Rist# distributed with this work for additional information 6*d71964d5SAndrew Rist# regarding copyright ownership. The ASF licenses this file 7*d71964d5SAndrew Rist# to you under the Apache License, Version 2.0 (the 8*d71964d5SAndrew Rist# "License"); you may not use this file except in compliance 9*d71964d5SAndrew Rist# with the License. You may obtain a copy of the License at 10*d71964d5SAndrew Rist# 11*d71964d5SAndrew Rist# http://www.apache.org/licenses/LICENSE-2.0 12*d71964d5SAndrew Rist# 13*d71964d5SAndrew Rist# Unless required by applicable law or agreed to in writing, 14*d71964d5SAndrew Rist# software distributed under the License is distributed on an 15*d71964d5SAndrew Rist# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16*d71964d5SAndrew Rist# KIND, either express or implied. See the License for the 17*d71964d5SAndrew Rist# specific language governing permissions and limitations 18*d71964d5SAndrew Rist# under the License. 19*d71964d5SAndrew Rist# 20*d71964d5SAndrew Rist# ************************************************************* 21cdf0e10cSrcweirPRJ=. 22cdf0e10cSrcweirPRJNAME=readlicense_oo 23cdf0e10cSrcweirTARGET=source 24cdf0e10cSrcweir 25cdf0e10cSrcweir# ------------------------------------------------------------------ 26cdf0e10cSrcweir.INCLUDE: settings.mk 27cdf0e10cSrcweir# ------------------------------------------------------------------ 28cdf0e10cSrcweir 29cdf0e10cSrcweir.IF "$(GUI)"=="WNT" 30cdf0e10cSrcweirSYSLICBASE=license.txt license.html license.rtf 31cdf0e10cSrcweirSYSLICDEST=$(MISC)$/license$/wnt 3227ead02aSPedro Giffuni.ELIF "$(GUI)"=="OS2" 3327ead02aSPedro GiffuniSYSLICBASE=license.txt license.html license.rtf 3427ead02aSPedro GiffuniSYSLICDEST=$(MISC)$/license$/os2 35cdf0e10cSrcweir.ELSE # "$(GUI)"=="WNT" 36cdf0e10cSrcweirSYSLICBASE=LICENSE LICENSE.html 37cdf0e10cSrcweirSYSLICDEST=$(MISC)$/license$/unx 38cdf0e10cSrcweir.ENDIF # "$(GUI)"=="WNT" 39cdf0e10cSrcweir 40cdf0e10cSrcweirSOURCELICENCES=$(foreach,i,$(SYSLICBASE) $(SYSLICDEST)$/$(i:b)_en-US$(i:e)) 41cdf0e10cSrcweir 42cdf0e10cSrcweirfallbacklicenses=$(foreach,i,{$(subst,$(defaultlangiso), $(alllangiso))} $(foreach,j,$(SYSLICBASE) $(SYSLICDEST)$/$(j:b)_$i$(j:e))) 43cdf0e10cSrcweir 44cdf0e10cSrcweir# ------------------------------------------------------------------ 45cdf0e10cSrcweir.INCLUDE: target.mk 46cdf0e10cSrcweir# ------------------------------------------------------------------ 47cdf0e10cSrcweir 48cdf0e10cSrcweirALLTAR: $(SOURCELICENCES) $(fallbacklicenses) just_for_nice_optics 49cdf0e10cSrcweir 50cdf0e10cSrcweir.IF "$(fallbacklicenses)"!="" 51cdf0e10cSrcweir$(fallbacklicenses) : $(SOURCELICENCES) 52cdf0e10cSrcweir @$(ECHON) . 53cdf0e10cSrcweir @$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@ 54cdf0e10cSrcweir.ENDIF # "$(fallbacklicenses)"!="" 55cdf0e10cSrcweir 56cdf0e10cSrcweirjust_for_nice_optics: $(fallbacklicenses) 57cdf0e10cSrcweir @$(ECHONL) 58cdf0e10cSrcweir 59cdf0e10cSrcweir# for windows, convert linends to DOS 60cdf0e10cSrcweir$(SYSLICDEST)$/license_en-US.% : source$/license$/license_en-US.% 61cdf0e10cSrcweir @-$(MKDIRHIER) $(SYSLICDEST) 62cdf0e10cSrcweir $(PERL) -p -e 's/\r?\n$$/\r\n/' < $< > $@ 63cdf0e10cSrcweir 64cdf0e10cSrcweir# for others just copy 65cdf0e10cSrcweir$(SYSLICDEST)$/LICENSE_en-US : source$/license$/license_en-US.txt 66cdf0e10cSrcweir @-$(MKDIRHIER) $(SYSLICDEST) 67cdf0e10cSrcweir $(COPY) $< $@ 68cdf0e10cSrcweir 69cdf0e10cSrcweir$(SYSLICDEST)$/LICENSE_en-US.html : source$/license$/license_en-US.html 70cdf0e10cSrcweir @-$(MKDIRHIER) $(SYSLICDEST) 71cdf0e10cSrcweir $(COPY) $< $@ 72