git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "lufia via GitGitGadget" <gitgitgadget@gmail.com>
To: git@vger.kernel.org
Cc: Junio C Hamano <gitster@pobox.com>, lufia <lufia@lufia.org>
Subject: [PATCH 6/6] Add mkfile to build git and subcommands for Plan 9
Date: Sat, 03 Aug 2019 16:52:13 -0700 (PDT)	[thread overview]
Message-ID: <04949713061ba95784b5523c6ce57542a8e87abe.1564876327.git.gitgitgadget@gmail.com> (raw)
In-Reply-To: <pull.305.git.gitgitgadget@gmail.com>

From: lufia <lufia@lufia.org>

Signed-off-by: lufia <lufia@lufia.org>
---
 mkfile | 195 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 195 insertions(+)
 create mode 100644 mkfile

diff --git a/mkfile b/mkfile
new file mode 100644
index 0000000000..f0b06437ed
--- /dev/null
+++ b/mkfile
@@ -0,0 +1,195 @@
+</sys/src/ape/config
+
+CFILES=`{sed -n '/^BUILTIN_OBJS *\+= *(.*)\.o$/s//\1.c/p' Makefile}
+OFILES=\
+	${CFILES:%.c=%.$O}\
+	common-main.$O\
+
+X_CFILES=`{sed -n '/^BUILT_INS *\+= *git-(.*)\$X$/s//\1/p' Makefile}
+
+#APP_CFILES=`{sed -n '/^PROGRAM_OBJS *\+= *(.*)\.o$/s//\1.c/p' Makefile}
+APP_CFILES=\
+	credential-store.c\
+	http-fetch.c\
+	http-push.c\
+
+TARG=\
+	git\
+	${CFILES:builtin/%.c=git-%}\
+	${X_CFILES:%=git-%}\
+	${APP_CFILES:%.c=git-%}\
+	git-remote-http\
+	git-remote-https\
+	git-remote-ftp\
+	git-remote-ftps\
+
+# NO_UNIXSOCK
+#	git-credential-cache\
+#	git-credential-cache--daemon\
+
+#GIT_HOST_CPU=i386|i686|x86_64
+
+ROOT=`{pwd}
+<GIT-VERSION-FILE
+COMMIT_HASH=`{git rev-parse -q --verify HEAD}
+
+# -w flag isn't intentionally set because it is noisy.
+# -T flag isn't intentionally set.
+CFLAGS=-FVB+ -c\
+	-I$ROOT\
+	-I$ROOT/compat/plan9\
+	-I$ROOT/compat/regex\
+	-D__PLAN9__\
+	-D_POSIX_SOURCE\
+	-D_BSD_EXTENSION\
+	-D_SUSV2_SOURCE\
+	-D_PLAN9_SOURCE\
+	-D_RESEARCH_SOURCE\
+	-D_REENTRANT_SOURCE\
+	-DHAVE_SOCK_OPTS\
+	-DNO_NSEC\
+	-DNO_SYMLINK_HEAD\
+	-DNO_GECOS_IN_PWENT\
+	-DNO_GETTEXT\
+	-DNO_STRCASESTR\
+	-DNO_STRLCPY\
+	-DNO_STRTOUMAX\
+	-DNO_MBSUPPORT\
+	-DNO_MKDTEMP\
+	-DNO_UNSETENV\
+	-DNEEDS_SYS_PARAM_H\
+	-DNO_INITGROUPS\
+	-DNO_MMAP\
+	-DNO_ST_BLOCKS_IN_STRUCT_STAT\
+	-DNO_STRUCT_ITIMERVAL\
+	-DNO_SETITIMER\
+	-Dsockaddr_storage=sockaddr_in6\
+	-DNO_UNIX_SOCKETS\
+	-DNO_ICONV\
+	-DSHA1_OPENSSL\
+	-DSHA256_OPENSSL\
+	-DNO_MEMMEM\
+	-DHAVE_STDBOOL_H\
+	-DHAVE_STDINT_H\
+	-DHAVE_LOCALE_H\
+	-DHAVE_CLOCK_GETTIME\
+	-DGIT_VERSION="$GIT_VERSION"\
+	-DGIT_BUILT_FROM_COMMIT="$COMMIT_HASH"\
+	-DGIT_USER_AGENT="git/$GIT_VERSION"\
+	-DETC_GITCONFIG="/sys/lib/git/config"\
+	-DETC_GITATTRIBUTES="/sys/lib/git/attributes"\
+	-DUSER_GITCONFIG="~/lib/git/config"\
+	-DUSER_GITCREDENTIALS="~/lib/git/credentials"\
+	-DUSER_GITCREDENTIAL_CACHE="~/lib/git/credential-cache"\
+	-DDEFAULT_GIT_TEMPLATE_DIR="/sys/lib/git/templates"\
+	-DGIT_HOST_CPU="i386"\
+	-DGIT_EXEC_PATH="/bin/git-core"\
+	-DGIT_MAN_PATH="/sys/man"\
+	-DGIT_INFO_PATH=""\
+	-DGIT_HTML_PATH=""\
+	-DFALLBACK_RUNTIME_PREFIX="/bin/git-core"\
+	-DDEFAULT_PAGER="/bin/p"\
+	-DPAGER_ENV="terminal="\
+	-DHOME_ENVIRONMENT="home"\
+	-DPATH_ENVIRONMENT="path"\
+	-D_PATH_SEP=1\
+	-D_PATH_DEFPATH="/bin"\
+	-DSHELL_PATH="/bin/rc"\
+
+LIB_CFILES=`{sed -n '/^LIB_OBJS *\+= *(.*)\.o$/s//\1.c/p' Makefile}
+LIB_OFILES=\
+	${LIB_CFILES:%.c=%.$O}\
+	compat/qsort_s.$O\
+	compat/strcasestr.$O\
+	compat/strlcpy.$O\
+	compat/strtoumax.$O\
+	compat/strtoimax.$O\
+	compat/setenv.$O\
+	compat/mkdtemp.$O\
+	compat/unsetenv.$O\
+	compat/mmap.$O\
+	compat/memmem.$O\
+	compat/regex/regex.$O\
+
+XDIFF_CFILES=`{sed -n '/^XDIFF_OBJS *\+= *(.*)\.o$/s//\1.c/p' Makefile}
+XDIFF_OFILES=${XDIFF_CFILES:%.c=%.$O}
+
+HFILES=\
+	`{ls *.h}\
+	`{ls */*.h}\
+	`{ls */*/*.h}\
+	`{ls */*/*/*.h}\
+	command-list.h\
+
+BIN=/$objtype/bin/git-core
+OBJBIN=/$objtype/bin
+
+LIB=\
+	libgit.a$O\
+	xdiff/lib.a$O\
+	/$objtype/lib/ape/libcurl.a\
+	/$objtype/lib/ape/libssl.a\
+	/$objtype/lib/ape/libcrypto.a\
+	/$objtype/lib/ape/libexpat.a\
+	/$objtype/lib/ape/libz.a\
+
+CLEANFILES=command-list.h
+
+</sys/src/cmd/mkmany
+
+LIBGIT=libgit.a$O
+LIBGITOBJ=${LIB_OFILES:%=$LIBGIT(%)}
+LIBXDIFF=xdiff/lib.a$O
+LIBXDIFFOBJ=${XDIFF_OFILES:%=$LIBXDIFF(%)}
+
+command-list.h:D:	command-list.txt
+	rc ./generate-cmdlist.rc $prereq >$target
+
+${CFILES:builtin/%.c=$O.git-%} ${X_CFILES:%=$O.git-%}:D:	plan9/wrap.c
+	for(i in $target)
+		$CC -FTVw -o $i $prereq
+
+$O.git-credential-store:	credential-store.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+$O.git-http-fetch:	http-fetch.$O http.$O http-walker.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+$O.git-http-push:	http-push.$O http.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+git-http-%.$O:	http-%.c
+	$CC $CFLAGS -o $target $prereq
+
+$O.git-remote-http:	remote-curl.$O http.$O http-walker.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+$O.git-remote-https:	remote-curl.$O http.$O http-walker.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+$O.git-remote-ftp:	remote-curl.$O http.$O http-walker.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+$O.git-remote-ftps:	remote-curl.$O http.$O http-walker.$O common-main.$O $LIB
+	$LD $LDFLAGS -o $target $prereq
+
+# git should be copied into both $BIN and $OBJBIN
+git.install:V:	$O.git
+	cp $O.git $OBJBIN/git
+
+$LIBGIT:	$LIBGITOBJ
+	ar vu $target $newmember
+
+$LIBXDIFF:	$LIBXDIFFOBJ
+	ar vu $target $newmember
+
+%.$O:	%.c
+	$CC $CFLAGS -o $target $stem.c
+
+$LIBGIT(%.$O):N:	%.$O
+
+$LIBXDIFF(%.$O):N:	%.$O
+
+clean:V:
+	rm -f *.[$OS] [$OS].out y.tab.? lex.yy.c y.debug y.output $CLEANFILES
+	rm -f */*.[$OS] */*/*.[$OS]
-- 
gitgitgadget

  parent reply	other threads:[~2019-08-03 23:52 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-08-03 23:52 [PATCH 0/6] Port git to Plan 9 KADOTA, Kyohei via GitGitGadget
2019-08-03 23:52 ` [PATCH 1/6] Change HOME, PATH, and .gitconfig paths to be customizable lufia via GitGitGadget
2019-08-03 23:52 ` [PATCH 2/6] Fix C syntactic errors for the Plan 9 C compiler lufia via GitGitGadget
2019-08-03 23:52 ` [PATCH 3/6] GIT-VERSION-GEN: Use sed instead of expr lufia via GitGitGadget
2019-08-05 22:37   ` Junio C Hamano
2019-08-03 23:52 ` [PATCH 4/6] Port generate-cmdline.sh to rc lufia via GitGitGadget
2019-08-03 23:52 ` [PATCH 5/6] Add plan9/wrap.c lufia via GitGitGadget
2019-08-04  0:03   ` brian m. carlson
2019-08-04  1:26     ` Kyohei Kadota
2019-08-03 23:52 ` lufia via GitGitGadget [this message]
2019-08-04  0:38 ` [PATCH 0/6] Port git to Plan 9 brian m. carlson
2019-08-04  2:22   ` Kyohei Kadota
2019-08-04 20:22     ` Jonathan Nieder
2019-08-27 13:46 ` [PATCH v2 0/3] " KADOTA, Kyohei via GitGitGadget
2019-08-27 13:46   ` [PATCH v2 1/3] Change HOME, PATH, and .gitconfig paths to be customizable lufia via GitGitGadget
2019-08-27 13:46   ` [PATCH v2 2/3] Fix C syntactic errors for the Plan 9 C compiler lufia via GitGitGadget
2019-08-27 13:46   ` [PATCH v2 3/3] Support Plan 9 dialect lufia via GitGitGadget

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=04949713061ba95784b5523c6ce57542a8e87abe.1564876327.git.gitgitgadget@gmail.com \
    --to=gitgitgadget@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=lufia@lufia.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).