{"action":"created","comment":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/76979116","id":76979116,"diff_hunk":"@@ -13,96 +13,127 @@\n #*                                                                        *\n #**************************************************************************\n \n-include ../../config/Makefile\n-CAMLRUN ?= ../../boot/ocamlrun\n-CAMLYACC ?= ../../boot/ocamlyacc\n-\n ROOTDIR=../..\n-CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc -nostdlib \\\n-      -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix\n-CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt -nostdlib \\\n-        -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/unix\n-MKLIB=$(CAMLRUN) ../../tools/ocamlmklib\n+\n+include $(ROOTDIR)/config/Makefile\n+\n+CAMLRUN ?= $(ROOTDIR)/boot/ocamlrun\n+CAMLYACC ?= $(ROOTDIR)/boot/ocamlyacc\n+\n+LIBS = -nostdlib -I $(ROOTDIR)/stdlib -I $(ROOTDIR)/otherlibs/$(UNIXLIB)\n+\n+CAMLC=$(CAMLRUN) $(ROOTDIR)/ocamlc $(LIBS)\n+CAMLOPT=$(CAMLRUN) $(ROOTDIR)/ocamlopt $(LIBS)\n+MKLIB=$(CAMLRUN) $(ROOTDIR)/tools/ocamlmklib\n COMPFLAGS=-w +33..39 -warn-error A -g -bin-annot -safe-string\n ifeq \"$(FLAMBDA)\" \"true\"\n OPTCOMPFLAGS=-O3\n else\n OPTCOMPFLAGS=\n endif\n \n-BYTECODE_C_OBJS=st_stubs_b.o\n-NATIVECODE_C_OBJS=st_stubs_n.o\n+LIBNAME=threads\n+\n+ifeq \"$(UNIX_OR_WIN32)\" \"unix\"\n+HEADER = st_posix.h\n+else # Windows\n+HEADER = st_win32.h\n+endif\n+\n+BYTECODE_C_OBJS=st_stubs_b.$(O)\n+NATIVECODE_C_OBJS=st_stubs_n.$(O)\n+\n+THREADS_SOURCES := thread.ml mutex.ml condition.ml event.ml threadUnix.ml\n \n-THREAD_OBJS= thread.cmo mutex.cmo condition.cmo event.cmo threadUnix.cmo\n+THREADS_BCOBJS := $(THREADS_SOURCES:.ml=.cmo)\n+THREADS_NCOBJS := $(THREADS_SOURCES:.ml=.cmx)\n \n-all: libthreads.a threads.cma\n+MLIFILES=thread.mli mutex.mli condition.mli event.mli threadUnix.mli\n+CMIFILES=$(MLIFILES:.mli=.cmi)\n \n-allopt: libthreadsnat.a threads.cmxa\n+all: lib$(LIBNAME).$(A) $(LIBNAME).cma $(CMIFILES)\n \n-libthreads.a: $(BYTECODE_C_OBJS)\n-\t$(MKLIB) -o threads $(BYTECODE_C_OBJS) $(PTHREAD_LINK)\n+allopt: lib$(LIBNAME).$(A) $(LIBNAME).cmxa $(LIBNAME).cmxs $(CMIFILES)\n \n-st_stubs_b.o: st_stubs.c st_posix.h\n-\t$(BYTECC) -I../../byterun $(BYTECCCOMPOPTS) $(SHAREDCCCOMPOPTS) \\\n-\t   -c st_stubs.c\n-\tmv st_stubs.o st_stubs_b.o\n+lib$(LIBNAME).$(A): $(BYTECODE_C_OBJS)\n+\t$(MKLIB) -o $(LIBNAME) $(BYTECODE_C_OBJS) $(PTHREAD_LINK)\n \n+lib$(LIBNAME)nat.$(A): $(NATIVECODE_C_OBJS)\n+ifeq \"$(UNIX_OR_WIN32)\" \"unix\"\n # Dynamic linking with -lpthread is risky on many platforms, so\n # do not create a shared object for libthreadsnat.\n-libthreadsnat.a: $(NATIVECODE_C_OBJS)\n-\t$(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS)\n+\t$(AR) rc $@ $^\n+else # Windows\n+\t$(MKLIB) -o $(LIBNAME)nat $^ $(LDOPTS)","path":"otherlibs/systhreads/Makefile","position":null,"original_position":77,"commit_id":"f4f2b25816ec3f29f276057552ce5c96477eacdb","original_commit_id":"4fe3c522db0818817db98a041a5d738f4137447a","user":{"login":"shindere","id":5877758,"avatar_url":"https://avatars.githubusercontent.com/u/5877758?v=3","gravatar_id":"","url":"https://api.github.com/users/shindere","html_url":"https://github.com/shindere","followers_url":"https://api.github.com/users/shindere/followers","following_url":"https://api.github.com/users/shindere/following{/other_user}","gists_url":"https://api.github.com/users/shindere/gists{/gist_id}","starred_url":"https://api.github.com/users/shindere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindere/subscriptions","organizations_url":"https://api.github.com/users/shindere/orgs","repos_url":"https://api.github.com/users/shindere/repos","events_url":"https://api.github.com/users/shindere/events{/privacy}","received_events_url":"https://api.github.com/users/shindere/received_events","type":"User","site_admin":false},"body":"Alain Frisch (2016/08/30 14:53 -0700):\n> >  # Dynamic linking with -lpthread is risky on many platforms, so\n> >  # do not create a shared object for libthreadsnat.\n> > -libthreadsnat.a: $(NATIVECODE_C_OBJS)\n> > -\t$(AR) rc libthreadsnat.a $(NATIVECODE_C_OBJS)\n> > +\t$(AR) rc $@ $^\n> > +else # Windows\n> > +\t$(MKLIB) -o $(LIBNAME)nat $^ $(LDOPTS)\n> \n> I know this comes from the old Makefile.nt, but is LDOPTS really\n> useful (and if so, why not under Unix)?\n\nNo it's not useful, it's empty. Thanks!\nCommit amended to not use it any longer.\n","created_at":"2016-08-31T12:36:46Z","updated_at":"2016-08-31T12:36:46Z","html_url":"https://github.com/ocaml/ocaml/pull/785#discussion_r76979116","pull_request_url":"https://api.github.com/repos/ocaml/ocaml/pulls/785","_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments/76979116"},"html":{"href":"https://github.com/ocaml/ocaml/pull/785#discussion_r76979116"},"pull_request":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/785"}}},"pull_request":{"url":"https://api.github.com/repos/ocaml/ocaml/pulls/785","id":83119261,"html_url":"https://github.com/ocaml/ocaml/pull/785","diff_url":"https://github.com/ocaml/ocaml/pull/785.diff","patch_url":"https://github.com/ocaml/ocaml/pull/785.patch","issue_url":"https://api.github.com/repos/ocaml/ocaml/issues/785","number":785,"state":"open","locked":false,"title":"Merge makefiles in otherlibs/systhreads","user":{"login":"shindere","id":5877758,"avatar_url":"https://avatars.githubusercontent.com/u/5877758?v=3","gravatar_id":"","url":"https://api.github.com/users/shindere","html_url":"https://github.com/shindere","followers_url":"https://api.github.com/users/shindere/followers","following_url":"https://api.github.com/users/shindere/following{/other_user}","gists_url":"https://api.github.com/users/shindere/gists{/gist_id}","starred_url":"https://api.github.com/users/shindere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindere/subscriptions","organizations_url":"https://api.github.com/users/shindere/orgs","repos_url":"https://api.github.com/users/shindere/repos","events_url":"https://api.github.com/users/shindere/events{/privacy}","received_events_url":"https://api.github.com/users/shindere/received_events","type":"User","site_admin":false},"body":"The initial project was to submit one PR merging all the makefiles in\nall subdirectories of otherlibs. However it turned out that just the merge\nin the systhreads directory is rather non trivial and may deserve a separate\nreview.\n\n@alainfrisch you may want to review it since it seems you have worked on it.","created_at":"2016-08-29T15:36:36Z","updated_at":"2016-08-31T12:36:46Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3135694666fe1d77bd6b806a86fe448721c17069","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/ocaml/ocaml/pulls/785/commits","review_comments_url":"https://api.github.com/repos/ocaml/ocaml/pulls/785/comments","review_comment_url":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ocaml/ocaml/issues/785/comments","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/f4f2b25816ec3f29f276057552ce5c96477eacdb","head":{"label":"shindere:merge-otherlibs-systhreads-makefiles","ref":"merge-otherlibs-systhreads-makefiles","sha":"f4f2b25816ec3f29f276057552ce5c96477eacdb","user":{"login":"shindere","id":5877758,"avatar_url":"https://avatars.githubusercontent.com/u/5877758?v=3","gravatar_id":"","url":"https://api.github.com/users/shindere","html_url":"https://github.com/shindere","followers_url":"https://api.github.com/users/shindere/followers","following_url":"https://api.github.com/users/shindere/following{/other_user}","gists_url":"https://api.github.com/users/shindere/gists{/gist_id}","starred_url":"https://api.github.com/users/shindere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindere/subscriptions","organizations_url":"https://api.github.com/users/shindere/orgs","repos_url":"https://api.github.com/users/shindere/repos","events_url":"https://api.github.com/users/shindere/events{/privacy}","received_events_url":"https://api.github.com/users/shindere/received_events","type":"User","site_admin":false},"repo":{"id":57305191,"name":"ocaml","full_name":"shindere/ocaml","owner":{"login":"shindere","id":5877758,"avatar_url":"https://avatars.githubusercontent.com/u/5877758?v=3","gravatar_id":"","url":"https://api.github.com/users/shindere","html_url":"https://github.com/shindere","followers_url":"https://api.github.com/users/shindere/followers","following_url":"https://api.github.com/users/shindere/following{/other_user}","gists_url":"https://api.github.com/users/shindere/gists{/gist_id}","starred_url":"https://api.github.com/users/shindere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/shindere/subscriptions","organizations_url":"https://api.github.com/users/shindere/orgs","repos_url":"https://api.github.com/users/shindere/repos","events_url":"https://api.github.com/users/shindere/events{/privacy}","received_events_url":"https://api.github.com/users/shindere/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/shindere/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":true,"url":"https://api.github.com/repos/shindere/ocaml","forks_url":"https://api.github.com/repos/shindere/ocaml/forks","keys_url":"https://api.github.com/repos/shindere/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/shindere/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/shindere/ocaml/teams","hooks_url":"https://api.github.com/repos/shindere/ocaml/hooks","issue_events_url":"https://api.github.com/repos/shindere/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/shindere/ocaml/events","assignees_url":"https://api.github.com/repos/shindere/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/shindere/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/shindere/ocaml/tags","blobs_url":"https://api.github.com/repos/shindere/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/shindere/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/shindere/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/shindere/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/shindere/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/shindere/ocaml/languages","stargazers_url":"https://api.github.com/repos/shindere/ocaml/stargazers","contributors_url":"https://api.github.com/repos/shindere/ocaml/contributors","subscribers_url":"https://api.github.com/repos/shindere/ocaml/subscribers","subscription_url":"https://api.github.com/repos/shindere/ocaml/subscription","commits_url":"https://api.github.com/repos/shindere/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/shindere/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/shindere/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/shindere/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/shindere/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/shindere/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/shindere/ocaml/merges","archive_url":"https://api.github.com/repos/shindere/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/shindere/ocaml/downloads","issues_url":"https://api.github.com/repos/shindere/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/shindere/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/shindere/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/shindere/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/shindere/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/shindere/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/shindere/ocaml/deployments","created_at":"2016-04-28T13:45:56Z","updated_at":"2016-04-28T13:46:03Z","pushed_at":"2016-08-31T12:36:17Z","git_url":"git://github.com/shindere/ocaml.git","ssh_url":"git@github.com:shindere/ocaml.git","clone_url":"https://github.com/shindere/ocaml.git","svn_url":"https://github.com/shindere/ocaml","homepage":"","size":136687,"stargazers_count":0,"watchers_count":0,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"trunk"}},"base":{"label":"ocaml:trunk","ref":"trunk","sha":"0658e05c5f843831bacc6612db253d5877405192","user":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"repo":{"id":6786166,"name":"ocaml","full_name":"ocaml/ocaml","owner":{"login":"ocaml","id":1841483,"avatar_url":"https://avatars.githubusercontent.com/u/1841483?v=3","gravatar_id":"","url":"https://api.github.com/users/ocaml","html_url":"https://github.com/ocaml","followers_url":"https://api.github.com/users/ocaml/followers","following_url":"https://api.github.com/users/ocaml/following{/other_user}","gists_url":"https://api.github.com/users/ocaml/gists{/gist_id}","starred_url":"https://api.github.com/users/ocaml/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ocaml/subscriptions","organizations_url":"https://api.github.com/users/ocaml/orgs","repos_url":"https://api.github.com/users/ocaml/repos","events_url":"https://api.github.com/users/ocaml/events{/privacy}","received_events_url":"https://api.github.com/users/ocaml/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ocaml/ocaml","description":"The core OCaml system: compilers, runtime system, base libraries","fork":false,"url":"https://api.github.com/repos/ocaml/ocaml","forks_url":"https://api.github.com/repos/ocaml/ocaml/forks","keys_url":"https://api.github.com/repos/ocaml/ocaml/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ocaml/ocaml/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ocaml/ocaml/teams","hooks_url":"https://api.github.com/repos/ocaml/ocaml/hooks","issue_events_url":"https://api.github.com/repos/ocaml/ocaml/issues/events{/number}","events_url":"https://api.github.com/repos/ocaml/ocaml/events","assignees_url":"https://api.github.com/repos/ocaml/ocaml/assignees{/user}","branches_url":"https://api.github.com/repos/ocaml/ocaml/branches{/branch}","tags_url":"https://api.github.com/repos/ocaml/ocaml/tags","blobs_url":"https://api.github.com/repos/ocaml/ocaml/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ocaml/ocaml/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ocaml/ocaml/git/refs{/sha}","trees_url":"https://api.github.com/repos/ocaml/ocaml/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ocaml/ocaml/statuses/{sha}","languages_url":"https://api.github.com/repos/ocaml/ocaml/languages","stargazers_url":"https://api.github.com/repos/ocaml/ocaml/stargazers","contributors_url":"https://api.github.com/repos/ocaml/ocaml/contributors","subscribers_url":"https://api.github.com/repos/ocaml/ocaml/subscribers","subscription_url":"https://api.github.com/repos/ocaml/ocaml/subscription","commits_url":"https://api.github.com/repos/ocaml/ocaml/commits{/sha}","git_commits_url":"https://api.github.com/repos/ocaml/ocaml/git/commits{/sha}","comments_url":"https://api.github.com/repos/ocaml/ocaml/comments{/number}","issue_comment_url":"https://api.github.com/repos/ocaml/ocaml/issues/comments{/number}","contents_url":"https://api.github.com/repos/ocaml/ocaml/contents/{+path}","compare_url":"https://api.github.com/repos/ocaml/ocaml/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ocaml/ocaml/merges","archive_url":"https://api.github.com/repos/ocaml/ocaml/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ocaml/ocaml/downloads","issues_url":"https://api.github.com/repos/ocaml/ocaml/issues{/number}","pulls_url":"https://api.github.com/repos/ocaml/ocaml/pulls{/number}","milestones_url":"https://api.github.com/repos/ocaml/ocaml/milestones{/number}","notifications_url":"https://api.github.com/repos/ocaml/ocaml/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ocaml/ocaml/labels{/name}","releases_url":"https://api.github.com/repos/ocaml/ocaml/releases{/id}","deployments_url":"https://api.github.com/repos/ocaml/ocaml/deployments","created_at":"2012-11-20T22:18:22Z","updated_at":"2016-08-31T03:04:19Z","pushed_at":"2016-08-31T12:36:18Z","git_url":"git://github.com/ocaml/ocaml.git","ssh_url":"git@github.com:ocaml/ocaml.git","clone_url":"https://github.com/ocaml/ocaml.git","svn_url":"https://github.com/ocaml/ocaml","homepage":"","size":247089,"stargazers_count":905,"watchers_count":905,"language":"OCaml","has_issues":false,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":283,"mirror_url":null,"open_issues_count":129,"forks":283,"open_issues":129,"watchers":905,"default_branch":"trunk"}},"_links":{"self":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/785"},"html":{"href":"https://github.com/ocaml/ocaml/pull/785"},"issue":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/785"},"comments":{"href":"https://api.github.com/repos/ocaml/ocaml/issues/785/comments"},"review_comments":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/785/comments"},"review_comment":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ocaml/ocaml/pulls/785/commits"},"statuses":{"href":"https://api.github.com/repos/ocaml/ocaml/statuses/f4f2b25816ec3f29f276057552ce5c96477eacdb"}}}}
{"actor":{"display_login":"shindere"}}