Stop using .com extension in monorepo

The WIN32 CreateProcess() function does not require an .exe or .com
suffix in order to spawn an executable. Now that we have Cosmo bash
we're no longer so dependent on the cmd.exe prompt.
This commit is contained in:
Justine Tunney 2024-03-02 16:57:56 -08:00
parent c8383f25b4
commit a6baba1b07
No known key found for this signature in database
GPG key ID: BE714B4575D6E328
239 changed files with 2092 additions and 2244 deletions

View file

@ -5,111 +5,95 @@ PKGS += TOOL_VIZ
TOOL_VIZ_SRCS := $(wildcard tool/viz/*.c)
TOOL_VIZ_OBJS = \
TOOL_VIZ_OBJS = \
$(TOOL_VIZ_SRCS:%.c=o/$(MODE)/%.o)
TOOL_VIZ_COMS = \
$(TOOL_VIZ_SRCS:%.c=o/$(MODE)/%.com)
TOOL_VIZ_COMS = \
$(TOOL_VIZ_SRCS:%.c=o/$(MODE)/%)
TOOL_VIZ_BINS = \
$(TOOL_VIZ_COMS) \
TOOL_VIZ_BINS = \
$(TOOL_VIZ_COMS) \
$(TOOL_VIZ_COMS:%=%.dbg)
TOOL_VIZ_DIRECTDEPS = \
DSP_CORE \
DSP_MPEG \
DSP_SCALE \
DSP_TTY \
LIBC_CALLS \
LIBC_FMT \
LIBC_INTRIN \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_NT_COMDLG32 \
LIBC_NT_GDI32 \
LIBC_NT_KERNEL32 \
LIBC_NT_USER32 \
LIBC_PROC \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \
LIBC_STR \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_THREAD \
LIBC_TIME \
LIBC_TINYMATH \
LIBC_VGA \
LIBC_X \
NET_HTTP \
THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_DLMALLOC \
THIRD_PARTY_GDTOA \
THIRD_PARTY_GETOPT \
THIRD_PARTY_MAXMIND \
THIRD_PARTY_MUSL \
THIRD_PARTY_STB \
THIRD_PARTY_XED \
THIRD_PARTY_ZLIB \
TOOL_DECODE_LIB \
TOOL_VIZ_DIRECTDEPS = \
DSP_CORE \
DSP_MPEG \
DSP_SCALE \
DSP_TTY \
LIBC_CALLS \
LIBC_FMT \
LIBC_INTRIN \
LIBC_LOG \
LIBC_MEM \
LIBC_NEXGEN32E \
LIBC_NT_COMDLG32 \
LIBC_NT_GDI32 \
LIBC_NT_KERNEL32 \
LIBC_NT_USER32 \
LIBC_PROC \
LIBC_RUNTIME \
LIBC_SOCK \
LIBC_STDIO \
LIBC_STR \
LIBC_SYSV \
LIBC_SYSV_CALLS \
LIBC_THREAD \
LIBC_TIME \
LIBC_TINYMATH \
LIBC_VGA \
LIBC_X \
NET_HTTP \
THIRD_PARTY_COMPILER_RT \
THIRD_PARTY_DLMALLOC \
THIRD_PARTY_GDTOA \
THIRD_PARTY_GETOPT \
THIRD_PARTY_MAXMIND \
THIRD_PARTY_MUSL \
THIRD_PARTY_STB \
THIRD_PARTY_XED \
THIRD_PARTY_ZLIB \
TOOL_DECODE_LIB \
TOOL_VIZ_LIB
TOOL_VIZ_DEPS := \
TOOL_VIZ_DEPS := \
$(call uniq,$(foreach x,$(TOOL_VIZ_DIRECTDEPS),$($(x))))
o/$(MODE)/tool/viz/viz.pkg: \
$(TOOL_VIZ_OBJS) \
o/$(MODE)/tool/viz/viz.pkg: \
$(TOOL_VIZ_OBJS) \
$(foreach x,$(TOOL_VIZ_DIRECTDEPS),$($(x)_A).pkg)
o/$(MODE)/tool/viz/%.com.dbg: \
$(TOOL_VIZ_DEPS) \
o/$(MODE)/tool/viz/%.o \
o/$(MODE)/tool/viz/viz.pkg \
$(CRT) \
o/$(MODE)/tool/viz/%.dbg: \
$(TOOL_VIZ_DEPS) \
o/$(MODE)/tool/viz/%.o \
o/$(MODE)/tool/viz/viz.pkg \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/tool/viz/printimage.com.dbg: \
$(TOOL_VIZ_DEPS) \
o/$(MODE)/tool/viz/printimage.o \
o/$(MODE)/tool/viz/viz.pkg \
o/$(MODE)/LICENSE.zip.o \
$(CRT) \
o/$(MODE)/tool/viz/printimage.dbg: \
$(TOOL_VIZ_DEPS) \
o/$(MODE)/tool/viz/printimage.o \
o/$(MODE)/tool/viz/viz.pkg \
o/$(MODE)/LICENSE.zip.o \
$(CRT) \
$(APE_NO_MODIFY_SELF)
@$(APELINK)
o/$(MODE)/tool/viz/printimage.com: \
o/$(MODE)/tool/viz/printimage.com.dbg \
o/$(MODE)/third_party/zip/zip.com \
o/$(MODE)/tool/build/symtab.com
@$(MAKE_OBJCOPY)
@$(MAKE_SYMTAB_CREATE)
@$(MAKE_SYMTAB_ZIP)
o/$(MODE)/tool/viz/printvideo.com: \
o/$(MODE)/tool/viz/printvideo.com.dbg \
o/$(MODE)/third_party/zip/zip.com \
o/$(MODE)/tool/build/symtab.com
@$(MAKE_OBJCOPY)
@$(MAKE_SYMTAB_CREATE)
@$(MAKE_SYMTAB_ZIP)
o/$(MODE)/tool/viz/derasterize.o: private \
CFLAGS += \
-DSTACK_FRAME_UNLIMITED \
o/$(MODE)/tool/viz/derasterize.o: private \
CFLAGS += \
-DSTACK_FRAME_UNLIMITED \
$(MATHEMATICAL)
o/$(MODE)/tool/viz/magikarp.o: private \
CFLAGS += \
o/$(MODE)/tool/viz/magikarp.o: private \
CFLAGS += \
$(MATHEMATICAL)
$(TOOL_VIZ_OBJS): \
$(BUILD_FILES) \
$(TOOL_VIZ_OBJS): \
$(BUILD_FILES) \
tool/viz/BUILD.mk
.PHONY: o/$(MODE)/tool/viz
o/$(MODE)/tool/viz: \
o/$(MODE)/tool/viz/lib \
$(TOOL_VIZ_BINS) \
o/$(MODE)/tool/viz: \
o/$(MODE)/tool/viz/lib \
$(TOOL_VIZ_BINS) \
$(TOOL_VIZ_CHECKS)

View file

@ -25,7 +25,7 @@
Getting started:
nroff -mandoc -rLL=72n -rLT=78n -Tutf8 <manpage.1 |
o/tool/viz/ascii2utf8.com
o/tool/viz/ascii2utf8
ASCII Bold:

View file

@ -82,7 +82,7 @@ DESCRIPTION\n\
\n\
EXAMPLES\n\
\n\
$ ./derasterize.com samples/wave.png > wave.uaart\n\
$ ./derasterize samples/wave.png > wave.uaart\n\
$ cat wave.uaart\n\
\n\
AUTHORS\n\

View file

@ -25,7 +25,7 @@
/**
* @fileoverview Hex String Literal Converter, e.g.
*
* $ echo hello | o/tool/viz/dumphexc.com
* $ echo hello | o/tool/viz/dumphexc
* "\
* \x68\x65\x6c\x6c\x6f\x0a"
*/

View file

@ -102,11 +102,11 @@
* Here's how you can compile this program on Linux:
*
* git clone https://github.com/jart/cosmopolitan && cd cosmopolitan
* make -j12 o//tool/viz/life.com
* make -j12 o//tool/viz/life
*
* The output binary works on Linux, Windows, Mac, and FreeBSD:
*
* o//tool/viz/life.com
* o//tool/viz/life
*
* @see https://en.wikipedia.org/wiki/Conway%27s_Game_of_Life
* @see https://www.conwaylife.com/wiki/Run_Length_Encoded
@ -225,10 +225,10 @@ static char16_t statusline16[256];
#define GODOWN(x) ((x) << 8)
#define GORIGHT(x) (((x) & ~RIGHT) << 1)
#define GOLEFT(x) (((x) & ~LEFT) >> 1)
#define LEFTMOST(x) ((x)&LEFT)
#define RIGHTMOST(x) ((x)&RIGHT)
#define TOPMOST(x) ((x)&TOP)
#define BOTMOST(x) ((x)&BOTTOM)
#define LEFTMOST(x) ((x) & LEFT)
#define RIGHTMOST(x) ((x) & RIGHT)
#define TOPMOST(x) ((x) & TOP)
#define BOTMOST(x) ((x) & BOTTOM)
#define ADD(X) \
do { \

View file

@ -84,9 +84,10 @@ FLAGS\n\
\n\
EXAMPLES\n\
\n\
printansi.com -w80 -h40 logo.png\n\
printansi -w80 -h40 logo.png\n\
\n\
\n", NULL);
\n",
NULL);
exit(rc);
}

View file

@ -93,8 +93,9 @@ FLAGS\n\
\n\
EXAMPLES\n\
\n\
printimage.com -sxd lemurs.jpg # 256-color dither unsharp\n\
\n", NULL);
printimage -sxd lemurs.jpg # 256-color dither unsharp\n\
\n",
NULL);
exit(rc);
}

View file

@ -1572,7 +1572,7 @@ int main(int argc, char *argv[]) {
fprintf(stderr, "please install either the "
"`play` (sox) or "
"`ffplay` (ffmpeg) "
"commands, so printvideo.com can play audio\n");
"commands, so printvideo can play audio\n");
usleep(10000);
}
infd_ = STDIN_FILENO;

View file

@ -30,9 +30,9 @@
* something almost representing a source code file. A hack also exists
* for comments in such files: 𝘶𝘴𝘦 𝑛𝑜𝑛-𝑎𝑠𝑐𝑖𝑖 𝗹𝗲𝘁𝘁𝗲𝗿𝗶𝗻𝗴 𝔞𝔩𝔱𝔢𝔯𝔫𝔞𝔱𝔦𝔳𝔢𝔰.
*
* bash$ o/tool/viz/bing.com </bin/sh | o/tool/viz/fold.com >sh.txt
* bash$ o/tool/viz/bing </bin/sh | o/tool/viz/fold >sh.txt
* bash$ emacs sh.txt
* bash$ o/tool/viz/unbing.com <sh.txt >sh
* bash$ o/tool/viz/unbing <sh.txt >sh
* bash$ chmod +x sh
* bash$ ./sh
*