[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
user:zeman:mdmake [2010/11/05 15:47]
zeman
user:zeman:mdmake [2010/11/05 16:22]
zeman Files for download.
Line 30: Line 30:
     * ''.md.fxd'' combines ''.md.fix'' and ''.md.del''. Contains values, not dimensions (like ''.md.fix'' and unlike ''.md.del'')     * ''.md.fxd'' combines ''.md.fix'' and ''.md.del''. Contains values, not dimensions (like ''.md.fix'' and unlike ''.md.del'')
     * If a command in a rule refers a dimension (e.g. ''$(*LANGUAGES)'') the reference will be converted to the actual value of the dimension. If different source files have different values of the same dimension within one generated rule the reference will be replaced by the value that the target file takes in this dimension (i.e. by the variable value). Anyway the purpose of such references is to refer to the variable dimensions. Modified values of particular source files are fixed exceptions, we know them in advance and can write them to the command directly, if necessary.     * If a command in a rule refers a dimension (e.g. ''$(*LANGUAGES)'') the reference will be converted to the actual value of the dimension. If different source files have different values of the same dimension within one generated rule the reference will be replaced by the value that the target file takes in this dimension (i.e. by the variable value). Anyway the purpose of such references is to refer to the variable dimensions. Modified values of particular source files are fixed exceptions, we know them in advance and can write them to the command directly, if necessary.
- 
  
 <code>.MDRULE <code>.MDRULE
Line 40: Line 39:
         $(TOOLDIR)/runmst.pl -m $(*2) < $< > $@</code>         $(TOOLDIR)/runmst.pl -m $(*2) < $< > $@</code>
  
-  * Je možné definovat vstupní souboryTy typicky leží úplně v&nbsp;jiné cestě, nebo se alespoň jmenují tak, aby se nepletly se soubory pojmenovanými pomocí hodnot rozměrů, nehrozilo tudíž jejich smazání makemMůžeme popsat jejich vlastnosti v&nbsp;jednotlivých rozměrech prostě tak, že vytvoříme obyčejné pravidlo, kde dotyčný vstupní soubor bude jako závislost, zatímco cíl bude soubor pojmenovaný příslušnými hodnotami rozměrůPřed pravidlo připíšeme ''.md.in:''. MD-make pak doplní příkaz pro zkopírování závislosti do cíle (''cp $< $@'') a navíc zkontroluje, že cílový soubor má hodnoty všech rozměrů, které soubor v&nbsp;daném stavu (hodnota posledního rozměrumá mít+  * It is possible to define input filesThese are typically in completely different folder or they names are different so that they are not confused with the files named according to dimension values and they are not in danger of being removed by makeWe can describe their properties in various dimensions if we create a normal rule where the input file is a dependency (source) and the goal is a file named by dimension valuesWe write ''.md.in:'' before such rule. MD-make adds a command to copy the source file to the target (''cp $< $@''and checks that the target file has values for all dimensions that file in its state (last dimension's valueought to have
-  * Vygenerovaný makefile by navíc mohl obsahovat pro každou hodnotu každého rozměru seznam souborů, v&nbsp;nichž je tato hodnota zafixovanáNapř. všechny cílové soubory v&nbsp;jazyce "hi"Kromě proměnné obsahující jména těchto souborů (HIFILES) by vygenerovaný makefile obsahoval cíl, který všechny tyto soubory vyrobí (hi)cíl, který je smaže (clean_hi). +  * The generated makefile could further contain for each value of each dimension the list of files for which this value is fixedFor instance, all target files in the language "hi"Besides the variable containing names of such files (HIFILES) there would also be a goal that creates/updates all such files (hi) and goal that removes them (clean_hi). 
-  * V&nbsp;průběhu generování vícerozměrných pravidel si pamatovat seznam všech vygenerovaných cílových souborůKe každému cílovému souboru vytvořit hash, jehož klíčem je hodnota libovolného rozměru hodnota u daného klíče je nenulová, jestliže příslušná hodnota rozměru je v&nbsp;názvu souboru obsaženaNa konci makefilu lze použít pravidlo ''.MDALL'', které vytvoří ''.PHONY'' cíl závisející na všech souborech obsahujících určité hodnotyNapř.+  * Collect names of all generated target files during generating of the multidimensional rulesCreate a hash for every target file where the key is the value in dimension and the value under that key is non-zero if the value of the dimension is contained in the name of the fileAt the end of the makefile there can be a rule ''.MDALL'' that creates a ''.PHONY'' goal depending on all files containing given values. E.g.
  
 <code>.MDALL: d hi conll</code> <code>.MDALL: d hi conll</code>
  
-se přepíše jako+would be rewritten as
  
 <code>.PHONY: all_d_hi_conll <code>.PHONY: all_d_hi_conll
-all_d_hi_conll: <seznam všech souborů obsahujících hodnoty "d", "hi" "conll"></code>+all_d_hi_conll: <list of all files containing values "d", "hi" and "conll"></code> 
 + 
 +===== Download ===== 
 + 
 +Copyright © 2009 Daniel Zeman 
 + 
 +All software supplied with this package is released under the GNU 
 +General Public License.  This program is free software; you can 
 +redistribute it and/or modify it under the terms of the GNU General 
 +Public License as published by the Free Software Foundation; either 
 +version 2, or (at your option) any later version. 
 + 
 +This program is distributed in the hope that it will be useful, 
 +but WITHOUT ANY WARRANTY; without even the implied warranty of 
 +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the 
 +GNU General Public License (below or at http://www.gnu.org/licenses/ 
 +gpl.html) for more details. 
 + 
 +{{:user:zeman:mdmake.zip|mdmake.zip}} contains the script ''mdmake.pl'' (you need a Perl interpreter to use it), a sample multidimensional makefile and the normal makefile generated from it.

[ Back to the navigation ] [ Back to the content ]