From 61368ef5d32938a1951437bfb5dead636d5a4c30 Mon Sep 17 00:00:00 2001 From: Jeremie Dimino Date: Thu, 15 Dec 2016 11:20:46 +0000 Subject: [PATCH] 114.20+69 --- .gitignore | 10 ++----- META.ab | 9 ------ Makefile | 66 ++++++-------------------------------------- _oasis | 37 ------------------------- _tags | 8 ------ as_ppx/ppx.ml | 1 - configure | 5 ---- descr | 2 -- install.ml | 10 ------- myocamlbuild.ml | 14 ---------- opam => ppx_let.opam | 14 +++++----- setup.ml | 6 ---- src/jbuild | 7 ++--- test/jbuild | 2 +- 14 files changed, 22 insertions(+), 169 deletions(-) delete mode 100644 META.ab delete mode 100644 _oasis delete mode 100644 _tags delete mode 100644 as_ppx/ppx.ml delete mode 100755 configure delete mode 100644 descr delete mode 100644 install.ml delete mode 100644 myocamlbuild.ml rename opam => ppx_let.opam (65%) delete mode 100644 setup.ml diff --git a/.gitignore b/.gitignore index 8dac9f323..00d93a635 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,3 @@ -_build/ -/setup.data -/setup.log -/*.exe -/*.docdir -/*.native -/*.byte +_build +*.install + diff --git a/META.ab b/META.ab deleted file mode 100644 index 6b930b3f2..000000000 --- a/META.ab +++ /dev/null @@ -1,9 +0,0 @@ -version = "$(pkg_version)" -description = "Monadic let-bindings" -requires = "compiler-libs.common ppx_core ppx_driver" -archive(ppx_driver, byte ) = "ppx_let.cma" -archive(ppx_driver, native) = "ppx_let.cmxa" -plugin(ppx_driver, byte ) = "ppx_let.cma" -plugin(ppx_driver, native) = "ppx_let.cmxs" -exists_if = "ppx_let.cma" -ppx(-ppx_driver,-custom_ppx) = "./ppx" diff --git a/Makefile b/Makefile index 8b90c0267..03bd903ea 100644 --- a/Makefile +++ b/Makefile @@ -1,68 +1,18 @@ -# Generic Makefile for oasis project - -SETUP := setup.exe NAME := ppx_let -PREFIX ?= $(shell grep ^prefix= setup.data | cut -d\" -f 2) # Default rule -default: build +default: + jbuilder build-package $(NAME) -setup.exe: _oasis setup.ml - ocamlfind ocamlopt -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup.ml || \ - ocamlfind ocamlc -o $@ -linkpkg -package ocamlbuild,oasis.dynrun setup.ml || true - for f in setup.*; do [ $$f = $@ -o $$f = setup.ml ] || rm -f $$f; done - -build: $(SETUP) setup.data - ./$(SETUP) -build $(BUILDFLAGS) - $(MAKE) $(NAME).install - -doc: $(SETUP) setup.data build - ./$(SETUP) -doc $(DOCFLAGS) - -test: $(SETUP) setup.data build - ./$(SETUP) -test $(TESTFLAGS) - -all: $(SETUP) - ./$(SETUP) -all $(ALLFLAGS) - $(MAKE) $(NAME).install - -$(NAME).install: install.ml setup.log setup.data - ocaml -I "$(OCAML_TOPLEVEL_PATH)" install.ml - -install: $(NAME).install +install: opam-installer -i --prefix $(PREFIX) $(NAME).install -uninstall: $(NAME).install +uninstall: opam-installer -u --prefix $(PREFIX) $(NAME).install -reinstall: $(NAME).install - opam-installer -u --prefix $(PREFIX) $(NAME).install &> /dev/null || true - opam-installer -i --prefix $(PREFIX) $(NAME).install +reinstall: uninstall reinstall -bin.tar.gz: $(NAME).install - rm -rf _install - mkdir _install - opam-installer -i --prefix _install $(NAME).install - tar czf bin.tar.gz -C _install . - rm -rf _install +clean: + rm -rf _build -bin.lzo: $(NAME).install - rm -rf _install - mkdir _install - opam-installer -i --prefix _install $(NAME).install - cd _install && lzop -1 -P -o ../bin.lzo `find . -type f` - rm -rf _install - -clean: $(SETUP) - ./$(SETUP) -clean $(CLEANFLAGS) - -distclean: $(SETUP) - ./$(SETUP) -distclean $(DISTCLEANFLAGS) - -configure: $(SETUP) - ./$(SETUP) -configure $(CONFIGUREFLAGS) - -setup.data: $(SETUP) - ./$(SETUP) -configure $(CONFIGUREFLAGS) - -.PHONY: default build doc test all install uninstall reinstall clean distclean configure +.PHONY: default install uninstall reinstall clean diff --git a/_oasis b/_oasis deleted file mode 100644 index d8c52e993..000000000 --- a/_oasis +++ /dev/null @@ -1,37 +0,0 @@ -OASISFormat: 0.4 -OCamlVersion: >= 4.03.0 -FindlibVersion: >= 1.3.2 -Name: ppx_let -Version: 114.08+89 -Synopsis: Monadic let-bindings -Authors: Jane Street Group, LLC -Copyrights: (C) 2015-2016 Jane Street Group LLC -Maintainers: Jane Street Group, LLC -License: Apache-2.0 -LicenseFile: LICENSE.txt -Homepage: https://github.com/janestreet/ppx_let -Plugins: StdFiles (0.3), DevFiles (0.3) -XStdFilesAUTHORS: false -XStdFilesREADME: false -BuildTools: ocamlbuild -BetaFeatures: section_object -AlphaFeatures: ocamlbuild_more_args -XOCamlbuildPluginTags: package(js-build-tools.ocamlbuild_goodies) -FilesAB: META.ab -Description: - Part of the Jane Street's PPX rewriters collection. - -Library ppx_let - Path: src - Pack: false - Modules: Ppx_let - BuildDepends: compiler-libs.common, - ppx_core, - ppx_driver - -Executable ppx - Path: as_ppx - MainIs: ppx.ml - CompiledObject: best - BuildDepends: ppx_let, - ppx_driver diff --git a/_tags b/_tags deleted file mode 100644 index eed4cdef9..000000000 --- a/_tags +++ /dev/null @@ -1,8 +0,0 @@ -<**/*.ml{,i}>: warn(-40), no_alias_deps -<**/*>: thread -# This prevents the implicit addition of -ppx options by ocamlfind -<**/*>: predicate(custom_ppx) -: predicate(ppx_driver) -: linkall -# OASIS_START -# OASIS_STOP diff --git a/as_ppx/ppx.ml b/as_ppx/ppx.ml deleted file mode 100644 index e0c207cce..000000000 --- a/as_ppx/ppx.ml +++ /dev/null @@ -1 +0,0 @@ -Ppx_driver.run_as_ppx_rewriter () diff --git a/configure b/configure deleted file mode 100755 index 3234be22e..000000000 --- a/configure +++ /dev/null @@ -1,5 +0,0 @@ -#!/bin/sh - -# OASIS_START -make configure CONFIGUREFLAGS="$*" -# OASIS_STOP diff --git a/descr b/descr deleted file mode 100644 index fad50b245..000000000 --- a/descr +++ /dev/null @@ -1,2 +0,0 @@ -Monadic let-bindings -Part of the Jane Street's PPX rewriters collection. diff --git a/install.ml b/install.ml deleted file mode 100644 index 86d1afc2b..000000000 --- a/install.ml +++ /dev/null @@ -1,10 +0,0 @@ -#use "topfind";; -#require "js-build-tools.oasis2opam_install";; - -open Oasis2opam_install;; - -generate ~package:"ppx_let" - [ oasis_lib "ppx_let" - ; file "META" ~section:"lib" - ; oasis_exe "ppx" ~dest:"../lib/ppx_let/ppx" - ] diff --git a/myocamlbuild.ml b/myocamlbuild.ml deleted file mode 100644 index 326d29383..000000000 --- a/myocamlbuild.ml +++ /dev/null @@ -1,14 +0,0 @@ -(* OASIS_START *) -(* OASIS_STOP *) -# 3 "myocamlbuild.ml" - -module JS = Jane_street_ocamlbuild_goodies - -let dev_mode = true - -let () = - Ocamlbuild_plugin.dispatch (fun hook -> - JS.alt_cmxs_of_cmxa_rule hook; - JS.pass_predicates_to_ocamldep hook; - if dev_mode && not Sys.win32 then JS.track_external_deps hook; - dispatch_default hook) diff --git a/opam b/ppx_let.opam similarity index 65% rename from opam rename to ppx_let.opam index 612435f3a..5328321e2 100644 --- a/opam +++ b/ppx_let.opam @@ -6,16 +6,16 @@ bug-reports: "https://github.com/janestreet/ppx_let/issues" dev-repo: "https://github.com/janestreet/ppx_let.git" license: "Apache-2.0" build: [ - ["./configure" "--prefix" prefix] - [make] + ["jbuilder" "build-package" "ppx_let" "-j" jobs] ] depends: [ - "ocamlbuild" {build} - "oasis" {build & >= "0.4"} - "ocamlfind" {build & >= "1.3.2"} - "js-build-tools" {build} + "jbuilder" "ppx_core" "ppx_driver" ] available: [ ocaml-version >= "4.03.0" ] -conflicts: [ "oasis" {= "0.4.7"} ] +descr: " +Monadic let-bindings + +Part of the Jane Street's PPX rewriters collection. +" diff --git a/setup.ml b/setup.ml deleted file mode 100644 index f6b6bc3b8..000000000 --- a/setup.ml +++ /dev/null @@ -1,6 +0,0 @@ -(* OASIS_START *) -open OASISDynRun;; -open OASISTypes;; -(* OASIS_STOP *) - -let () = setup () diff --git a/src/jbuild b/src/jbuild index cacfa4fb0..3137f410f 100644 --- a/src/jbuild +++ b/src/jbuild @@ -1,7 +1,6 @@ (library ((name ppx_let) (public_name ppx_let) - (public_release ((kind ppx_rewriter))) - (wrapped false) - (libraries (ocamlcommon ppx_core ppx_driver)) - (preprocess ((no_preprocessing All))))) + (kind ppx_rewriter) + (libraries (compiler-libs.common ppx_core ppx_driver)) + (preprocess no_preprocessing))) diff --git a/test/jbuild b/test/jbuild index 94cb75834..fb709e3f1 100644 --- a/test/jbuild +++ b/test/jbuild @@ -1,6 +1,6 @@ (executables ((names (test)) - (preprocess (((pps (ppx_let)) All))))) + (preprocess (pps (ppx_let))))) (toplevel_expect_tests ((libraries (ppx_let))))