debian/0000755000000000000000000000000012151404013007155 5ustar debian/compat0000644000000000000000000000000212133627174010372 0ustar 7 debian/docs0000644000000000000000000000001312133627174010041 0ustar README.txt debian/control0000644000000000000000000000146312133627174010603 0ustar Source: premake4 Section: devel Priority: extra Maintainer: Cameron Hart Build-Depends: debhelper (>= 7), cdbs (>= 0.4.89), liblua5.1-0-dev, pkg-config Standards-Version: 3.9.4 Homepage: http://industriousone.com/premake Package: premake4 Architecture: any Depends: ${shlibs:Depends}, ${misc:Depends} Description: cross-platform build script generator Premake allows you to manage your project configuration in one place and still support those pesky IDE-addicted Windows coders and/or cranky Linux command-line junkies. It allows you to generate project files for tools that you do not own. It saves the time that would otherwise be spent manually keeping several different toolsets in sync. And it provides an easy upgrade path as new versions of your favorite tools are released. debian/premake4.10000644000000000000000000000416112133627174010770 0ustar .TH PREMAKE4 "1" "December 2012" "4.3" .SH NAME premake4 \- cross-platform build script generator .SH SYNOPSIS .B premake4 [\fIoptions\fR] \fIaction \fR[\fIarguments\fR] .SH DESCRIPTION .B premake4 is a build configuration tool that can generate project files for multiple build environments on multiple platforms. .SH OPTIONS .TP \fB\-\-cc\fR=\fIVALUE\fR Choose a C/C++ compiler set; one of: .TP gcc GNU GCC (gcc/g++) .TP ow OpenWatcom .TP \fB\-\-dotnet\fR=\fIVALUE\fR Choose a .NET compiler set; one of: .TP msnet Microsoft .NET (csc) .TP mono Novell Mono (mcs) .TP pnet Portable.NET (cscc) .TP \fB\-\-file\fR=\fIFILE\fR Read FILE as a Premake script; default is 'premake4.lua' .TP \fB\-\-help\fR Display this information .TP \fB\-\-os\fR=\fIVALUE\fR Generate files for a different operating system; one of: .TP bsd OpenBSD, NetBSD, or FreeBSD .TP linux Linux .TP macosx Apple Mac OS X .TP solaris Solaris .TP windows Microsoft Windows .TP \fB\-\-platform\fR=\fIVALUE\fR Add target architecture (if supported by action); one of: .TP x32 32\-bit .TP x64 64\-bit .TP universal Mac OS X Universal, 32\- and 64\-bit .TP universal32 Mac OS X Universal, 32\-bit only .TP universal64 Mac OS X Universal, 64\-bit only .TP ps3 Playstation 3 (experimental) .TP xbox360 Xbox 360 (experimental) .TP \fB\-\-scripts\fR=\fIpath\fR Search for additional scripts on the given path .TP \fB\-\-version\fR Display version information .SH ACTIONS .TP clean Remove all binaries and generated files .TP codeblocks Generate Code::Blocks project files .TP codelite Generate CodeLite project files .TP gmake Generate GNU makefiles for POSIX, MinGW, and Cygwin .TP vs2002 Generate Microsoft Visual Studio 2002 project files .TP vs2003 Generate Microsoft Visual Studio 2003 project files .TP vs2005 Generate Microsoft Visual Studio 2005 project files .TP vs2008 Generate Microsoft Visual Studio 2008 project files .TP vs2010 Generate Visual Studio 2010 project files (experimental) .TP xcode3 Generate Apple Xcode 3 project files (experimental) .SH SEE ALSO For additional information see http://industriousone.com/premake. .SH AUTHOR Jason Perkins and the Premake Project debian/source/0000755000000000000000000000000012133627174010474 5ustar debian/source/format0000644000000000000000000000001412133627174011702 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000635012133627174011133 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: premake4 Source: http://industriousone.com/premake Files: * Copyright: 2003-2012 Jason Perkins and indivisual contributors. License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Neither the name of the Premake nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. Files: debian/* Copyright: 2012 Cameron Hart License: BSD-3-clause Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: . 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. . 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. . 3. Neither the name of the Premake nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. . THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. debian/watch0000644000000000000000000000020512133627174010222 0ustar # Compulsory line, this is a version 3 file version=3 opts=dversionmangle=s/\+repack.// \ http://sf.net/premake/premake-(.*)-src.zip debian/rules0000755000000000000000000000147412133645016010255 0ustar #!/usr/bin/make -f # -*- makefile -*- include /usr/share/cdbs/1/rules/debhelper.mk include /usr/share/cdbs/1/rules/upstream-tarball.mk include /usr/share/cdbs/1/class/makefile.mk DEB_UPSTREAM_PACKAGE = premake DEB_UPSTREAM_URL = http://prdownloads.sourceforge.net/premake DEB_UPSTREAM_WORKDIR = ../ DEB_UPSTREAM_TARBALL_BASENAME_MANGLE = s/(.*)/$$1-src/ DEB_UPSTREAM_TARBALL_EXTENSION = zip DEB_UPSTREAM_TARBALL_MD5 = 8cfafee76f9665c93b2e9ad15b015eb7 DEB_UPSTREAM_TARBALL_SRCDIR = $(DEB_UPSTREAM_TARBALL_BASENAME) DEB_UPSTREAM_REPACKAGE_EXCLUDES = src/host/lua-5.1.4/ DEB_UPSTREAM_REPACKAGE_DELIMITER = + DEB_UPSTREAM_REPACKAGE_TAG = repack1 DEB_INSTALL_CHANGELOGS_ALL := CHANGES.txt install/premake4:: install -d $(CURDIR)/debian/premake4/usr/bin install $(CURDIR)/bin/release/premake4 $(CURDIR)/debian/premake4/usr/bin debian/patches/0000755000000000000000000000000012133627174010623 5ustar debian/patches/fix-findlib.diff0000644000000000000000000002164412133627174013657 0ustar Description: Fix os.findlib on Linux so that it processes /etc/ld.so.conf correctly. Forwarded: https://bitbucket.org/premake/premake-stable/pull-request/7/process-ldsoconf-for-includes-fixes/diff Author: Cameron Hart Last-Update: 2013-01-19 --- a/src/base/os.lua +++ b/src/base/os.lua @@ -19,6 +19,36 @@ -- Scan the well-known system locations for a particular library. -- + local function parse_ld_so_conf(conf_file) + -- Linux ldconfig file parser to find system library locations + local first, last + local dirs = { } + for line in io.lines(conf_file) do + -- ignore comments + first = line:find("#", 1, true) + if first ~= nil then + line = line:sub(1, first - 1) + end + + if line ~= "" then + -- check for include files + first, last = line:find("include%s+") + if first ~= nil then + -- found include glob + local include_glob = line:sub(last + 1) + local includes = os.matchfiles(include_glob) + for _, v in ipairs(includes) do + dirs = table.join(dirs, parse_ld_so_conf(v)) + end + else + -- found an actual ld path entry + table.insert(dirs, line) + end + end + end + return dirs + end + function os.findlib(libname) local path, formats @@ -34,12 +64,8 @@ formats = { "lib%s.so", "%s.so" } path = os.getenv("LD_LIBRARY_PATH") or "" - io.input("/etc/ld.so.conf") - if io.input() then - for line in io.lines() do - path = path .. ":" .. line - end - io.input():close() + for _, v in ipairs(parse_ld_so_conf("/etc/ld.so.conf")) do + path = path .. ":" .. v end end --- a/src/host/scripts.c +++ b/src/host/scripts.c @@ -4,9 +4,10 @@ const char* builtin_scripts[] = { /* base/os.lua */ - "function os.executef(cmd, ...)\ncmd = string.format(cmd, unpack(arg))\nreturn os.execute(cmd)\nend\nfunction os.findlib(libname)\nlocal path, formats\nif os.is(\"windows\") then\nformats = { \"%s.dll\", \"%s\" }\npath = os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats = { \"lib%s.dylib\", \"%s.dylib\" }\npath = os.getenv(\"DYLD_LIBRARY_PATH\")\nelse\nformats = { \"lib%s.so\", \"%s.so\" }\npath = os.getenv(\"LD_LIBRARY_PATH\") or \"\"\nio.input(\"/etc/ld.so.conf\")\nif io.input() then\nfor line in io.lines() do\npath = path .. \":\" .. line\nend\nio.input():close()\nend\nend\ntable.insert(formats, \"%s\")\npath = (path or \"\") .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt in ipairs(formats) do\nlocal name = string.format(fmt, libname)\nlocal result = os.pathsearch(name, path)\nif result then return result end\nend\nend\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.is(id)\nreturn (os.get():lower() == id:lower())\nend\nlocal function domatch(result, mask, wantfiles)\nif mas" - "k:startswith(\"./\") then\nmask = mask:sub(3)\nend\nlocal basedir = mask\nlocal starpos = mask:find(\"%*\")\nif starpos then\nbasedir = basedir:sub(1, starpos - 1)\nend\nbasedir = path.getdirectory(basedir)\nif (basedir == \".\") then basedir = \"\" end\nlocal recurse = mask:find(\"**\", nil, true)\nmask = path.wildcards(mask)\nlocal function matchwalker(basedir)\nlocal wildcard = path.join(basedir, \"*\")\nlocal m = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nlocal isfile = os.matchisfile(m)\nif ((wantfiles and isfile) or (not wantfiles and not isfile)) then\nlocal fname = path.join(basedir, os.matchname(m))\nif fname:match(mask) == fname then\ntable.insert(result, fname)\nend\nend\nend\nos.matchdone(m)\nif recurse then\nm = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nif not os.matchisfile(m) then\nlocal dirname = os.matchname(m)\nmatchwalker(path.join(basedir, dirname))\nend\nend\nos.matchdone(m)\nend\nend\nmatchwalker(basedir)\nend\nfunction os.matchdirs(...)\nlocal result = { }\nfor _, ma" - "sk in ipairs(arg) do\ndomatch(result, mask, false)\nend\nreturn result\nend\nfunction os.matchfiles(...)\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, true)\nend\nreturn result\nend\nlocal builtin_mkdir = os.mkdir\nfunction os.mkdir(p)\nlocal dir = iif(p:startswith(\"/\"), \"/\", \"\")\nfor part in p:gmatch(\"[^/]+\") do\ndir = dir .. part\nif (part ~= \"\" and not path.isabsolute(part) and not os.isdir(dir)) then\nlocal ok, err = builtin_mkdir(dir)\nif (not ok) then\nreturn nil, err\nend\nend\ndir = dir .. \"/\"\nend\nreturn true\nend\nlocal builtin_rmdir = os.rmdir\nfunction os.rmdir(p)\nlocal dirs = os.matchdirs(p .. \"/*\")\nfor _, dname in ipairs(dirs) do\nos.rmdir(dname)\nend\nlocal files = os.matchfiles(p .. \"/*\")\nfor _, fname in ipairs(files) do\nos.remove(fname)\nend\nbuiltin_rmdir(p)\nend\n", + "function os.executef(cmd, ...)\ncmd = string.format(cmd, unpack(arg))\nreturn os.execute(cmd)\nend\nlocal function parse_ld_so_conf(conf_file)\nlocal first, last\nlocal dirs = { }\nfor line in io.lines(conf_file) do\nfirst = line:find(\"#\", 1, true)\nif first ~= nil then\nline = line:sub(1, first - 1)\nend\nif line ~= \"\" then\nfirst, last = line:find(\"include%s+\")\nif first ~= nil then\nlocal include_glob = line:sub(last + 1)\nlocal includes = os.matchfiles(include_glob)\nfor _, v in ipairs(includes) do\ndirs = table.join(dirs, parse_ld_so_conf(v))\nend\nelse\ntable.insert(dirs, line)\nend\nend\nend\nreturn dirs\nend\nfunction os.findlib(libname)\nlocal path, formats\nif os.is(\"windows\") then\nformats = { \"%s.dll\", \"%s\" }\npath = os.getenv(\"PATH\")\nelse\nif os.is(\"macosx\") then\nformats = { \"lib%s.dylib\", \"%s.dylib\" }\npath = os.getenv(\"DYLD_LIBRARY_PATH\")\nelse\nformats = { \"lib%s.so\", \"%s.so\" }\npath = os.getenv(\"LD_LIBRARY_PATH\") or \"\"\nfor _, v in ipairs(parse_ld_so_conf(\"/etc" + "/ld.so.conf\")) do\npath = path .. \":\" .. v\nend\nend\ntable.insert(formats, \"%s\")\npath = (path or \"\") .. \":/lib:/usr/lib:/usr/local/lib\"\nend\nfor _, fmt in ipairs(formats) do\nlocal name = string.format(fmt, libname)\nlocal result = os.pathsearch(name, path)\nif result then return result end\nend\nend\nfunction os.get()\nreturn _OPTIONS.os or _OS\nend\nfunction os.is(id)\nreturn (os.get():lower() == id:lower())\nend\nlocal function domatch(result, mask, wantfiles)\nif mask:startswith(\"./\") then\nmask = mask:sub(3)\nend\nlocal basedir = mask\nlocal starpos = mask:find(\"%*\")\nif starpos then\nbasedir = basedir:sub(1, starpos - 1)\nend\nbasedir = path.getdirectory(basedir)\nif (basedir == \".\") then basedir = \"\" end\nlocal recurse = mask:find(\"**\", nil, true)\nmask = path.wildcards(mask)\nlocal function matchwalker(basedir)\nlocal wildcard = path.join(basedir, \"*\")\nlocal m = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nlocal isfile = os.matchisfile(m)\nif ((wantfiles and isfile) or " + "(not wantfiles and not isfile)) then\nlocal fname = path.join(basedir, os.matchname(m))\nif fname:match(mask) == fname then\ntable.insert(result, fname)\nend\nend\nend\nos.matchdone(m)\nif recurse then\nm = os.matchstart(wildcard)\nwhile (os.matchnext(m)) do\nif not os.matchisfile(m) then\nlocal dirname = os.matchname(m)\nmatchwalker(path.join(basedir, dirname))\nend\nend\nos.matchdone(m)\nend\nend\nmatchwalker(basedir)\nend\nfunction os.matchdirs(...)\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, false)\nend\nreturn result\nend\nfunction os.matchfiles(...)\nlocal result = { }\nfor _, mask in ipairs(arg) do\ndomatch(result, mask, true)\nend\nreturn result\nend\nlocal builtin_mkdir = os.mkdir\nfunction os.mkdir(p)\nlocal dir = iif(p:startswith(\"/\"), \"/\", \"\")\nfor part in p:gmatch(\"[^/]+\") do\ndir = dir .. part\nif (part ~= \"\" and not path.isabsolute(part) and not os.isdir(dir)) then\nlocal ok, err = builtin_mkdir(dir)\nif (not ok) then\nreturn nil, err\nend\nend\ndir = dir " + ".. \"/\"\nend\nreturn true\nend\nlocal builtin_rmdir = os.rmdir\nfunction os.rmdir(p)\nlocal dirs = os.matchdirs(p .. \"/*\")\nfor _, dname in ipairs(dirs) do\nos.rmdir(dname)\nend\nlocal files = os.matchfiles(p .. \"/*\")\nfor _, fname in ipairs(files) do\nos.remove(fname)\nend\nbuiltin_rmdir(p)\nend\n", /* base/path.lua */ "function path.getabsolute(p)\np = path.translate(p, \"/\")\nif (p == \"\") then p = \".\" end\nlocal result = iif (path.isabsolute(p), nil, os.getcwd())\nfor n, part in ipairs(p:explode(\"/\", true)) do\nif (part == \"\" and n == 1) then\nresult = \"/\"\nelseif (part == \"..\") then\nresult = path.getdirectory(result)\nelseif (part ~= \".\") then\nresult = path.join(result, part)\nend\nend\nresult = iif(result:endswith(\"/\"), result:sub(1, -2), result)\nreturn result\nend\nfunction path.getbasename(p)\nlocal name = path.getname(p)\nlocal i = name:findlast(\".\", true)\nif (i) then\nreturn name:sub(1, i - 1)\nelse\nreturn name\nend\nend\nfunction path.getdirectory(p)\nlocal i = p:findlast(\"/\", true)\nif (i) then\nif i > 1 then i = i - 1 end\nreturn p:sub(1, i)\nelse\nreturn \".\"\nend\nend\nfunction path.getdrive(p)\nlocal ch1 = p:sub(1,1)\nlocal ch2 = p:sub(2,2)\nif ch2 == \":\" then\nreturn ch1\nend\nend\nfunction path.getextension(p)\nlocal i = p:findlast(\".\", true)\nif (i) then\nreturn p:sub(i)\nelse\n" debian/patches/kfreebsd-fix.diff0000644000000000000000000000120512133627174014024 0ustar Description: Build fix for Debian GNU/kFreeBSD not being recognised Forwarded: https://sourceforge.net/p/premake/patches/162/ Author: Cameron Hart Last-Update: 2012-12-29 --- a/src/host/premake.h +++ b/src/host/premake.h @@ -15,7 +15,7 @@ #if defined(__linux__) #define PLATFORM_LINUX (1) #define PLATFORM_STRING "linux" -#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) +#elif defined(__FreeBSD__) || defined(__NetBSD__) || defined(__OpenBSD__) || defined(__FreeBSD_kernel__) #define PLATFORM_BSD (1) #define PLATFORM_STRING "bsd" #elif defined(__APPLE__) && defined(__MACH__) debian/patches/series0000644000000000000000000000011312133627174012033 0ustar generated-makefile.diff fix-readme.diff kfreebsd-fix.diff fix-findlib.diff debian/patches/generated-makefile.diff0000644000000000000000000001556312133627174015200 0ustar Description: Modified premake4.lua to compile against a packaged Lua lib instead of the Lua source included in the Premake source package and a Premake4 generated Makefile based on these changes. Forwarded: not-needed Author: Cameron Hart Last-Update: 2012-12-26 --- /dev/null +++ b/Makefile @@ -0,0 +1,34 @@ +# GNU Make solution makefile autogenerated by Premake +# Type "make help" for usage help + +ifndef config + config=release +endif +export config + +PROJECTS := Premake4 + +.PHONY: all clean help $(PROJECTS) + +all: $(PROJECTS) + +Premake4: + @echo "==== Building Premake4 ($(config)) ====" + @${MAKE} --no-print-directory -C . -f Premake4.make + +clean: + @${MAKE} --no-print-directory -C . -f Premake4.make clean + +help: + @echo "Usage: make [config=name] [target]" + @echo "" + @echo "CONFIGURATIONS:" + @echo " release" + @echo " debug" + @echo "" + @echo "TARGETS:" + @echo " all (default)" + @echo " clean" + @echo " Premake4" + @echo "" + @echo "For more information, see http://industriousone.com/premake/quick-start" --- a/premake4.lua +++ b/premake4.lua @@ -48,8 +48,10 @@ defines { "_CRT_SECURE_NO_WARNINGS" } configuration "linux" + excludes { "src/host/lua-5.1.4/**" } defines { "LUA_USE_POSIX", "LUA_USE_DLOPEN" } - links { "m", "dl" } + buildoptions { "`pkg-config --cflags lua5.1`" } + linkoptions { "`pkg-config --libs lua5.1`" } configuration "macosx" defines { "LUA_USE_MACOSX" } --- /dev/null +++ b/Premake4.make @@ -0,0 +1,191 @@ +# GNU Make project makefile autogenerated by Premake +ifndef config + config=release +endif + +ifndef verbose + SILENT = @ +endif + +CC = gcc +CXX = g++ +AR = ar + +ifndef RESCOMP + ifdef WINDRES + RESCOMP = $(WINDRES) + else + RESCOMP = windres + endif +endif + +ifeq ($(config),release) + OBJDIR = obj/Release + TARGETDIR = bin/release + TARGET = $(TARGETDIR)/premake4 + DEFINES += -DNDEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -Isrc/host/lua-5.1.4/src + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -Os `pkg-config --cflags lua5.1` + ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) + ALL_LDFLAGS += $(LDFLAGS) -s `pkg-config --libs lua5.1` -rdynamic + RESFLAGS += $(DEFINES) $(INCLUDES) + LIBS += + LDDEPS += + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS) + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +ifeq ($(config),debug) + OBJDIR = obj/Debug + TARGETDIR = bin/debug + TARGET = $(TARGETDIR)/premake4 + DEFINES += -D_DEBUG -DLUA_USE_POSIX -DLUA_USE_DLOPEN + INCLUDES += -Isrc/host/lua-5.1.4/src + ALL_CPPFLAGS += $(CPPFLAGS) -MMD -MP $(DEFINES) $(INCLUDES) + ALL_CFLAGS += $(CFLAGS) $(ALL_CPPFLAGS) $(ARCH) -Wall -Wextra -g `pkg-config --cflags lua5.1` + ALL_CXXFLAGS += $(CXXFLAGS) $(ALL_CFLAGS) + ALL_LDFLAGS += $(LDFLAGS) `pkg-config --libs lua5.1` -rdynamic + RESFLAGS += $(DEFINES) $(INCLUDES) + LIBS += + LDDEPS += + LINKCMD = $(CC) -o $(TARGET) $(OBJECTS) $(RESOURCES) $(ARCH) $(LIBS) $(ALL_LDFLAGS) + define PREBUILDCMDS + endef + define PRELINKCMDS + endef + define POSTBUILDCMDS + endef +endif + +OBJECTS := \ + $(OBJDIR)/os_mkdir.o \ + $(OBJDIR)/os_isfile.o \ + $(OBJDIR)/os_uuid.o \ + $(OBJDIR)/os_isdir.o \ + $(OBJDIR)/string_endswith.o \ + $(OBJDIR)/os_getcwd.o \ + $(OBJDIR)/path_isabsolute.o \ + $(OBJDIR)/premake.o \ + $(OBJDIR)/os_rmdir.o \ + $(OBJDIR)/scripts.o \ + $(OBJDIR)/os_pathsearch.o \ + $(OBJDIR)/os_chdir.o \ + $(OBJDIR)/os_copyfile.o \ + $(OBJDIR)/os_match.o \ + +RESOURCES := \ + +SHELLTYPE := msdos +ifeq (,$(ComSpec)$(COMSPEC)) + SHELLTYPE := posix +endif +ifeq (/bin,$(findstring /bin,$(SHELL))) + SHELLTYPE := posix +endif + +.PHONY: clean prebuild prelink + +all: $(TARGETDIR) $(OBJDIR) prebuild prelink $(TARGET) + @: + +$(TARGET): $(GCH) $(OBJECTS) $(LDDEPS) $(RESOURCES) + @echo Linking Premake4 + $(SILENT) $(LINKCMD) + $(POSTBUILDCMDS) + +$(TARGETDIR): + @echo Creating $(TARGETDIR) +ifeq (posix,$(SHELLTYPE)) + $(SILENT) mkdir -p $(TARGETDIR) +else + $(SILENT) mkdir $(subst /,\\,$(TARGETDIR)) +endif + +$(OBJDIR): + @echo Creating $(OBJDIR) +ifeq (posix,$(SHELLTYPE)) + $(SILENT) mkdir -p $(OBJDIR) +else + $(SILENT) mkdir $(subst /,\\,$(OBJDIR)) +endif + +clean: + @echo Cleaning Premake4 +ifeq (posix,$(SHELLTYPE)) + $(SILENT) rm -f $(TARGET) + $(SILENT) rm -rf $(OBJDIR) +else + $(SILENT) if exist $(subst /,\\,$(TARGET)) del $(subst /,\\,$(TARGET)) + $(SILENT) if exist $(subst /,\\,$(OBJDIR)) rmdir /s /q $(subst /,\\,$(OBJDIR)) +endif + +prebuild: + $(PREBUILDCMDS) + +prelink: + $(PRELINKCMDS) + +ifneq (,$(PCH)) +$(GCH): $(PCH) + @echo $(notdir $<) +ifeq (posix,$(SHELLTYPE)) + -$(SILENT) cp $< $(OBJDIR) +else + $(SILENT) xcopy /D /Y /Q "$(subst /,\,$<)" "$(subst /,\,$(OBJDIR))" 1>nul +endif + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.gch=%.d) -c "$<" +endif + +$(OBJDIR)/os_mkdir.o: src/host/os_mkdir.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_isfile.o: src/host/os_isfile.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_uuid.o: src/host/os_uuid.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_isdir.o: src/host/os_isdir.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/string_endswith.o: src/host/string_endswith.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_getcwd.o: src/host/os_getcwd.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/path_isabsolute.o: src/host/path_isabsolute.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/premake.o: src/host/premake.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_rmdir.o: src/host/os_rmdir.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/scripts.o: src/host/scripts.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_pathsearch.o: src/host/os_pathsearch.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_chdir.o: src/host/os_chdir.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_copyfile.o: src/host/os_copyfile.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" +$(OBJDIR)/os_match.o: src/host/os_match.c + @echo $(notdir $<) + $(SILENT) $(CC) $(ALL_CFLAGS) -o "$@" -MF $(@:%.o=%.d) -c "$<" + +-include $(OBJECTS:%.o=%.d) +ifneq (,$(PCH)) + -include $(OBJDIR)/$(notdir $(PCH)).d +endif debian/patches/fix-readme.diff0000644000000000000000000000160512133627174013500 0ustar Description: Removed references to LICENSE.txt and BUILD.txt from README.txt. Forwarded: not-needed Author: Cameron Hart Last-Update: 2012-12-26 Index: premake4-4.3/README.txt =================================================================== --- premake4-4.3.orig/README.txt 2012-12-26 19:15:01.478836163 +1100 +++ premake4-4.3/README.txt 2012-12-26 19:15:56.718834530 +1100 @@ -2,14 +2,11 @@ A build configuration tool Copyright (C) 2002-2010 by Jason Perkins - Distributed under the terms of the BSD License, see LICENSE.txt + Distributed under the terms of the BSD License. The Lua language and runtime library is (C) TeCGraf, PUC-Rio. See their website at http://www.lua.org/ - See the file BUILD.txt for instructions on building Premake. - - For questions, comments, or more information, visit the project website at http://industriousone.com/premake debian/changelog0000644000000000000000000000053112151403715011036 0ustar premake4 (4.3+repack1-2) unstable; urgency=low * Changed distribution from experimental to unstable. -- Cameron Hart Wed, 29 May 2013 23:49:54 +1000 premake4 (4.3+repack1-1) experimental; urgency=low * Initial release. (Closes: #696368) -- Cameron Hart Tue, 4 Apr 2013 07:38:00 +1100 debian/README.source0000644000000000000000000000012512133627174011351 0ustar src/host/lua-5.1.4 removed: the premake4 Debian package uses the system copy of Lua. debian/premake4.manpages0000644000000000000000000000002212133627174012413 0ustar debian/premake4.1