summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniil Baturin <daniil@baturin.org>2015-04-05 23:35:54 +0600
committerDaniil Baturin <daniil@baturin.org>2015-04-05 23:35:54 +0600
commitf1c071d40b1442c3ae6211b63fba9ea71a656bf7 (patch)
tree25101e2c06ddd359a2ee60a38e4cc0b563902c3e
parentf3f6b8b2e0b128b370bc58bbbf5eaf26cc57c898 (diff)
downloadhvinfo-f1c071d40b1442c3ae6211b63fba9ea71a656bf7.tar.gz
hvinfo-f1c071d40b1442c3ae6211b63fba9ea71a656bf7.zip
Improve dependencies in the makefile.
Make src/hvinfo a phony target to let gprbuild sort out actual Ada dependencies.
-rw-r--r--Makefile7
-rwxr-xr-xmkconfig.sh2
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 901ea1c..6a7ee91 100644
--- a/Makefile
+++ b/Makefile
@@ -10,10 +10,13 @@ GNATPREP = gnatprep
INSTALL = install
-all: src/hvinfo
+all: src/config.ads src/hvinfo
+src/config.ads: VERSION mkconfig.sh src/config.ads.in
+ GNATPREP=$(GNATPREP) ./mkconfig.sh
+
+.PHONY: src/hvinfo
src/hvinfo:
- ./mkconfig.sh
$(GPRBUILD) -Phvinfo
clean:
diff --git a/mkconfig.sh b/mkconfig.sh
index 1abfa94..d3bb56a 100755
--- a/mkconfig.sh
+++ b/mkconfig.sh
@@ -18,7 +18,7 @@ case $OS in
exit 1
esac
-gnatprep -D LINUX=$HVINFO_LINUX \
+$GNATPREP -D LINUX=$HVINFO_LINUX \
-D FREEBSD=$HVINFO_FREEBSD \
-D VERSION=\"$VERSION\" \
src/config.ads.in src/config.ads