summaryrefslogtreecommitdiffstats
path: root/avahi-utils/Makefile.am
diff options
context:
space:
mode:
Diffstat (limited to 'avahi-utils/Makefile.am')
-rw-r--r--avahi-utils/Makefile.am37
1 files changed, 31 insertions, 6 deletions
diff --git a/avahi-utils/Makefile.am b/avahi-utils/Makefile.am
index c2c7842..0079795 100644
--- a/avahi-utils/Makefile.am
+++ b/avahi-utils/Makefile.am
@@ -19,12 +19,37 @@
SUBDIRS=avahi
+pythonscripts = \
+ avahi-publish-address \
+ avahi-publish-service \
+ avahi-dump-all \
+ avahi-discover
+
+EXTRA_DIST = \
+ avahi-publish-address.in \
+ avahi-publish-service.in \
+ avahi-dump-all.in \
+ avahi-discover.in
+
if HAVE_PYTHON
-bin_SCRIPTS = \
- avahi-publish-address \
- avahi-publish-service \
- avahi-dump-all \
- avahi-discover
+bin_SCRIPTS = $(pythonscripts)
endif
-CLEANFILES = $(bin_SCRIPTS)
+avahi-publish-address: avahi-publish-address.in
+ sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
+ chmod +x $@
+
+avahi-publish-service: avahi-publish-service.in
+ sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
+ chmod +x $@
+
+avahi-dump-all: avahi-dump-all.in
+ sed -e 's,@PYTHON\@,$(PYTHON),g' $< > $@
+ chmod +x $@
+
+avahi-discover: avahi-discover.in
+ sed -e 's,@PYTHON\@,$(PYTHON),g' \
+ -e 's,@interfacesdir\@,$(interfacesdir),g' $< > $@
+ chmod +x $@
+
+CLEANFILES = $(pythonscripts)