From e3250a65287da963c9a61602e0b1bf39632a8bc7 Mon Sep 17 00:00:00 2001 From: Kamil Szczygiel Date: Wed, 20 Apr 2016 22:31:23 +0200 Subject: [PATCH] Make tup compilation more similar to make in regard to selected files If ASSOURCES, CSOURCES or CXXSOURCES is defined, then use these as the list of files to compile. Otherwise search for all files with proper extension. Note that these variables should be tables, not strings. --- compile.lua | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/compile.lua b/compile.lua index b00567342..bbd5e7ed5 100644 --- a/compile.lua +++ b/compile.lua @@ -1,20 +1,20 @@ -- -- file: compile.lua -- --- author: Copyright (C) 2014-2015 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info +-- author: Copyright (C) 2014-2016 Kamil Szczygiel http://www.distortec.com http://www.freddiechopin.info -- -- This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0. If a copy of the MPL was not -- distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/. -- -for index, filename in ipairs(tup.glob("*.S")) do +for index, filename in ipairs(ASSOURCES or tup.glob("*.S")) do as(filename) end -for index, filename in ipairs(tup.glob("*.c")) do +for index, filename in ipairs(CSOURCES or tup.glob("*.c")) do cc(filename) end -for index, filename in ipairs(tup.glob("*.cpp")) do +for index, filename in ipairs(CXXSOURCES or tup.glob("*.cpp")) do cxx(filename) end