chiark / gitweb /
subdirmk/*: Some simple whitespace cleanups
[subdirmk.git] / subdirmk / README
index d2b3c469e07986139a6e4dd9aa8c56c6ece2ff9d..9a53f93bbca48db9d27c631351fe95855a58532d 100644 (file)
@@ -14,7 +14,7 @@ style is not very ergonomic.  The main difficulties are:
   - constantly having to write out long file and directory names
   - the lack of a per-directory make variable namespace means
     long make variables (or namespace clashes)
-  - it is difficult to arrange that one can cd to a subdirectory 
+  - it is difficult to arrange that one can cd to a subdirectory
     and say `make all' and have something reasonable happen
     (to wit, build an appropriate subset)
 
@@ -151,8 +151,8 @@ we describe the expansion at the top level, which is often a special
 case (in general in variable names we call that TOP rather than the
 empty string).
 
-&CAPS          =>      sub_dir_CAPS                    or TOP_CAPS
-&lc            =>      sub/dir/lc                      or lc
+&CAPS          =>      sub_dir_CAPS                    or TOP_CAPS
+&lc            =>      sub/dir/lc                      or lc
        Here CAPS is any ASCII letter A-Z and lc is a-z.
        The assumption is that filenames are usually lowercase and
        variables usually uppercase.  Otherwise, use another syntax:
@@ -239,6 +239,33 @@ project) are best avoided.
 If you name your variables in ALL CAPS and your subdirectories in
 lower case with `-' rather than `_', there will be no confusion.
 
+Incorporating this into your project
+------------------------------------
+
+Use `git-subtree' to merge the subdirmk/ directory.  You may find it
+useful to symlink the DEVELOPER-CERTIFICATE file (git can store
+symlinks as symlinks - just `git add' the link).  And you probably
+want to mention the situation in your top-level COPYING.
+
+Symlink autogen.sh into your project toplevel.
+
+In your configure.ac, say
+
+  m4_include([subdirmk/subdirmk.ac])
+  SUBDIRMK_SUBDIRS([...list of subdirectories in relative syntax...])
+
+Write a Subdir.sd.mk in each directory.  The toplevel one should
+probably contain:
+
+  include subdirmk/usual.mk
+  include subdirmk/regen.mk
+
+Write a Perdir.sd.mk in the toplevel, if you want.  It should probably
+have:
+
+  &:include subdirmk/cdeps.sd.mk
+  &:include subdirmk/clean.sd.mk
+
 
 Legal information
 -----------------