summaryrefslogtreecommitdiff
path: root/ortho/Makefile.inc
diff options
context:
space:
mode:
Diffstat (limited to 'ortho/Makefile.inc')
-rw-r--r--ortho/Makefile.inc35
1 files changed, 16 insertions, 19 deletions
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 $@