office-gobmx/readlicense_oo/makefile.mk

56 lines
1.7 KiB
Makefile
Raw Normal View History

PRJ=.
PRJNAME=readlicense_oo
TARGET=source
# ------------------------------------------------------------------
.INCLUDE: settings.mk
# ------------------------------------------------------------------
.IF "$(GUI)"=="WNT"
SYSLICBASE=license.txt LICENSE.odt
SYSLICDEST=$(MISC)$/license$/wnt
.ELSE # "$(GUI)"=="WNT"
SYSLICBASE=LICENSE LICENSE.odt
SYSLICDEST=$(MISC)$/license$/unx
.ENDIF # "$(GUI)"=="WNT"
SOURCELICENCES=$(foreach,i,$(SYSLICBASE) $(SYSLICDEST)$/$(i:b)$(i:e))
fallbacklicenses=$(foreach,i,{$(subst,$(defaultlangiso), $(alllangiso))} $(foreach,j,$(SYSLICBASE) $(SYSLICDEST)$/$(j:b)_$i$(j:e)))
# ------------------------------------------------------------------
.INCLUDE: target.mk
# ------------------------------------------------------------------
ALLTAR: $(SOURCELICENCES) $(fallbacklicenses) just_for_nice_optics
.IF "$(fallbacklicenses)"!=""
$(fallbacklicenses) : $(SOURCELICENCES)
@$(ECHON) .
@$(COPY) $(@:d)$(@:b:s/_/./:b)_$(defaultlangiso)$(@:e) $@
.ENDIF # "$(fallbacklicenses)"!=""
just_for_nice_optics: $(fallbacklicenses)
@$(ECHONL)
# for windows, convert linends to DOS
$(SYSLICDEST)$/license.% : txt$/license.%
2009-01-21 11:51:39 -06:00
@-$(MKDIRHIER) $(SYSLICDEST)
$(PERL) -p -e 's/\r?\n$$/\r\n/' < $< > $@
# for others just copy
$(SYSLICDEST)$/LICENSE : txt$/license.txt
2009-01-21 11:51:39 -06:00
@-$(MKDIRHIER) $(SYSLICDEST)
$(COPY) $< $@
$(SYSLICDEST)$/LICENSE.odt : odt$/LICENSE.odt
2009-01-21 11:51:39 -06:00
@-$(MKDIRHIER) $(SYSLICDEST)
$(COPY) $< $@
# just copy into misc
$(MISC)$/LICENSE.odt: LICENSE.odt
$(COPY) LICENSE.odt $@
$(MISC)$/CREDITS.odt: CREDITS.odt
$(COPY) CREDITS.odt $@
$(MISC)$/THIRDPARTYLICENSEREADME.html: THIRDPARTYLICENSEREADME.html
$(COPY) THIRDPARTYLICENSEREADME.html $@