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