## Copyright (C) 2007 Noah Slater . ## Copying and distribution of this file, with or without modification, are ## permitted in any medium without royalty provided the copyright notice and ## this notice are preserved. datarootdir = @prefix@/share bin_SCRIPTS = couchdb couchjs if HELP2MAN dist_man1_MANS = couchdb.1 couchjs.1 endif CLEANFILES = $(bin_SCRIPTS) $(dist_man1_MANS) transform = @program_transform_name@ _couchjs_command_name = `echo _couchjs | sed '$(transform)'` couchdb: couchdb.tpl sed -e "s|%ERL%|$(ERL)|g" \ -e "s|%ICU_CONFIG%|$(ICU_CONFIG)|g" \ -e "s|%erlangbindir%|@erlangbindir@|g" \ -e "s|%erlanglibdir%|@erlanglibdir@|g" \ -e "s|%pkgconfdir%|@pkgconfdir@|g" \ -e "s|%pkgstatelogdir%|@pkgstatelogdir@|g" \ -e "s|%pkgstatelibdir%|@pkgstatelibdir@|g" \ -e "s|%localstatedir%|@localstatedir@|g" \ -e "s|%list_address%|@list_address@|g" \ -e "s|%list_uri%|@list_uri@|g" \ -e "s|%package_author_address%|@package_author_address@|g" \ -e "s|%package_author_name%|@package_author_name@|g" \ -e "s|%package_name%|@package_name@|g" \ -e "s|%version%|@version@|g" > \ $@ < $< chmod +x $@ couchjs: couchjs.tpl sed -e "s|%libbindir%|@libbindir@|g" \ -e "s|%list_address%|@list_address@|g" \ -e "s|%list_uri%|@list_uri@|g" \ -e "s|%package_author_address%|@package_author_address@|g" \ -e "s|%package_author_name%|@package_author_name@|g" \ -e "s|%package_name%|@package_name@|g" \ -e "s|%version%|@version@|g" \ -e "s|%_couchjs_command_name%|$(_couchjs_command_name)|g" > \ $@ < $< chmod +x $@ HELP2MAN_OPTION_COLLECTION=--locale=C --help-option="-h" --no-info # XXX: Because the scripts are made at bulid time for the user we need to # XXX: depend on the original templates so as not to cause the rebuilding of # XXX: the man pages. couchdb.1: couchdb.tpl.in touch $@ if test -x "$(HELP2MAN_EXECUTABLE)"; then \ $(MAKE) -f Makefile couchdb; \ $(HELP2MAN_EXECUTABLE) \ $(HELP2MAN_OPTION_COLLECTION) --version-option="-v" \ --name="CouchDB database server" \ ./couchdb --output $@; \ fi couchjs.1: couchjs.tpl.in touch $@ if test -x "$(HELP2MAN_EXECUTABLE)"; then \ $(MAKE) -f Makefile couchjs; \ $(HELP2MAN_EXECUTABLE) \ $(HELP2MAN_OPTION_COLLECTION) --version-option="-V" \ --name="CouchDB JavaScript interpreter" \ ./couchjs --output $@; \ fi