(install
 (section share)
 (files
  (acset.mar                                  as database/acset.mar)
  (age.mar                                    as database/age.mar)
  (allkeys.mar                                as database/allkeys.mar)
  (Alphabetic.mar                             as database/Alphabetic.mar)
  (Alphabetic_set.mar                         as database/Alphabetic_set.mar)
  (ASCII_Hex_Digit.mar                        as database/ASCII_Hex_Digit.mar)
  (ASCII_Hex_Digit_set.mar                    as database/ASCII_Hex_Digit_set.mar)
  (Bidi_Control.mar                           as database/Bidi_Control.mar)
  (Bidi_Control_set.mar                       as database/Bidi_Control_set.mar)
  (case_folding.mar                           as database/case_folding.mar)
  (combined_class_map.mar                     as database/combined_class_map.mar)
  (combined_class.mar                         as database/combined_class.mar)
  (composition_exclusion.mar                  as database/composition_exclusion.mar)
  (composition_exclusion_set.mar              as database/composition_exclusion_set.mar)
  (composition.mar                            as database/composition.mar)
  (d1.mar                                     as database/d1.mar)
  (d2.mar                                     as database/d2.mar)
  (decomposition.mar                          as database/decomposition.mar)
  (Default_Ignorable_Code_Point.mar           as database/Default_Ignorable_Code_Point.mar)
  (Default_Ignorable_Code_Point_set.mar       as database/Default_Ignorable_Code_Point_set.mar)
  (Deprecated.mar                             as database/Deprecated.mar)
  (Deprecated_set.mar                         as database/Deprecated_set.mar)
  (Diacritic.mar                              as database/Diacritic.mar)
  (Diacritic_set.mar                          as database/Diacritic_set.mar)
  (Extender.mar                               as database/Extender.mar)
  (Extender_set.mar                           as database/Extender_set.mar)
  (general_category_map.mar                   as database/general_category_map.mar)
  (general_category.mar                       as database/general_category.mar)
  (Grapheme_Base.mar                          as database/Grapheme_Base.mar)
  (Grapheme_Base_set.mar                      as database/Grapheme_Base_set.mar)
  (Grapheme_Extend.mar                        as database/Grapheme_Extend.mar)
  (Grapheme_Extend_set.mar                    as database/Grapheme_Extend_set.mar)
  (Grapheme_Link.mar                          as database/Grapheme_Link.mar)
  (Grapheme_Link_set.mar                      as database/Grapheme_Link_set.mar)
  (Hex_Digit.mar                              as database/Hex_Digit.mar)
  (Hex_Digit_set.mar                          as database/Hex_Digit_set.mar)
  (Hyphen.mar                                 as database/Hyphen.mar)
  (Hyphen_set.mar                             as database/Hyphen_set.mar)
  (ID_Continue.mar                            as database/ID_Continue.mar)
  (ID_Continue_set.mar                        as database/ID_Continue_set.mar)
  (Ideographic.mar                            as database/Ideographic.mar)
  (Ideographic_set.mar                        as database/Ideographic_set.mar)
  (IDS_Binary_Operator.mar                    as database/IDS_Binary_Operator.mar)
  (IDS_Binary_Operator_set.mar                as database/IDS_Binary_Operator_set.mar)
  (ID_Start.mar                               as database/ID_Start.mar)
  (ID_Start_set.mar                           as database/ID_Start_set.mar)
  (IDS_Trinary_Operator.mar                   as database/IDS_Trinary_Operator.mar)
  (IDS_Trinary_Operator_set.mar               as database/IDS_Trinary_Operator_set.mar)
  (iscsi_prohibited.mar                       as database/iscsi_prohibited.mar)
  (Join_Control.mar                           as database/Join_Control.mar)
  (Join_Control_set.mar                       as database/Join_Control_set.mar)
  (Logical_Order_Exception.mar                as database/Logical_Order_Exception.mar)
  (Logical_Order_Exception_set.mar            as database/Logical_Order_Exception_set.mar)
  (Lowercase.mar                              as database/Lowercase.mar)
  (Lowercase_set.mar                          as database/Lowercase_set.mar)
  (map_b1b2.mar                               as database/map_b1b2.mar)
  (map_b1.mar                                 as database/map_b1.mar)
  (Math.mar                                   as database/Math.mar)
  (Math_set.mar                               as database/Math_set.mar)
  (mib_prohibited.mar                         as database/mib_prohibited.mar)
  (nameprep_prohibited.mar                    as database/nameprep_prohibited.mar)
  (nodeprep_prohibited.mar                    as database/nodeprep_prohibited.mar)
  (Noncharacter_Code_Point.mar                as database/Noncharacter_Code_Point.mar)
  (Noncharacter_Code_Point_set.mar            as database/Noncharacter_Code_Point_set.mar)
  (Other_Alphabetic.mar                       as database/Other_Alphabetic.mar)
  (Other_Alphabetic_set.mar                   as database/Other_Alphabetic_set.mar)
  (Other_Default_Ignorable_Code_Point.mar     as database/Other_Default_Ignorable_Code_Point.mar)
  (Other_Default_Ignorable_Code_Point_set.mar as database/Other_Default_Ignorable_Code_Point_set.mar)
  (Other_Grapheme_Extend.mar                  as database/Other_Grapheme_Extend.mar)
  (Other_Grapheme_Extend_set.mar              as database/Other_Grapheme_Extend_set.mar)
  (Other_Lowercase.mar                        as database/Other_Lowercase.mar)
  (Other_Lowercase_set.mar                    as database/Other_Lowercase_set.mar)
  (Other_Math.mar                             as database/Other_Math.mar)
  (Other_Math_set.mar                         as database/Other_Math_set.mar)
  (Other_Uppercase.mar                        as database/Other_Uppercase.mar)
  (Other_Uppercase_set.mar                    as database/Other_Uppercase_set.mar)
  (Quotation_Mark.mar                         as database/Quotation_Mark.mar)
  (Quotation_Mark_set.mar                     as database/Quotation_Mark_set.mar)
  (Radical.mar                                as database/Radical.mar)
  (Radical_set.mar                            as database/Radical_set.mar)
  (resourceprep_prohibited.mar                as database/resourceprep_prohibited.mar)
  (saslprep_map.mar                           as database/saslprep_map.mar)
  (saslprep_prohibited.mar                    as database/saslprep_prohibited.mar)
  (scripts_map.mar                            as database/scripts_map.mar)
  (scripts.mar                                as database/scripts.mar)
  (Soft_Dotted.mar                            as database/Soft_Dotted.mar)
  (Soft_Dotted_set.mar                        as database/Soft_Dotted_set.mar)
  (special_casing.mar                         as database/special_casing.mar)
  (Terminal_Punctuation.mar                   as database/Terminal_Punctuation.mar)
  (Terminal_Punctuation_set.mar               as database/Terminal_Punctuation_set.mar)
  (to_lower1.mar                              as database/to_lower1.mar)
  (to_title1.mar                              as database/to_title1.mar)
  (to_upper1.mar                              as database/to_upper1.mar)
  (trace_prohibited.mar                       as database/trace_prohibited.mar)
  (Unified_Ideograph.mar                      as database/Unified_Ideograph.mar)
  (Unified_Ideograph_set.mar                  as database/Unified_Ideograph_set.mar)
  (Uppercase.mar                              as database/Uppercase.mar)
  (Uppercase_set.mar                          as database/Uppercase_set.mar)
  (White_Space.mar                            as database/White_Space.mar)
  (White_Space_set.mar                        as database/White_Space_set.mar)
  (XID_Continue.mar                           as database/XID_Continue.mar)
  (XID_Continue_set.mar                       as database/XID_Continue_set.mar)
  (XID_Start.mar                              as database/XID_Start.mar)
  (XID_Start_set.mar                          as database/XID_Start_set.mar)
))

;; PROPS

(rule
 (targets White_Space.mar White_Space_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . White_Space %{deps})))

(rule
 (targets Bidi_Control.mar Bidi_Control_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Bidi_Control %{deps})))

(rule
 (targets Join_Control.mar Join_Control_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Join_Control %{deps})))

(rule
 (targets Hyphen.mar Hyphen_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Hyphen %{deps})))

(rule
 (targets Quotation_Mark.mar Quotation_Mark_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Quotation_Mark %{deps})))

(rule
 (targets Terminal_Punctuation.mar Terminal_Punctuation_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Terminal_Punctuation %{deps})))

(rule
 (targets Other_Math.mar Other_Math_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Math %{deps})))

(rule
 (targets Hex_Digit.mar Hex_Digit_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Hex_Digit %{deps})))

(rule
 (targets ASCII_Hex_Digit.mar ASCII_Hex_Digit_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . ASCII_Hex_Digit %{deps})))

(rule
 (targets Other_Alphabetic.mar Other_Alphabetic_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Alphabetic %{deps})))

(rule
 (targets Ideographic.mar Ideographic_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Ideographic %{deps})))

(rule
 (targets Diacritic.mar Diacritic_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Diacritic %{deps})))

(rule
 (targets Extender.mar Extender_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Extender %{deps})))

(rule
 (targets Other_Lowercase.mar Other_Lowercase_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Lowercase %{deps})))

(rule
 (targets Other_Uppercase.mar Other_Uppercase_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Uppercase %{deps})))

(rule
 (targets Noncharacter_Code_Point.mar Noncharacter_Code_Point_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Noncharacter_Code_Point %{deps})))

(rule
 (targets Other_Grapheme_Extend.mar Other_Grapheme_Extend_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Grapheme_Extend %{deps})))

(rule
 (targets Grapheme_Link.mar Grapheme_Link_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Grapheme_Link %{deps})))

(rule
 (targets IDS_Binary_Operator.mar IDS_Binary_Operator_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . IDS_Binary_Operator %{deps})))

(rule
 (targets IDS_Trinary_Operator.mar IDS_Trinary_Operator_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . IDS_Trinary_Operator %{deps})))

(rule
 (targets Radical.mar Radical_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Radical %{deps})))

(rule
 (targets Unified_Ideograph.mar Unified_Ideograph_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Unified_Ideograph %{deps})))

(rule
 (targets Other_Default_Ignorable_Code_Point.mar Other_Default_Ignorable_Code_Point_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Other_Default_Ignorable_Code_Point %{deps})))

(rule
 (targets Deprecated.mar Deprecated_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Deprecated %{deps})))

(rule
 (targets Soft_Dotted.mar Soft_Dotted_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Soft_Dotted %{deps})))

(rule
 (targets Logical_Order_Exception.mar Logical_Order_Exception_set.mar)
 (deps    ../unidata/PropList.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Logical_Order_Exception %{deps})))

;; CORE_DERIVED_PROPS

(rule
 (targets Math.mar Math_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Math %{deps})))

(rule
 (targets Alphabetic.mar Alphabetic_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Alphabetic %{deps})))

(rule
 (targets Lowercase.mar Lowercase_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Lowercase %{deps})))

(rule
 (targets Uppercase.mar Uppercase_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Uppercase %{deps})))

(rule
 (targets ID_Start.mar ID_Start_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . ID_Start %{deps})))

(rule
 (targets ID_Continue.mar ID_Continue_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . ID_Continue %{deps})))

(rule
 (targets XID_Start.mar XID_Start_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . XID_Start %{deps})))

(rule
 (targets XID_Continue.mar XID_Continue_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . XID_Continue %{deps})))

(rule
 (targets Default_Ignorable_Code_Point.mar Default_Ignorable_Code_Point_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Default_Ignorable_Code_Point %{deps})))

(rule
 (targets Grapheme_Extend.mar Grapheme_Extend_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Grapheme_Extend %{deps})))

(rule
 (targets Grapheme_Base.mar Grapheme_Base_set.mar)
 (deps    ../unidata/DerivedCoreProperties.txt)
 (action  (run ../tools/parse_uniset.exe -filter . Grapheme_Base %{deps})))

;; FROM_UNIDATA

(rule
 (targets combined_class.mar
          combined_class_map.mar
          composition.mar
          decomposition.mar
          general_category.mar
          to_lower1.mar
          to_title1.mar
          to_upper1.mar
          general_category_map.mar)
 (deps    ../unidata/UnicodeData.txt)
 (action  (run ../tools/parse_unidata.exe . %{deps})))

;; STRINGPREP_TABLES

(rule
 (targets map_b1b2.mar
          map_b1.mar
          d1.mar d2.mar
          saslprep_map.mar
          nodeprep_prohibited.mar
          resourceprep_prohibited.mar
          nameprep_prohibited.mar
          saslprep_prohibited.mar
          trace_prohibited.mar
          iscsi_prohibited.mar
          mib_prohibited.mar)
 (deps   (glob_files ../unidata/stringprep/*))
 (action (run ../tools/camomilestringprep.exe -in ../unidata/stringprep -out .)))

;; other

(alias
 (name database)
 (deps combined_class.mar
       composition.mar
       decomposition.mar
       general_category.mar
       to_lower1.mar
       to_title1.mar
       to_upper1.mar
       general_category_map.mar
       White_Space.mar
       Bidi_Control.mar
       Join_Control.mar
       Hyphen.mar
       Quotation_Mark.mar
       Terminal_Punctuation.mar
       Other_Math.mar
       Hex_Digit.mar
       ASCII_Hex_Digit.mar
       Other_Alphabetic.mar
       Ideographic.mar
       Diacritic.mar
       Extender.mar
       Other_Lowercase.mar
       Other_Uppercase.mar
       Noncharacter_Code_Point.mar
       Other_Grapheme_Extend.mar
       Grapheme_Link.mar
       IDS_Binary_Operator.mar
       IDS_Trinary_Operator.mar
       Radical.mar
       Unified_Ideograph.mar
       Other_Default_Ignorable_Code_Point.mar
       Deprecated.mar
       Soft_Dotted.mar
       Logical_Order_Exception.mar
       scripts.mar))

(rule
 (targets allkeys.mar acset.mar)
 (deps    ../unidata/tr10/allkeys.txt (alias database))
 (action  (chdir .. (run tools/parse_allkeys.exe database %{deps}))))

(rule
 (targets case_folding.mar)
 (deps    ../unidata/CaseFolding.txt)
 (action  (run ../tools/parse_casefolding.exe . %{deps})))

(rule
 (targets composition_exclusion.mar composition_exclusion_set.mar)
 (deps    ../unidata/CompositionExclusions.txt)
 (action  (run ../tools/parse_uniset.exe . composition_exclusion %{deps})))

(rule
 (targets special_casing.mar)
 (deps    ../unidata/SpecialCasing.txt (alias database))
 (action  (chdir .. (run tools/parse_specialcasing.exe database %{deps}))))

(rule
 (targets scripts.mar scripts_map.mar)
 (deps    ../unidata/Scripts.txt)
 (action  (run ../tools/parse_scripts.exe . %{deps})))

(rule
 (targets age.mar)
 (deps    ../unidata/DerivedAge.txt)
 (action  (run ../tools/parse_age.exe . %{deps})))
