tup build by default?

38 views
Skip to first unread message

Wayne Scott

unread,
Mar 5, 2010, 7:51:11 AM3/5/10
to tup-users
One other thought that I figured should go in a different thread.
(Yes, I am playing backseat architect so feel free to tell me I don't understand.)


Why should I have to type 'tup upd' ?  That is almost the only command you ever need to run, so while isn't upd the default?
I kinda expected just 'tup' to do a build and if not .tup directory is found then it prints a message telling you about 'tup init'.

-Wayne

Mike Shal

unread,
Mar 5, 2010, 10:46:11 AM3/5/10
to tup-...@googlegroups.com

As a first categorization (one I just made up), you can put commands
into three groups:
1) Commands that read/status things (ls, top, du, df)
2) Text-processing commands (wc, sed, awk)
3) Commands that do things (gcc, chmod, mkdir)

If you run them without any arguments, all commands in 1) output
whatever they read, while commands in 2) just block on stdin. In
contrast, commands in 3) just display some usage/help info. It seems
to me tup falls into the third category, though historically make
would put the build system into the first.

Also tup used to have more separate commands, though they've been
consolidated or put into the list of secondary commands (in the man
page).

Plus, you can always alias it to 'tu' or something :)

-Mike

Sam Fredrickson

unread,
Mar 5, 2010, 3:42:42 PM3/5/10
to tup-users
Just make a Makefile like this:

.PHONY: all
all:
@tup upd

And then continue typing "make" as before :)

MIURA Masahiro

unread,
Mar 7, 2010, 11:15:03 PM3/7/10
to tup-users
On Mar 5, 9:51 pm, Wayne Scott <wsc...@gmail.com> wrote:
> Why should I have to type 'tup upd' ?  That is almost the only command you
> ever need to run, so while isn't upd the default?
> I kinda expected just 'tup' to do a build and if not .tup directory is found
> then it prints a message telling you about 'tup init'.

If typing two words for each rebuild is cumbersome for you,
how about typing nothing?
After 'tup config autoupdate 1; tup monitor',
tup will automatically do the rebuild when input files are modified.

(Just in case you overlooked this feature.)

Josh Szepietowski

unread,
Mar 8, 2010, 11:47:09 PM3/8/10
to tup-users
Wow I did miss this feature. What a killer feature! Really this should
be highlighted more clearly as I think a lot of people interested in
rapid iteration would be all over this.

Mike Shal

unread,
Mar 8, 2010, 11:55:16 PM3/8/10
to tup-...@googlegroups.com
On 3/8/10, Josh Szepietowski <goo...@gmail.com> wrote:
> Wow I did miss this feature. What a killer feature! Really this should
> be highlighted more clearly as I think a lot of people interested in
> rapid iteration would be all over this.

I don't use autoupdate much myself, so it could be buggy. One issue I
am aware of is if you modify a file when the monitor is running, then
start the monitor, the autoupdate won't kick off. So you either have
to touch a file, or run 'tup upd' manually in that case until it gets
fixed.

-Mike

Reply all
Reply to author
Forward
0 new messages