From 8f63b9971ac6d5a0efa370fd8b294fcffd98fd09 Mon Sep 17 00:00:00 2001 From: Karen Arutyunov Date: Thu, 12 Jul 2018 12:18:03 +0300 Subject: Use prerequisite exclusion to simplify buildfile --- libbutl/buildfile | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) (limited to 'libbutl/buildfile') diff --git a/libbutl/buildfile b/libbutl/buildfile index 8320ed0..d64f630 100644 --- a/libbutl/buildfile +++ b/libbutl/buildfile @@ -16,12 +16,11 @@ if ($force_std_modules == true) lib{butl}: {mxx hxx ixx txx cxx}{** -win32-utility -version} {hxx}{version} \ $int_libs +windows = ($cxx.target.class == 'windows') + # Exclude these from compilation on non-Windows targets. # -if ($cxx.target.class == "windows") - lib{butl}: {hxx cxx}{win32-utility} -else - lib{butl}: file{win32-utility.?xx} +lib{butl}: {hxx cxx}{win32-utility}: include = $windows # The C-files are included into sha256.cxx (sha256c.c) and timestamp.cxx # (strptime.c timelocal.h timelocal.c), so treat them as files to exclude from @@ -55,9 +54,9 @@ lib{butl}: cxx.export.poptions = "-I$out_root" "-I$src_root" liba{butl}: cxx.export.poptions += -DLIBBUTL_STATIC libs{butl}: cxx.export.poptions += -DLIBBUTL_SHARED -if ($cxx.target.class == "windows") +if $windows { - if ($cxx.target.system == "mingw32") + if ($cxx.target.system == 'mingw32') cxx.libs += -limagehlp else cxx.libs += imagehlp.lib -- cgit v1.1