--- Makefile.orig 2020-06-05 22:00:14.000000000 -0700 +++ Makefile 2020-06-05 22:01:45.000000000 -0700 @@ -16,9 +16,9 @@ # some varibales ... -all: tcl tk mesa togl fftw xcrysden +all: tcl tk mesa togl fftw bwidget xcrysden # meschach -xcrysden: usage bwidget bindir src-C src-F src-Tcl +xcrysden: usage bindir src-C src-F src-Tcl usage: $(TOPDIR)/docs/xcrysden.1 man $(TOPDIR)/docs/xcrysden.1 | awk 'BEGIN {lprint=0; print "## do not edit changes will be lost (file automatically generated)\n"; } /SYNOPSIS/ { lprint=1; } /SEE ALSO/ { lprint=0; } /a*/ { if (lprint) print; }' > usage @@ -238,41 +238,43 @@ version := $(shell cat version) xcrysden = xcrysden-$(version) +dprefix=$(DESTDIR)/$(prefix) + install: xcrysden @echo @echo "#-----" @echo "# " - @echo "# Installing XCRYSDEN to: $(prefix)" + @echo "# Installing XCRYSDEN to: $(dprefix)" @echo "# " @echo "#-----" @echo - install -m755 -d $(prefix)/share/$(xcrysden) - cp -a $(IRON_ITEMS) $(prefix)/share/$(xcrysden) + install -m755 -d $(dprefix)/share/$(xcrysden) + cp -a $(IRON_ITEMS) $(dprefix)/share/$(xcrysden) \ - for subdir in Awk $(EXTERNAL_LIB_BWIDGET) images scripts Tcl util; do \ + for subdir in Awk $(EXTERNAL_LIB_BWIDGET) images scripts Tcl util tests; do \ if test -d $$subdir; then \ - install -m755 -d $(prefix)/share/$(xcrysden)/$$subdir; \ - cp -a $$subdir/* $(prefix)/share/$(xcrysden)/$$subdir; \ + install -m755 -d $(dprefix)/share/$(xcrysden)/$$subdir; \ + cp -a $$subdir/* $(dprefix)/share/$(xcrysden)/$$subdir; \ fi; \ done \ if test -d examples; then \ - install -m755 -d $(prefix)/share/doc/$(xcrysden)/examples; \ - cp -a examples/* $(prefix)/share/doc/$(xcrysden)/examples; \ - ln -sf $(prefix)/share/doc/$(xcrysden)/examples $(prefix)/share/$(xcrysden)/examples; \ + install -m755 -d $(dprefix)/share/doc/$(xcrysden)/examples; \ + cp -a examples/* $(dprefix)/share/doc/$(xcrysden)/examples; \ + ln -sf $(prefix)/share/doc/$(xcrysden)/examples $(dprefix)/share/$(xcrysden)/examples; \ fi; \ \ - install -m755 -d $(prefix)/share/man/man1 - install -m644 $(MAN_FILES) $(prefix)/share/man/man1/ - gzip -f $(addprefix $(prefix)/share/man/man1/,$(MAN_PAGES)) + install -m755 -d $(dprefix)/share/man/man1 + install -m644 $(MAN_FILES) $(dprefix)/share/man/man1/ + gzip -f $(addprefix $(dprefix)/share/man/man1/,$(MAN_PAGES)) \ - install -m755 -d $(prefix)/lib/$(xcrysden) - install -m755 bin/* $(prefix)/lib/$(xcrysden)/ + install -m755 -d $(dprefix)/lib/$(xcrysden) + install -m755 bin/* $(dprefix)/lib/$(xcrysden)/ \ - prefix=$(prefix) xcrysden=$(xcrysden) sh sys_utils/wrappers.sh - if test ! -d $(prefix)/bin; then install -m755 -d $(prefix)/bin; fi + dprefix=$(dprefix) xcrysden=$(xcrysden) sh sys_utils/wrappers.sh + if test ! -d $(dprefix)/bin; then install -m755 -d $(dprefix)/bin; fi for prog in $(PROGS); do \ - install -m755 $$prog.wrapper $(prefix)/bin/$$prog; \ + install -m755 $$prog.wrapper $(dprefix)/bin/$$prog; \ done