Giter VIP home page Giter VIP logo

foretspaisibles / bsdowl Goto Github PK

View Code? Open in Web Editor NEW
102.0 102.0 6.0 2.18 MB

A highly portable build system targeting modern UNIX systems. Supports C, OCaml, TeX, METAPOST, NOWEB, M4, and more. Based on BSD Make.

Home Page: http://michipili.github.io/bsdowl/

License: Other

Shell 10.00% Makefile 63.53% CSS 2.84% TeX 6.95% Emacs Lisp 0.70% C 3.14% Assembly 0.11% OCaml 3.77% Python 0.74% Awk 0.14% Perl 0.18% M4 4.23% sed 0.23% Roff 2.62% Perl 6 0.73% D 0.08%

bsdowl's People

Contributors

al-x avatar foretspaisibles avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bsdowl's Issues

Cannot install under Cygwin

Trying to install bsdowl on Cygwin fails with the following error:

sh: -c: line 0: syntax error near unexpected token `('
sh: -c: line 0: `env -i PATH=[...] bmake   -f /dev/null -V MAKEOBJDIR nothing'

The errors seems to be produced by the file bps.objdir.mk.

Phony names for OCaml options

We want a broader support of compiler options in our OCaml supporting modules. Available options should also get better names. Things under consideration:

  • Define phony flags like USE_PROFILER and so on
  • Rename the TARGET variable and choose other suffixes
  • Rework the logic of flags and document it in a sensible way

Use of `-where` with `ocamlfind`

The ocaml.dirs.mk module relies on OCAMLCI to find -where OCaml is installed. This breaks with some packages.

For instance the threads package needs the -thread or -vmthread option.

Encoding the relevant directory at compile time will not do, because it would forbid the use of other compiler toolchains as the one choosed at configuration time.


Configure external utilities

We currently hard code some utilities name in our definitions. It is better to let the user configure them. These utilities are:

  • OCaml compilers in ocaml/*, probably ocaml.tools.mk
  • ocamllex, ocamlyacc, ocamlfind, ocamldep, ocamldoc in ocaml/*
  • tidy in www/www.sgml.mk
  • onsgmls in www/www.sgml.mk

Rework project tools

Decide if PACKAGE is always more appropriate than PROJECT or if we just keep the name PACKAGE to provide some similarity with GNU Autotools.

Also, it could be appropriate to rename PROJECTAUTHOR to PROJECTOFFICER, because the PROJECTAUTHOR does not need to be the sole author of the project.


Usage of `mp2pdf`

When using the mp2pdf support command, a noisy message

Usage: file [-bchikLlNnprsvz0] [--apple] [--mime-encoding] [--mime-type]
        [-e testname] [-F separator] [-f namefile] [-m magicfiles] file ...
   file -C [-m magicfiles]
   file [--help]

is printed.


Bitrot

We want to get rid of bitrot in the repository. Here is a list of things to review:

  • Library/Ancillary There is some old scripts there. Determine what is obsolete, what has some value, and leave only up to date and useful scripts there.
  • Website is now a wiki, but it could be recycled as an example of a static website.
  • Library/Template Must be cleaned up.
  • snippets and rox should probably be dropped
  • test must be reworked.

Conceptual description

We need to carefully describe the following concepts to achieve a better description and organisation of bsdowl at the project level:

  • project, this is the largest unit for the organisation of builds;
  • artifact, this is the smallest unit for the organisation of builds;
  • library, this is an external dependency to use in the project or in an artifact;
  • framework, a glorified library;
  • package, a synonymous of project used by the Autoconf tools;
  • build configuration;
  • build architecture;
  • knobs and features.

Project overview

The project is moderately complex so it could be useful to make its organisation clearer.

Actions to be taken are not definitively set but here are a few directions:

  • Prepare a bird's eyes view of modules and provided functionality, targeted audience
  • Review all files and classify them as private if they are for developers or public if they are for end-users
  • If appropriate, indicate how to customise public files.

Minimal setup guide for the production of TeX documents

We started bsdowl quite a long time ago — pre Latin Modern era — when PDFs were not the preferred way to render TeX documents, because of the lack of adequate Type 3 fonts. We can accommodate bsdowl to prefer PDFs over DVIs by setting

TEXDEVICE=pdf

in your environment — see the documentation of your shell or Chapter 6 of UNIX Power Tools.

This should be documented in the setup guide. Moreover we could decide to let TEXDEVICE=pdf be the implicit setting in the next major release.

Translate and improve documentation

Documentation is available as a set SGML files used to generate a static website. We want to translate it to markdown because:

  • It is easier to write
  • It is easier to read, even in raw form
  • It is well integrated in the brave new web

This documentation is targeted at users instead of developers. Start with small useful examples and add feature once at a time. Do not stack features, but return to the initial small example (but advertise possible interoperability).

** Item ** ** Status **
** Preparation of documents with TeX **
Getting started DONE
Document split across several directories DONE
Bibliography DONE
Figures with METAPOST DONE
Generating tables with a third party tool DONE
** Preparation of OCaml programs ** -
Preparing a simple program DONE
Preparing a simple library DONE
Native code and byte code DONE
Documentation generator DONE
Toplevel generator DONE
Profiling DONE
Debugging DONE
Lex & Yacc DONE
Subdirectories DONE

** Project **
Delegating to subdirectories | -
Making clean, distclean and realclean | -
Preparing and signing tarballs | -
Uploading tarballs | -
** Development of scripts ** |
** Preparation of static websites with ONSGMLS ** |
* Development of TeX macros with NOWEB* |
** Maintenance of configuration files ** |


Translate and standardise comments

Comments lack uniformity in two ways:

  • French and English are happily blended together
  • Module synopsis, variable description and so on are not consistently formatted

An almost tolerable example is what we might see in

bsdmakepscripts/ocaml/ocaml.odoc.mk

We need to

  • Review all files and translate them to English
  • Decide how a useful synopsis looks like
  • Decide if a more formal description of products and prerequisites could be useful
  • Review all files and describe the most important target they define
  • Review all files and describe the most important variables they define or use

To keep track of the progress, we add cookies in file headers:

# Cookie: EN SYNOPSIS TARGET VARIABLE

and remove them (one word at a time) when some work on that file is finished. It is thus very easy to track task's progress by grep-awk-ing around.


Support build profile

We want to support several build profiles. A build profile defines a set of compilation options for a project, it should be represented as a Makefile that is included in the main Makefile. Each build profile should configure MAKEOBJDIR according to its name, so that it is easy to switch.

Powerful ocaml.toplevel.mk

We need a powerful ocaml.toplevel.mk modules that eases the following tasks:

  1. Create a toplevel that automatically adds some paths to the include directories.
  2. Create a toplevel that automatically opens some modules.
  3. Create a toplevel that automatically install some custom printers.
  4. Use the toplevel from other parts of the project, to run tests and scripts.

Points 1, 2 and 3 do not need to be solved purely in ocaml.toplevel.mk but it might be useful to define some cooperation guidelines between the toplevel custom code and ocaml.toplevel.mk.

The toplevel should work identically when it is installed and when it is run inside a developper's subshell (see bps.project.mk).


Parallel mode is tripped by Lexers and Parsers

Make's parallel mode (-j) trips over one's foot when building OCaml projects containing lexers and or parsers.

A testcase is test/ocaml/basic:

$ cd test/ocaml/basoc
$ make realclean
$ make depend
$ make build -j 2

make build -j2
ocamlc -c -o main.cmo main.ml
ocamlc -c -o basic_types.cmo basic_types.ml
ocamlc -c -o basic_lexer.cmi basic_lexer.mli
ocamlc -c -o basic_parser.cmi basic_parser.mli
File "basic_lexer.mli", line 1, characters 29-47:
Error: Unbound module Basic_parser
*** [basic_lexer.cmi] Error code 2
1 error
Exit 2

$ cat .depend 
main.cmo :
main.cmx :
basic_types.cmo :
basic_types.cmx :
basic_parser.cmo : basic_types.cmo basic_parser.cmi
basic_parser.cmx : basic_types.cmx basic_parser.cmi
basic_lexer.cmo : basic_parser.cmi basic_lexer.cmi
basic_lexer.cmx : basic_parser.cmx basic_lexer.cmi

Probably, the generation rules in ocaml.yacc.mk or ocaml.lex.mk try to be smarter than they actually are.


Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.