1PRJ=. 2PRJNAME=readlicense_oo 3TARGET=source 4 5# ------------------------------------------------------------------ 6.INCLUDE: settings.mk 7# ------------------------------------------------------------------ 8 9.IF "$(GUI)"=="WNT" 10SYSLICBASE=license.txt license.html license.rtf 11SYSLICDEST=$(MISC)$/license$/wnt 12.ELSE # "$(GUI)"=="WNT" 13SYSLICBASE=LICENSE LICENSE.html 14SYSLICDEST=$(MISC)$/license$/unx 15.ENDIF # "$(GUI)"=="WNT" 16 17SOURCELICENCES=$(foreach,i,$(SYSLICBASE) $(SYSLICDEST)$/$(i:b)_en-US$(i:e)) 18 19fallbacklicenses=$(foreach,i,{$(subst,$(defaultlangiso), $(alllangiso))} $(foreach,j,$(SYSLICBASE) $(SYSLICDEST)$/$(j:b)_$i$(j:e))) 20 21# ------------------------------------------------------------------ 22.INCLUDE: target.mk 23# ------------------------------------------------------------------ 24 25ALLTAR: $(SOURCELICENCES) $(fallbacklicenses) just_for_nice_optics 26 27.IF "$(fallbacklicenses)"!="" 28$(fallbacklicenses) : $(SOURCELICENCES) 29 @$(ECHON) . 30 @$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@ 31.ENDIF # "$(fallbacklicenses)"!="" 32 33just_for_nice_optics: $(fallbacklicenses) 34 @$(ECHONL) 35 36# for windows, convert linends to DOS 37$(SYSLICDEST)$/license_en-US.% : source$/license$/license_en-US.% 38 @-$(MKDIRHIER) $(SYSLICDEST) 39 $(PERL) -p -e 's/\r?\n$$/\r\n/' < $< > $@ 40 41# for others just copy 42$(SYSLICDEST)$/LICENSE_en-US : source$/license$/license_en-US.txt 43 @-$(MKDIRHIER) $(SYSLICDEST) 44 $(COPY) $< $@ 45 46$(SYSLICDEST)$/LICENSE_en-US.html : source$/license$/license_en-US.html 47 @-$(MKDIRHIER) $(SYSLICDEST) 48 $(COPY) $< $@ 49