Giter Site home page Giter Site logo

stu's Introduction

 Stu -- Build Automation
=========================

This is Stu, a build tool in the spirit of Make, but with three features
that set it apart:

* Parametrized rules:  Like GNU Make's '%' character, but there can be
  multiple parameters, and they have names.  The syntax is '$NAME',
  where NAME can be any string.  Parameters are injected transparently
  into the commands.
* Dynamic dependencies:  The dependencies of a target can be generated
  dynamically.  When a dependency is enclosed in square brackets, it means
  that that file is built and dependencies are read from within that
  file.
* Parentheses and brackets support concatenation, allowing parametrized
  filenames to be generated in the first place.

In many scenarios, these three features interact judiciously to give
very concise and easy to understand constructs that are nearly
impossible to realize with Make.

See these blog articles for motivation:

https://networkscience.wordpress.com/2018/01/15/the-build-system-stu-in-practice/
https://networkscience.wordpress.com/2017/08/15/an-update-on-the-stu-build-system-stu-2-5/

For documentation, compile and read the manpage, or go directly to:

https://raw.githubusercontent.com/kunegis/stu/master/MANPAGE

For more specific documentation of particular aspects of Stu, see the
files in the doc/ directory.

------
 News
------

- Version 2.6 is out:  canonicalization of filenames is implemented

- Tip:  Set "export STU_OPTIONS=-E" in your .bashrc file to get
  explanations of common error messages in Stu.

See the file 'NEWS' for more news.

--------------------
 Installation Guide
--------------------

Stu is not yet in the main package repositories of common operating systems.
See the file INSTALL for compiling Stu yourself, which is easy: We use make and
make install.  Stu is written in C++14 for POSIX platforms.  You should have no
problem getting it to run on vanilla Linux and other POSIX-compliant platforms.

* See the file 'INSTALL' for compiling Stu
* Package for Arch Linux:  https://aur.archlinux.org/packages/stu-git/

If you're interested in making Stu packages available for other
operating systems and need help, please contact <[email protected]>.

---------
 Use Stu
---------

To use Stu, replace your 'Makefile' with a 'main.stu' file, and instead
of calling 'make', call 'stu'.

To see an example of Stu used in a large data mining project, see the
file 'main.stu' in the KONECT-Analysis project:

https://github.com/kunegis/konect-analysis/blob/master/main.stu

-------
 About
-------

Stu was originally written to accommodate the KONECT project (Koblenz
Network Collection -- http://konect.cc/).  It is thus mainly used for
large data mining projects, where it manages everything from acquiring
data from the web, preprocessing data in various ways, to performing
data mining experiments, to generating plots and compiling the resulting
Latex papers.  It is also used for compiling C/C++ code, for generating
tarballs, for generating websites, and by data scientists and students
associated with Jérôme Kunegis.

The name "Stu" follows the precedents of Make replacements such as Cook,
Bake, and Brew in referring to kitchen-related verbs, and also honors
the author of the original Unix Make, Stuart Feldman.

Stu was initiated by Jérôme Kunegis at the University of Koblenz-Landau
(Germany), was then maintained at the University of Namur (Belgium), and is now
maintained by Jérôme Kunegis privately, with help from other contributors; see
the file AUTHORS.

Stu is free software: you can redistribute it and/or modify it under the
terms of the GNU General Public License as published by the Free
Software Foundation, either version 3 of the License, or (at your
option) any later version.

Stu is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

For support, write to Jérôme Kunegis <[email protected]>, or go to

https://github.com/kunegis/stu

Stu is a voluntary effort.  If Stu is useful to you, please donate:

https://www.paypal.com/donate?hosted_button_id=Q9JY2FB3AFHR6

stu's People

Contributors

aaronmcdaid avatar kunegis avatar yfiua 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

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

stu's Issues

spaces in target names

To create a file with spaces in the name in bash, it is necessary to quote it.

touch "a b"   # a filename with three characters, the middle of which is a space

If there was a make rule to create this file, it could be called in a straighforward way:

make "a b"

But stu is a bit different at the moment (stu 1.10.0). A second level of escaping is needed:

stu `"a b"`

The good news is that the rule for creating the file can be written easily inmain.stu:

# main.stu
"a b" {
    echo hi > "a b"
}

Therefore, the only thing I find strange about stu is the need to apply "double-escaping" when called stu from bash. Is this by design? Or perhaps this will change to match make and other tools?

I'm willing to look into this myself. I'm very interested in stu and C++ is my main language. My approach would be to simply that each element of argv becomes one target filename. But perhaps you have other design reasons?

unicode test fails

(Update: now I've confused myself - maybe there is no issue after all! I'll message again shortly)

 $ ./mktest unicode
__________________________________
 cd unicode
../../stu 
./mktest: *** Test 'unicode' should have returned 0, but returned 1
./mktest: *** Target 'A' was not built
../../stu 
  ./mktest: *** Second invocation did no result in 'Nothing to be done'
__________________________________
./mktest: *** The following tests failed:
unicode

Looking at the test itself, it expects a file to already exist called 世界, which it then copies to jérôme.data and then to A. Is this correct? And therefore should the file 世界 be included in the repository?

I'll submit a pull request, where I'll add a fix, touch 世界

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.