Commits

Anonymous committed 4c7ad6b

coc03: merge changes from ext004, and introduce XHPDEST

Comments (0)

Files changed (4)

l10ntools/scripts/tool/xtxex.py

     def merge_file(self, inputfilename, outputfilename, parsed_file_ref, lang, is_forced_lang, sdfdata): 
         # Special handling for en-US files
         if lang == "en-US":             
-            mod_outputfilename = outputfilename.replace("_en-US",'')
+            mod_outputfilename = outputfilename
+            # mod here if needed
             self.copy_file(inputfilename, mod_outputfilename)
             return      
         # merge usual lang

solenv/bin/transform_description.pl

 
     # check which languages to use
     my $languages = $ENV{WITH_LANG};
-    if ( ! defined $languages )
+    if ( ( ! defined $languages ) || ( "$languages" eq "" ) )
     {
-        print STDERR "$0: WITH_LANG not set, defaulting to 'en-US'\n";
+        print STDERR "$0: WITH_LANG not set or empty, defaulting to 'en-US'\n";
         $languages = "en-US";
     }
     @languages = split ( ' ', $languages );

solenv/inc/tg_help.mk

 
 $(COMMONMISC)$/$(TARGET).done : $(HLANGXHPFILES)
 .IF "$(WITH_LANG)"!=""
-	$(AUGMENT_LIBRARY_PATH) $(HELPEX) -QQ -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(XHPDEST) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
+	$(AUGMENT_LIBRARY_PATH) $(HELPEX) -p $(PRJNAME) -r $(PRJ) -i @$(mktmp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES))))) -x $(XHPDEST) -y $(SHELL_PACKAGE) -l all -lf $(aux_alllangiso:t",") -m $(LOCALIZESDF) && $(TOUCH) $@
 .ELSE			# "$(WITH_LANG)"!=""
 	cp $(uniq $(foreach,i,$? $(!eq,$(i:f),$(i:f:s/.xhp//) $(i:f) $(XHPFILES)))) $(XHPDEST)$/en-US$/$(SHELL_PACKAGE) && $(TOUCH) $@
 .ENDIF			# "$(WITH_LANG)"!=""

solenv/inc/tg_xmerge.mk

 
 .IF "$(XTXFILES)"!=""
 
-ALLTAR : $(MISC)/$(TARGET).xtx.pmerge.mk $(XTXFILES)
+L10NEXT*=.txt
+XTX_TARGET_PATH*=$(MISC)/$(TARGET)
 
-.IF "$(L10NEXT)"==""
-L10NEXT:=.txt
-.ENDIF
+ALLTAR : $(XTX_TARGET_PATH).xtx.pmerge.mk $(XTXFILES)
 
-$(MISC)/$(TARGET).xtx.pmerge.mk :  $(XTXFILES)
+$(XTX_TARGET_PATH).xtx.pmerge.mk :  $(XTXFILES)
 
 $(XTXFILES) : $(LOCALIZESDF)
 
-.INCLUDE .IGNORE : $(MISC)/$(TARGET).xtx.pmerge.mk
+.INCLUDE .IGNORE : $(XTX_TARGET_PATH).xtx.pmerge.mk
 
 .IF "$(alllangiso)"!="$(last_merge)"
 XTXMERGEPHONY:=.PHONY
 .ENDIF          # "$(alllangiso)" != "$(last_merge)"
 
-$(MISC)/$(TARGET)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx
+$(XTX_TARGET_PATH)/%$(L10NEXT) $(XTXMERGEPHONY) : %.xtx
 	@@-$(MKDIRHIER) $(@:d)
 .IF "$(WITH_LANG)"==""
-    $(COMMAND_ECHO)$(COPY) $< $@
+    $(COMMAND_ECHO)$(COPY) $< $(@:d)$(@:b)_en-US$(L10NEXT)
 .ELSE          # "$(WITH_LANG)"==""
     @@-$(RM) $@
     $(COMMAND_ECHO)@noop $(assign XTXMERGELIST+:=$(<:f))
     $(COMMAND_ECHO)@noop $(assign XTXDESTDIR:=$(@:d))
 .ENDIF          # "$(WITH_LANG)"==""
 
-$(MISC)/$(TARGET).xtx.pmerge.mk : $(XTXMERGELIST)
+$(XTX_TARGET_PATH).xtx.pmerge.mk : $(XTXMERGELIST)
 .IF "$(WITH_LANG)"!=""
 # xtxex command file requirements:
 # - one file per line