-.PHONY: in-place config-pkgs mk-version-symlinks install-dirs install
-
-config-pkgs ::
- @echo "Configuring $(package), version $(version), on $(platform) ..."
- @for i in $(PACKAGE_PRL_SCRIPTS) ""; do \
- if test "$$i"; then \
- echo "Creating a configured version of $$i .."; \
- $(RM) bin/$(platform)/$$i.bak; \
- if [ -f bin/$(platform)/$$i ]; then $(MV) bin/$(platform)/$$i bin/$(platform)/$$i.bak; fi; \
- echo "#! $(PERL)" > bin/$(platform)/$$i ; \
- echo '$$'"bindir='$(bindir)';" >> bin/$(platform)/$$i ; \
- echo '$$'"libdir='$(libdir)';" >> bin/$(platform)/$$i ; \
- echo '$$'"libexecdir='$(libdir)';" >> bin/$(platform)/$$i ; \
- echo '$$'"datadir='$(datadir)';" >> bin/$(platform)/$$i ; \
- echo '$$'"SED='$(SED)';" >> bin/$(platform)/$$i ; \
- echo '$$'"DEFAULT_TMPDIR='$(DEFAULT_TMPDIR)';" >> bin/$(platform)/$$i ; \
- cat bin/$(platform)/$$i.prl >> bin/$(platform)/$$i ; \
- $(CHMOD) $(BIN_PERMS) bin/$(platform)/$$i; \
- echo "Done."; \
- fi; \
- done
- @for i in $(PACKAGE_LIB_PRL_SCRIPTS) ""; do \
- if test "$$i"; then \
- echo "Creating a configured version of $$i .."; \
- $(RM) lib/$(platform)/$$i.bak; \
- if [ -f lib/$(platform)/$$i ]; then $(MV) lib/$(platform)/$$i lib/$(platform)/$$i.bak; fi; \
- echo "#! $(PERL)" > lib/$(platform)/$$i ; \
- echo '$$'"bindir='$(bindir)';" >> lib/$(platform)/$$i ; \
- echo '$$'"libdir='$(libdir)';" >> lib/$(platform)/$$i ; \
- echo '$$'"libexecdir='$(libdir)';" >> lib/$(platform)/$$i ; \
- echo '$$'"datadir='$(datadir)';" >> lib/$(platform)/$$i ; \
- echo '$$'"SED='$(SED)';" >> lib/$(platform)/$$i ; \
- echo '$$'"DEFAULT_TMPDIR='$(DEFAULT_TMPDIR)';" >> lib/$(platform)/$$i ; \
- cat lib/$(platform)/$$i.prl >> lib/$(platform)/$$i; \
- $(CHMOD) $(BIN_PERMS) lib/$(platform)/$$i; \
- echo "Done."; \
- fi; \
- done
- @for i in $(PACKAGE_SH_SCRIPTS) ""; do \
- if test "$$i"; then \
- echo "Creating a configured version of $$i .."; \
- $(RM) bin/$(platform)/$$i.bak; \
- if [ -f bin/$(platform)/$$i ]; then $(MV) bin/$(platform)/$$i bin/$(platform)/$$i.bak; fi; \
- echo "#! $(SH)" > bin/$(platform)/$$i ; \
- echo "bindir='$(bindir)'" >> bin/$(platform)/$$i ; \
- echo "libdir='$(libdir)'" >> bin/$(platform)/$$i ; \
- echo "libexecdir='$(libdir)'" >> bin/$(platform)/$$i ; \
- echo "datadir='$(datadir)'" >> bin/$(platform)/$$i ; \
- echo "SED='$(SED)'" >> bin/$(platform)/$$i ; \
- echo "DEFAULT_TMPDIR='$(DEFAULT_TMPDIR)'" >> bin/$(platform)/$$i ; \
- cat bin/$(platform)/$$i.sh >> bin/$(platform)/$$i; \
- $(CHMOD) $(BIN_PERMS) bin/$(platform)/$$i; \
- echo "Done."; \
- fi; \
- done
- @for i in $(PACKAGE_LIB_SPLICED_FILES) ""; do \
- if test "$$i"; then \
- echo "Creating a configured version of $$i .."; \
- $(PERL) -i.bak -lpe 's|\$$libdir|$(libdir)|g;s|\$$datadir|$(datadir)|g' lib/$(platform)/$$i; \
- fi; \
- done
- @if test "$(platform)" = "powerpc-apple-darwin"; then \
- echo "Configuring install names..."; \
- for i in lib/$(platform)/*; do \
- sh fix_install_names.sh "$(libdir)" "$$i"; \
- done; \
- echo "Done."; \
- fi
-
-in-place ::
- $(MAKE) $(MFLAGS) config-pkgs bindir=`pwd`/bin/$(platform) libdir=`pwd`/lib/$(platform) datadir=`pwd`/share
- @if test -x "./post-inplace-script" ; then \
- echo "Running project-specific post-inplace script ..." ; \
- ./post-inplace-script $(platform) `pwd` \
- $(package)-$(version); \
- echo "Done" ; \
- fi
- @echo "Finished configuring..to use, add `pwd`/bin/$(platform) to your PATH."
-
-install-dirs ::