From: Ian Jackson Date: Sun, 10 Nov 2019 13:10:29 +0000 (+0000) Subject: WIP X-Git-Tag: subdirmk/0.1~133 X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~ian/git?p=subdirmk.git;a=commitdiff_plain;h=3fc89ce9c0395620a92340e8290c18e156ca367e WIP --- diff --git a/NOTES b/NOTES index b202381..fcb4e95 100644 --- a/NOTES +++ b/NOTES @@ -1,14 +1,20 @@ -&= => subdir -&_ => subdir_ -&/ => subdir/ -&CAPS => subdir_CAPS -&lc => subdir/lc - -&.= &._ &./ &.CAPS &.lc => $(top_srcdir)/subdir -&:= &:_ &:/ &:CAPS &:lc => $(abs_top_srcdir)/subdir +&= => subdir +&_ => subdir_ +&/ => subdir/ +&CAPS => subdir_CAPS _ counts +&lc => subdir/lc _ counts + +&,= &,_ &,/ &,CAPS &,lc prefixes $(top_srcdir)/subdir +&;= &;_ &;/ &;CAPS &;lc prefixes $(abs_top_srcdir)/subdir + +&. => $(top_srcdir) +&: => $(abs_top_srcdir) + & thing thing => like &thing &thing (until EOL) + (edits only `thing's which are CAPS or lc + and follow a space) -&& => & +&& => & &! spc disables & *until* EOL @@ -22,3 +28,7 @@ eg notably eg &!@@@ @@@ is recognised instead of & @@@!& go back to & + +&TARGETS[_things] is handled specially + must be spelled precisely this way + if no _things, means _all diff --git a/Subdir.mk.in b/Subdir.mk.in new file mode 100644 index 0000000..792d600 --- /dev/null +++ b/Subdir.mk.in @@ -0,0 +1 @@ +# diff --git a/build-aux/subdirmk-setup b/build-aux/subdirmk-setup new file mode 100644 index 0000000..9f3c8c6 --- /dev/null +++ b/build-aux/subdirmk-setup @@ -0,0 +1,32 @@ +#!/usr/bin/perl -w +# +# $(srcdir)/build-aux/subdirmk-setup SUBDIR... +# +# generates +# Subdir.mk.tmp +# Makefile.tmp + +use strict; + +our @allsubdirs = @ARGV; + +sub write_makefile () { + start_output_file("Makefile"); + print O <