# # # Maintenance program for Nim # (c) Copyright 2017 Andreas Rumpf # # See the file "copying.txt", included in this # distribution, for details about the copyright. # # See doc/koch.txt for documentation. # const # examples of possible values for repos: Head, ea82b54 NimbleStableCommit = "4fb6f8e6c33963f6f510fe82d09ad2a61b5e4265" # 0.16.1 AtlasStableCommit = "5faec3e9a33afe99a7d22377dd1b45a5391f5504" ChecksumsStableCommit = "bd9bf4eaea124bf8d01e08f92ac1b14c6879d8d3" SatStableCommit = "faf1617f44d7632ee9601ebc13887644925dcc01" # examples of possible values for fusion: #head, #ea82b54, 1.2.3 FusionStableHash = "#372ee4313827ef9f2ea388840f7d6b46c2b1b014" HeadHash = "#head" when not defined(windows): const Z3StableCommit = "65de3f748a6812eecd7db7c478d5fc54424d368b" # the version of Z3 that DrNim uses when defined(gcc) and defined(windows): when defined(x86): {.link: "icons/koch.res".} else: {.link: "icons/koch_icon.o".} when defined(amd64) and defined(windows) and defined(vcc): {.link: "icons/koch-amd64-windows-vcc.res".} when defined(i386) and defined(windows) and defined(vcc): {.link: "icons/koch-i386-windows-vcc.res".} import std/[os, strutils, parseopt, osproc] # Using `std/os` instead of `os` to fail early if config isn't set up properly. # If this fails with: `Error: cannot open file: std/os`, see # https://github.com/nim-lang/Nim/pull/14291 for explanation + how to fix. when defined(nimPreviewSlimSystem): import std/[assertions, syncio] import tools / kochdocs import tools / deps const VersionAsString = system.NimVersion const HelpText = """ +-----------------------------------------------------------------+ | Maintenance program for Nim | | Version $1| | (c) 2017 Andreas Rumpf | +-----------------------------------------------------------------+ Build time: $2, $3 Usage: koch [options] command [options for command] Options: --help, -h shows this help and quits --latest bundle the installers with bleeding edge versions of external components. --stable bundle the installers with stable versions of external components (default). --nim:path use specified path for nim binary --localdocs[:path] only build local documentations. If a path is not specified (or empty), the default is used. --skipIntegrityCheck skips integrity check when booting the compiler Possible Commands: boot [options] bootstraps with given command line options distrohelper [bindir] helper for distro packagers tools builds Nim related tools toolsNoExternal builds Nim related tools (except external tools, e.g. nimble) doesn't require network connectivity nimble builds the Nimble tool atlas builds the Atlas tool fusion installs fusion via Nimble Boot options: -d:release produce a release version of the compiler -d:nimUseLinenoise use the linenoise library for interactive mode `nim secret` (not needed on Windows) -d:leanCompiler produce a compiler without JS codegen or documentation generator in order to use less RAM for bootstrapping -d:nimHasLibFFI adds FFI support for allowing compile-time VM to interface with native functions (experimental, requires prior `koch installdeps libffi`) Command
# dwm version
VERSION = 4.6
# Customize below to fit your system
# paths
PREFIX = /usr/local
MANPREFIX = ${PREFIX}/share/man
X11INC = /usr/X11R6/include
X11LIB = /usr/X11R6/lib
# includes and libs
INCS = -I. -I/usr/include -I${X11INC}
LIBS = -L/usr/lib -lc -L${X11LIB} -lX11
# flags
CFLAGS = -Os ${INCS} -DVERSION=\"${VERSION}\"
LDFLAGS = -s ${LIBS}
#CFLAGS = -g -Wall -O2 ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = -g ${LIBS}
# Solaris
#CFLAGS = -fast ${INCS} -DVERSION=\"${VERSION}\"
#LDFLAGS = ${LIBS}
#CFLAGS += -xtarget=ultra
# compiler and linker
CC = cc