diff options
Diffstat (limited to 'src/action/make/gmake_project.c')
-rw-r--r-- | src/action/make/gmake_project.c | 98 |
1 files changed, 49 insertions, 49 deletions
diff --git a/src/action/make/gmake_project.c b/src/action/make/gmake_project.c index adb5660..3788e2d 100644 --- a/src/action/make/gmake_project.c +++ b/src/action/make/gmake_project.c @@ -1,49 +1,49 @@ -/**
- * \file gmake_project.c
- * \brief GNU makefile project generation functions.
- * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project
- */
-
-#include "premake.h"
-#include "make_project.h"
-
-
-/**
- * Write the shell detection block, which is used while building on Windows in
- * order to detect the enclosing shell type: MS-DOS, Cygwin, or MinGW. The shell
- * determines how directories and files should be created and removed.
- *
- * While the detection in important only on Windows, I write for all platforms.
- * This simplifies the code generation, and makes portable makefiles possible
- * (even though most will have platform-specific bits in them).
- */
-int gmake_project_shell_detect(Session sess, Project prj, Stream strm)
-{
- int z = OKAY;
-
- UNUSED(sess);
- UNUSED(prj);
-
- z |= stream_writeline(strm, "SHELLTYPE := msdos");
- z |= stream_writeline(strm, "ifeq (,$(ComSpec)$(COMSPEC))");
- z |= stream_writeline(strm, " SHELLTYPE := posix");
- z |= stream_writeline(strm, "endif");
- z |= stream_writeline(strm, "ifeq (/bin,$(findstring /bin,$(SHELL)))");
- z |= stream_writeline(strm, " SHELLTYPE := posix");
- z |= stream_writeline(strm, "endif");
- z |= stream_writeline(strm, "");
- z |= stream_writeline(strm, "ifeq (posix,$(SHELLTYPE))");
- z |= stream_writeline(strm, " MKDIR := mkdir -p");
- z |= stream_writeline(strm, " PATHSEP := /");
- z |= stream_writeline(strm, "else");
- z |= stream_writeline(strm, " MKDIR := mkdir");
- z |= stream_writeline(strm, " PATHSEP := \\\\");
- z |= stream_writeline(strm, "endif");
- z |= stream_writeline(strm, "");
- z |= stream_writeline(strm, "SYS_OUTDIR := $(subst /,$(PATHSEP),$(OUTDIR))");
- z |= stream_writeline(strm, "SYS_OUTFILE := $(subst /,$(PATHSEP),$(OUTFILE))");
- z |= stream_writeline(strm, "SYS_OBJDIR := $(subst /,$(PATHSEP),$(OBJDIR))");
- z |= stream_writeline(strm, "");
- return z;
-}
-
+/** + * \file gmake_project.c + * \brief GNU makefile project generation functions. + * \author Copyright (c) 2002-2008 Jason Perkins and the Premake project + */ + +#include "premake.h" +#include "make_project.h" + + +/** + * Write the shell detection block, which is used while building on Windows in + * order to detect the enclosing shell type: MS-DOS, Cygwin, or MinGW. The shell + * determines how directories and files should be created and removed. + * + * While the detection in important only on Windows, I write for all platforms. + * This simplifies the code generation, and makes portable makefiles possible + * (even though most will have platform-specific bits in them). + */ +int gmake_project_shell_detect(Session sess, Project prj, Stream strm) +{ + int z = OKAY; + + UNUSED(sess); + UNUSED(prj); + + z |= stream_writeline(strm, "SHELLTYPE := msdos"); + z |= stream_writeline(strm, "ifeq (,$(ComSpec)$(COMSPEC))"); + z |= stream_writeline(strm, " SHELLTYPE := posix"); + z |= stream_writeline(strm, "endif"); + z |= stream_writeline(strm, "ifeq (/bin,$(findstring /bin,$(SHELL)))"); + z |= stream_writeline(strm, " SHELLTYPE := posix"); + z |= stream_writeline(strm, "endif"); + z |= stream_writeline(strm, ""); + z |= stream_writeline(strm, "ifeq (posix,$(SHELLTYPE))"); + z |= stream_writeline(strm, " MKDIR := mkdir -p"); + z |= stream_writeline(strm, " PATHSEP := /"); + z |= stream_writeline(strm, "else"); + z |= stream_writeline(strm, " MKDIR := mkdir"); + z |= stream_writeline(strm, " PATHSEP := \\\\"); + z |= stream_writeline(strm, "endif"); + z |= stream_writeline(strm, ""); + z |= stream_writeline(strm, "SYS_OUTDIR := $(subst /,$(PATHSEP),$(OUTDIR))"); + z |= stream_writeline(strm, "SYS_OUTFILE := $(subst /,$(PATHSEP),$(OUTFILE))"); + z |= stream_writeline(strm, "SYS_OBJDIR := $(subst /,$(PATHSEP),$(OBJDIR))"); + z |= stream_writeline(strm, ""); + return z; +} + |