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