drwilly / redo Goto Github PK
View Code? Open in Web Editor NEWAn implementation of djb's redo
License: GNU General Public License v3.0
An implementation of djb's redo
License: GNU General Public License v3.0
You might use some/all of these as default values in your config.sh:
--- config.sh
+++ config.sh
@@ -1,7 +1,7 @@
-PREFIX="$HOME"
+PREFIX="$HOME/prefix/credo"
CC="clang"
CFLAGS="-g -O0 -Wall -pedantic"
-INC=""
-LIBPATH=""
+INC="-I$PREFIX/include"
+LIBPATH="-L$PREFIX/lib -Wl,-rpath=\\\$ORIGIN/../lib"
One feature of "modern" build systems is the ability to watch for changes in source files, then automatically invoke the build system in response. This is generally done via inotify, at the cost of making it linux-specific.
How do you feel about this feature? Would it fit better in this repo, or a fork, or as some kind of credo extension? Do you care about macos/windows support?
A bit of research on how this might be implemented in a skalibs-based project:
Maybe I'm using this thing wrong, but I don't think I am. The below behavior feels wrong. Just because 1
is no longer in my $PWD it's being considered out of date by redo.
$ mkdir demo && cd demo
$ echo 'set -x && echo 1' > 1.do
$ chmod 755 1.do
$ redo-ifchange 1
redo 1.do:1 ...
+ echo 1
$ redo-ifchange 1
$ redo-ifchange 1
$ cd ..
$ redo-ifchange demo/1
redo 1.do:demo/1 ...
+ echo 1
$ redo-ifchange demo/1
redo 1.do:demo/1 ...
+ echo 1
$ redo-ifchange demo/1
redo 1.do:demo/1 ...
+ echo 1
Could you list my redo implementation in Bourne Shell under “similar work”? It has no dependencies outside of coreutils or BusyBox and is fast enough for daily use: http://news.dieweltistgarnichtso.net/bin/redo-sh.html
I think this shows everything you'd need to reproduce the issue:
[Tue 07-25 11:53:55AM]$ ./bootstrap/redo clean install
redo clean.do:clean ...
redo install.do:install ...
redo install.do:install redo.do:redo ...
redo install.do:install redo.do:redo ld.do:ld ...
redo install.do:install redo.do:redo _.o.do:checksum.o ...
redo install.do:install redo.do:redo _.o.do:checksum.o cc.do:cc ...
redo install.do:install redo.do:redo _.o.do:environment.o ...
redo install.do:install redo.do:redo _.o.do:options.o ...
redo install.do:install redo.do:redo _.o.do:path.o ...
redo install.do:install redo.do:redo _.o.do:prereqs.o ...
redo install.do:install redo.do:redo _.o.do:reporting.o ...
redo install.do:install redo.do:redo _.o.do:stralloc_string.o ...
redo install.do:install redo.do:redo _.o.do:redo.o ...
src/redo.c:194:21: error: invalid operands to binary expression ('void' and 'int')
if(fd_close(outfd) == -1) {
~~~~~~~~~~~~~~~ ^ ~~
src/redo.c:204:20: error: invalid operands to binary expression ('void' and 'int')
if(fd_close(dbfd) == -1) {
~~~~~~~~~~~~~~ ^ ~~
2 errors generated.
redo install.do:install redo.do:redo _.o.do:redo.o _.o.do returned 1
redo install.do:install redo.do:redo redo.do returned 1
redo install.do:install install.do returned 1
[Tue 07-25 11:54:10AM]$ clang --version
clang version 4.0.0-1ubuntu1 (tags/RELEASE_400/rc1)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
[Tue 07-25 11:54:15AM]$ git log -1
commit c78df25809bab3c66a95b761a8adfb1d42978145 (HEAD -> master, origin/master, origin/HEAD)
Author: Wilke Schwiedop <[email protected]>
Date: Mon Apr 17 10:50:08 2017 +0200
adjustments for skalibs 2.5.0.0
[Tue 07-25 11:57:19AM]$ ls ~/prefices/credo/lib/
libskarnet.so libskarnet.so.2.5 libskarnet.so.2.5.1 libskarnet.so.2.5.1.1 skalibs
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.