Update ooo320-m1
[ooovba.git] / readlicense_oo / makefile.mk
blobbb6eff9cbde7592677cc50ff789e9b2f90d59e1b
1 PRJ=.
2 PRJNAME=readlicense_oo
3 TARGET=source
5 # ------------------------------------------------------------------
6 .INCLUDE: settings.mk
7 # ------------------------------------------------------------------
9 .IF "$(GUI)"=="WNT"
10 SYSLICBASE=license.txt license.html license.rtf
11 SYSLICDEST=$(MISC)$/license$/wnt
12 .ELSE # "$(GUI)"=="WNT"
13 SYSLICBASE=LICENSE LICENSE.html
14 SYSLICDEST=$(MISC)$/license$/unx
15 .ENDIF # "$(GUI)"=="WNT"
17 SOURCELICENCES=$(foreach,i,$(SYSLICBASE) $(SYSLICDEST)$/$(i:b)_en-US$(i:e))
19 fallbacklicenses=$(foreach,i,{$(subst,$(defaultlangiso), $(alllangiso))} $(foreach,j,$(SYSLICBASE) $(SYSLICDEST)$/$(j:b)_$i$(j:e)))
21 # ------------------------------------------------------------------
22 .INCLUDE: target.mk
23 # ------------------------------------------------------------------
25 ALLTAR: $(SOURCELICENCES) $(fallbacklicenses) just_for_nice_optics
27 .IF "$(fallbacklicenses)"!=""
28 $(fallbacklicenses) : $(SOURCELICENCES)
29 @$(ECHON) .
30 @$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@
31 .ENDIF # "$(fallbacklicenses)"!=""
33 just_for_nice_optics: $(fallbacklicenses)
34 @$(ECHONL)
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/' < $< > $@
41 # for others just copy
42 $(SYSLICDEST)$/LICENSE_en-US : source$/license$/license_en-US.txt
43 @-$(MKDIRHIER) $(SYSLICDEST)
44 $(COPY) $< $@
46 $(SYSLICDEST)$/LICENSE_en-US.html : source$/license$/license_en-US.html
47 @-$(MKDIRHIER) $(SYSLICDEST)
48 $(COPY) $< $@