Packages
fast_xml
1.1.9
1.1.60
1.1.59
1.1.58
1.1.57
1.1.56
1.1.55
1.1.53
1.1.52
1.1.51
1.1.49
1.1.48
1.1.47
1.1.46
1.1.45
1.1.43
1.1.41
1.1.40
1.1.39
1.1.38
1.1.37
1.1.36
1.1.35
1.1.34
1.1.32
1.1.31
1.1.30
1.1.29
1.1.28
1.1.27
1.1.26
1.1.24
1.1.23
1.1.22
1.1.20
1.1.19
1.1.18
1.1.15
1.1.14
1.1.13
1.1.12
1.1.11
1.1.10
1.1.9
1.1.8
1.1.7
1.1.6
1.1.5
1.1.4
1.1.3
1.1.2
Fast Expat-based Erlang / Elixir XML parsing library
Current section
Files
Jump to
Current section
Files
mix.exs
# Copyright (C) 2002-2016 ProcessOne, SARL. All Rights Reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
defmodule FastXML.Mixfile do
use Mix.Project
def project do
[ app: :fast_xml,
description: "Fast Expat-based Erlang / Elixir XML parsing library",
version: "1.1.9",
elixir: "~> 1.2",
compilers: [:make] ++ Mix.compilers,
aliases: aliases,
deps: deps,
package: package
]
end
def application do
[mod: {:fast_xml, []}]
end
defp package do
[# These are the default files included in the package
files: ["src", "lib", "c_src/*.c", "mix.exs", "rebar.config", "rebar.config.script", "Makefile.mix", "priv", "include", "README.md", "LICENSE.txt"],
maintainers: ["ProcessOne"],
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/processone/fast_xml",
"Docs" => "https://github.com/processone/fast_xml/blob/master/README.md"}]
end
def deps do
[{:p1_utils, "~> 1.0"},
{:earmark, "~> 0.1", only: :dev},
{:ex_doc, "~> 0.11", only: :dev},
{:eqc_ex, "~> 1.2", only: :test}]
end
defp aliases do
# Execute the usual mix clean and our Makefile clean task
[clean: ["clean", "clean.make"]]
end
end
# Define
defmodule Mix.Tasks.Compile.Make do
@shortdoc "Compiles helper in c_src"
# TODO refactor
def run(_) do
if match? {:win32, _}, :os.type do
{result, _error_code} = System.cmd("nmake", ["/F", "Makefile.mix", "priv\\lib\\fxml_stream.dll"], stderr_to_stdout: true)
Mix.shell.info result
{result, _error_code} = System.cmd("nmake", ["/F", "Makefile.mix", "priv\\lib\\fxml.dll"], stderr_to_stdout: true)
Mix.shell.info result
else
{result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "priv/lib/fxml_stream.so"], stderr_to_stdout: true)
Mix.shell.info result
{result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "priv/lib/fxml.so"], stderr_to_stdout: true)
Mix.shell.info result
end
:ok
end
end
defmodule Mix.Tasks.Clean.Make do
@shortdoc "Cleans helper in c_src"
def run(_) do
{result, _error_code} = System.cmd("make", ["-f", "Makefile.mix", "clean"], stderr_to_stdout: true)
Mix.shell.info result
:ok
end
end