From e6001445a14d5e96db78ff56c68d8ae96dec0968 Mon Sep 17 00:00:00 2001 From: Tristan Gingold Date: Sat, 8 Mar 2014 07:04:05 +0100 Subject: Share spec of ortho_nodes, adjust code. --- ortho/Makefile.inc | 35 ++++++++++++++++------------------- 1 file changed, 16 insertions(+), 19 deletions(-) (limited to 'ortho/Makefile.inc') diff --git a/ortho/Makefile.inc b/ortho/Makefile.inc index 6836000..597aaef 100644 --- a/ortho/Makefile.inc +++ b/ortho/Makefile.inc @@ -20,22 +20,19 @@ # SED: sed the stream editor # ORTHO_BASENAME -$(ORTHO_BASENAME).ads: $(ortho_srcdir)/ortho_nodes.common.ads \ - $(ORTHO_BASENAME).private.ads - $(SED) -e '/^package/,$$d' \ - < $(ORTHO_BASENAME).private.ads \ - > tmp.prv.hdr - $(SED) -e '1,/^private/d' -e '/^end/d' \ - < $(ORTHO_BASENAME).private.ads \ - > tmp.prv.dcl - $(SED) -e '1,/^package/d' -e '/^private/,$$d' \ - < $(ORTHO_BASENAME).private.ads \ - > tmp.prv.pub - $(SED) \ - -e '/^ --- PRIVATE/r tmp.prv.dcl' \ - -e '/^--- PRIVATE CONTEXT CLAUSES/r tmp.prv.hdr' \ - -e '/^ --- PUBLIC DECLARATIONS/r tmp.prv.pub' \ - -e '/--- PRIVATE/d' \ - -e 's/ORTHO_NODES/$(ORTHO_PACKAGE)/g' < $< > $@ - $(RM) -f tmp.prv.dcl tmp.prv.hdr tmp.prv.pub - +$(ortho_srcdir)/$(BE)/$(ORTHO_BASENAME).ads: \ + $(ortho_srcdir)/ortho_nodes.common.ads \ + $(ortho_srcdir)/$(BE)/$(ORTHO_BASENAME).private.ads + $(RM) -f $@ + echo "-- DO NOT MODIFY - this file was generated from:" > $@ + echo "-- ortho_nodes.common.ads and $(ORTHO_BASENAME).private.ads" \ + >> $@ + echo "--" >> $@ + $(SED) -e '/^private/,$$d' \ + < $(ortho_srcdir)/$(BE)/$(ORTHO_BASENAME).private.ads >> $@ + echo "-- Start of common part" >> $@ + $(SED) -e '1,/^package/d' -e '/^private/,$$d' < $< >> $@ + echo "-- End of common part" >> $@ + $(SED) -n -e '/^private/,$$p' \ + < $(ortho_srcdir)/$(BE)/$(ORTHO_BASENAME).private.ads >> $@ + chmod a-w $@ -- cgit