chiark / gitweb /
WIP NEW STYLE
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 Nov 2019 12:43:18 +0000 (12:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 10 Nov 2019 12:43:18 +0000 (12:43 +0000)
NOTES [new file with mode: 0644]
lib/Subdir.mk.in
lib/t/Subdir.mk.in
src/Subdir.mk.in

diff --git a/NOTES b/NOTES
new file mode 100644 (file)
index 0000000..b202381
--- /dev/null
+++ b/NOTES
@@ -0,0 +1,24 @@
+&=             =>      subdir
+&_             =>      subdir_
+&/             =>      subdir/
+&CAPS          =>      subdir_CAPS
+&lc            =>      subdir/lc
+
+&.= &._ &./ &.CAPS &.lc        =>      $(top_srcdir)/subdir
+&:= &:_ &:/ &:CAPS &:lc        =>      $(abs_top_srcdir)/subdir
+& thing thing          =>      like &thing &thing (until EOL)
+
+&&             =>      &
+
+&! spc         disables & *until* EOL
+
+&!STUFF                STUFF is recognised instead of & (beyond EOL)
+               STUFF is either all punct or all alphanum (incl _)
+               any lwsp after STUFF is discarded too
+eg notably
+ STUFF!&               now & is recognised instead (ie back to normal)
+ STUFFSTUFF    STUFF
+
+eg
+ &!@@@         @@@ is recognised instead of &
+ @@@!&         go back to &
index eba1ce1..8dd75e1 100644 (file)
@@ -3,6 +3,7 @@
 ### Build script for library
 ###
 ### (c) 2019 Mark Wooding
+### (c) 2019 Ian Jackson
 ###
 
 ###----- Licensing notice ---------------------------------------------------
 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ### MA 02111-1307, USA.
 
-$D/all:: $D/libtoy.a
-$D_CLEANFILES          :=
+&TARGETS_all   += & libtoy.a
 
-libtoy_SOURCES         := $(addprefix $D/, toylib.c)
-libtoy_OBJECTS         := $(call objects, $(libtoy_SOURCES))
-$(call notice-objects, $(libtoy_OBJECTS))
+&OBJECTS       += & toylib.c
 
-$D/libtoy.a: $(libtoy_OBJECTS)
-       $(call v-tag,AR)ar rc $@ $^
-$D_CLEANFILES          += $D/libtoy.a
-
-SUBDIRS                         = t
-$(call descend-subdirs, $(SUBDIRS))
+&libtoy.a:     $(&OBJECTS)
+       $(AR) rc $@ $^
index a35f479..a5efee5 100644 (file)
@@ -3,6 +3,7 @@
 ### Build script for library test
 ###
 ### (c) 2019 Mark Wooding
+### (c) 2019 Ian Jackson
 ###
 
 ###----- Licensing notice ---------------------------------------------------
 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ### MA 02111-1307, USA.
 
-$D_CLEANFILES          :=
+&TARGETS_check += & toytest.stamp
 
-$D/check:: $D/toytest.stamp
+&OBJECTS       += & toytest.o
+&LIBS          += lib/libtoy.a
 
-toytest_SOURCES                := $(addprefix $D/, toytest.c)
-toytest_OBJECTS                := $(call objects, $(toytest_SOURCES))
-toytest_LIBS            = lib/libtoy.a
-$(call notice-objects, $(toytest_OBJECTS))
+&CLEAN         += & toytest
 
-$D/toytest: $(toytest_OBJECTS) $(toytest_LIBS)
+&toytest:      $(&OBJECTS) $(&LIBS)
        $(LINK) $^
-$D_CLEANFILES          += $D/toytest
 
-$D/toytest.stamp: $D/toytest
+&toytest.stamp: & toytest
        $<
        touch $@
-$D_CLEANFILES          += $D/toytest.stamp
index 8c9acd4..462bd37 100644 (file)
@@ -3,6 +3,7 @@
 ### Build script for main program
 ###
 ### (c) 2019 Mark Wooding
+### (c) 2019 Ian Jackson
 ###
 
 ###----- Licensing notice ---------------------------------------------------
 ### Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
 ### MA 02111-1307, USA.
 
-$D/all:: $D/toy
-$D_CLEANFILES          :=
+&TARGETS_all   += & toy
 
-toy_SOURCES            := $(addprefix $D/, toy.c)
-toy_OBJECTS            := $(call objects, $(toy_SOURCES))
-toy_LIBS                = lib/libtoy.a
-$(call notice-objects, $(toy_OBJECTS))
+&OBJECTS       += & toy.o
+&LIBS          += lib/libtoy.a
 
-$D/toy: $(toy_OBJECTS) $(toy_LIBS)
+&toy: $(&OBJECTS) $(&LIBS)
        $(LINK) $^
-$D_CLEANFILES          += $D/toy