Why does tup need one Tupfile per directory? - build-system

I've read a lot about the tup build system.
In many places, it is said that tup "does not support recursive rules" and that you need to have one Tupfile per directory. Yet I have not seen an official statement or explanation.
Is the above claim correct?
If yes, why, and for which kind of task is this problematic? An example would be nice.

It is worth noting that currently a Tupfile can create files in a different directory. You could always read files from different directory, so currently you can have a single Tupfile for the whole project.
Some more info here: https://groups.google.com/d/msg/tup-users/h7B1YzdgCag/qsOpBs4DIQ8J (a little outdated) + https://groups.google.com/d/msg/tup-users/-w932WkPBkw/7ckmHJ9WUCEJ (new syntax to use the group as input)
If you use the new LUA parser you can also have a "default" Tupfile - see here http://gittup.org/tup/lua_parser.html and check info about Tupdefault.lua

Some of the answers have mentioned already that the limitation really is one Tupfile per directory where you want output files, instead of one Tupfile per directory. In a recent commit, this limitation has been relaxed and tup allows you to place output files also in subdirectories of the Tupfile.
In addition, with variants, it is possible to generate output files anywhere in the build tree.

The official statement can be found in tup manual: http://gittup.org/tup/manual.html
You must create a file called "Tupfile" anywhere in the tup hierarchy
that you want to create an output file based on the input files. The
input files can be anywhere else in the tup hierarchy, but the output
file(s) must be written in the same directory as the Tupfile.
(Quotation is the 1st paragraph from the section TUPFILES in the manual)
AFAIK, it is a limitation which has something to do with the way how tup stores dependencies in the .tup subdir but I don't know details.

Related

purpose of ~/.emacs.d/auto-save-list/

A directory titled auto-save-list appeared in my .emacs.d folder. In my init.el file, I did not explicitly mention I want this folder to be made. What is the purpose of this folder? I noticed it seems to always be empty: files being auto-saved (starting with #) appear wherever the original file being edited is, not in the auto-save-list directory.
If you search the manual or its index for auto-save-list you will find:
Emacs records information about interrupted sessions in files named
‘.saves-PID-HOSTNAME’ in the directory ‘~/.emacs.d/auto-save-list/’.
This directory is determined by the variable
‘auto-save-list-file-prefix’. If you set ‘auto-save-list-file-prefix’
to ‘nil’, sessions are not recorded for recovery.
– C-hig (emacs)Recover RET
I did not explicitly mention I want this folder to be made.
Emacs and elisp libraries in general write to ~/.emacs.d/ when they need to save data. That's one of the purposes of this directory -- to provide a common place for such files to be written to; and this typically happens without asking explicit permission (although it's also pretty common for you to be able to customize the filename in question if you so wish).
phils already answered the specific question, but to answer the more general question of what to do about miscellaneous files automatically created by Emacs, check out the no-littering package.
Auto save files (the ones with '#') are not handled by no-littering, but the readme gives a work around for those if you wish.

TYPO3 Filecollection, Type "Folder from Storage" - Recursion possible?

is there a way to get a file list recursively based on one file collection that points to a directory in fileadmin?
Currently I only got it to work with files directly in that directory, not also with files in sub-directories of that directory.
So instead of setting lots of file collections for each (sub directory)
I'd like to set only the "top"level directory (here "Kurs77") and have the files, even from sub directories, displayed.
Reason is, editors may add an unknown amount of (sub)sdirectories, and I'd like to have the files automagically displayed in the file list in the front end -- without the need to create an increasing amount of file collections.
cheers,
Tom
it seems that this is a missing feature. Check out https://forge.typo3.org/issues/61238. It seems that the underlaying API is able to do that.
So one solution would be to use TypoScript to make that work.
To give the correct answer now: The recursive option is of course available but it is part of the sys_file_collection record.
In TYPO3 9 this is working out of the box. pity is not showing folder as title, but recursive works:

Documentation for nautilus and GIO's .hidden file feature?

I just discovered some mentions of how nautilus used to read files named .hidden and hide files matching the patterns listed in them, and at some point that feature was moved to GIO g_file_info_get_is_hidden. However, I haven't been able to get it to work. If I put the exact name of a file into .hidden, it does get hidden, but I'd really like to be able to use a pattern. I can't find any solid or recent documentation about how this feature is supposed to work.
I'd particularly like to hide files matching hg-checkexec-*. Mercurial running under Emacs periodically creates bunches of these temporary files and they gum up my nautilus view.
Is this feature documented anywhere? How is it supposed to work?
Looking at the code, .hidden files as implemented in GIO support one filename per line, with no support for patterns. A .hidden file cannot list files in subdirectories — only those in the same directory.
I don’t know of any documentation about the feature. Please file a bug about adding it.
As a complement to Philip Withnall's answer, I've dived further into the source code, specifically the functions read_hidden_file() and file_is_hidden():
read_hidden_file() basically parses the .hidden in a directory and stores each line in as a key in a GLib HashTable object.
The object is created using g_hash_table_new_full() with parameters g_str_hash, g_str_equal, g_free, NULL. This mean keys are plain strings with comparison being a plain (case-sensitive) string equality, so no globs, regex or any patterns support.
It is populated using g_hash_table_add(), so not used as a key/value pair table but rather as a plain set, with keys being the elements themselves.
file_is_hidden() is called for each content (file or sub-directory) in a given directory. It uses g_hash_table_contains() to check if the file's basename is a key in above object, so no pattern search whatsoever.
So, as Phillip concluded, it seems there is indeed no support for any kind of globs, regexes or pattern seach in .hidden files. I would also die for a .gitignore-like syntax.

Is there a limited number of merge levels html help can retain index/search items for?

I created a RoboHelp html help project that merges three projects into a master project. Indexes and search terms work fine in the Master.chm. However, this Master.chm gets merged into another "Super-Master" application that my application is a plug-in for. After that merge, the sub help .chms items do NOT appear in index and search does not find them. Is there a limited number of "levels" merged help will allow index/search to work? Or is it more likely there is some other problem (ie. Super project doesn't use Binary index) or something?
Mostly it's the binary index. Please check following list of general tips from Rob Chandler's website:
All CHM files should be installed to the same folder.
You can install any number of Slave CHMs but the Master CHM must always be installed if you want the slaves to reference the master
Table Of Contents.
Each project must enable the "Binary Index" in order for index merge to work.
A binary index will not be created if you select 1.0 as the version in the Compatibility box > Compiler tab > Project Options
dialog or if the Create a binary index check box is cleared.
Rick Stone reminded that the Master index must contain at least one index term in order for the merge to work.
Similarly "Binary TOC" must be disabled otherwise merge will not work.
Include HHC works recursively, so you can have groups of optional modules. I.E. HHC files including HHC files that include other HHC
files and so on.
Merging of Index and ALink keywords. This does not work recursively, because they do not know about the TOC inclusions. If
you want to have a unified Index or cross-module ALinks you have to
tell every CHM file which others might be available belonging to the
same project. Again: Do not merge yourself.
Another idea: If you have identical keywords from several files, HTML Help uses the <title> tags in the list of targets. We extended
the title of each topic with the title of the module itself (the
"book"), leading to: <title>This fine topic title (This fine book
title)</title>.
An include statement in a HHC file can refer to a standalone HHC file. The HHC file should be placed in the same folder as the CHM
files.

smlnj rephrased question for listdir(filename, directoryname)

i am a newbie learning sml and the question i am thrown with involves IO functions that i have no idea how it works even after reading it. Here is the 2 questions that i really need help with to get me started, please provide me with codings and some explaination, i will be able to trial and error with the code given for the other questions.
Q1) listdir(filename,directoryname), which given the name of a directory, list its contents in a text file. The listing is in a form that makes it easy to seperate filenames, dates and sizes from each other. (similar to what msdos does with "dir" but instead of just listing it out, it places all the files and details into a text file.
Q2) readlist(filename) which reads a list of filenames (each of which were produced by listdir in (Q1) and combines them into one large list. (reads from the text file in Q1 and then assigning the contents into 1 big list containing all the information)
Thing is, i only learned from the lecturer in school on the introduction section, there isnt even a system input or output example shown, not even the "use file" function is taught. if anyone that knows sml sees this, please help. Thanks to anyone who took the effort helping me.
Thanks for the reply, current I am using SMLNJ to try and do this. Basically, Q1 requires me to list the directory's files of the "directoryname" provided into a text file in "filename". The Q2 requires me to read from the "filename" text file and then place the contents into one large list.
Duplicate of: smlnj listdir
As a hint I will say that you have to make use of these functions:
OS.FileSys.OpenDir(directoryname) - this will open directory stream for you (Q1)
TextIO.openOut(filename) - this will open the file stream (Q2)
TextIO.openIn(filename)- this will open the file (Q2)
If you are stuck and dont' know how to do the progs then I will post the full code here, but i suggest you first give a try.
zubair sheikh