- export PLUGLONGNAME="`cat $(CURDIR)/plugins/$*/NAME`"; \
- [ -e $(CURDIR)/plugins/$*/debian/plugin-$*.postinst ] \
- && $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/plugins/$*/debian/plugin-$*.postinst > $@ \
- || $(SED_REPLACE) -e 's/@PLUGSHORTNAME@/$*/g' -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" $(CURDIR)/debian/dsf-in/plugin.postinst > $@
+ PLUGLONGNAME="$$(cat '$(CURDIR)/plugins/$*/NAME')"; \
+ test -n "$$PLUGLONGNAME" || exit 1; \
+ srcf='$(CURDIR)/plugins/$*/debian/plugin-$*.postinst'; \
+ test -e "$$srcf" || srcf='$(CURDIR)/debian/dsf-in/plugin.postinst'; \
+ $(SED_REPLACE) \
+ -e 's/@PLUGSHORTNAME@/$*/g' \
+ -e "s/@PLUGLONGNAME@/$$PLUGLONGNAME/g" \
+ "$$srcf" >$@ || (rm -f $@; exit 1)