[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] odd/multiarch 63b7fc9 3/5: Rename "scratch" director
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] odd/multiarch 63b7fc9 3/5: Rename "scratch" directories |
Date: |
Mon, 15 Apr 2019 09:24:57 -0400 (EDT) |
branch: odd/multiarch
commit 63b7fc9cd3df22e2704fae970b3f42b203ee5d0a
Author: Gregory W. Chicares <address@hidden>
Commit: Gregory W. Chicares <address@hidden>
Rename "scratch" directories
Renamed 'scratch' to 'ad_hoc' because 'scratch' is too easily confused
with 'stash'. Incidentally:
* install_libxml2_libxslt.make: Also renamed $(xml_dir) to $(build_dir),
the more descriptive name already used elsewhere.
* install_mingw.make: Replaced literal 'scratch' with $(ad_hoc_dir);
made the ad hoc directory a subdirectory of $(prefix) rather than of
the current directory.
* install_miscellanea.make: Also renamed $(destination) to $(dest_dir),
for concinnity with other names ending in '_dir'.
* install_msw.sh: Removed command to remove /opt/lmi/src/lmi/scratch/
because that is no longer needed.
---
install_libxml2_libxslt.make | 18 ++++-----
install_mingw.make | 22 ++++++-----
install_miscellanea.make | 94 ++++++++++++++++++++++----------------------
install_msw.sh | 3 --
install_wx.sh | 2 +-
install_wxpdfdoc.sh | 2 +-
6 files changed, 70 insertions(+), 71 deletions(-)
diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index 00950f4..08db44a 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -56,7 +56,7 @@ exec_prefix := $(prefix)
cache_dir := /cache_for_lmi/downloads
-xml_dir := /opt/lmi/$(host_type)/xml-scratch
+build_dir := /opt/lmi/$(host_type)/xml-ad_hoc
# Variables that normally should be left alone
#################################
@@ -77,7 +77,7 @@ xz_cflags := \
$(xz_version)_options := \
--prefix=$(prefix) \
--exec-prefix=$(exec_prefix) \
- --build=$(shell $(xml_dir)/$(xz_version)/build-aux/config.guess) \
+ --build=$(shell $(build_dir)/$(xz_version)/build-aux/config.guess) \
--host=$(host_type) \
--disable-dependency-tracking \
CFLAGS="-g -O2 $(xz_cflags)" \
@@ -127,7 +127,7 @@ xmlsoft_common_options := \
$(libxml2_version)_options := \
--prefix=$(prefix) \
--exec-prefix=$(exec_prefix) \
- --build=$(shell $(xml_dir)/$(libxml2_version)/config.guess) \
+ --build=$(shell $(build_dir)/$(libxml2_version)/config.guess) \
--host=$(host_type) \
$(xmlsoft_common_options) \
--with-lzma=$(prefix) \
@@ -146,7 +146,7 @@ $(libxml2_version)_options := \
$(libxslt_version)_options := \
--prefix=$(prefix) \
--exec-prefix=$(exec_prefix) \
- --build=$(shell $(xml_dir)/$(libxslt_version)/config.guess) \
+ --build=$(shell $(build_dir)/$(libxslt_version)/config.guess) \
--host=$(host_type) \
$(xmlsoft_common_options) \
--with-libxml-prefix=$(exec_prefix) \
@@ -181,7 +181,7 @@ initial_setup:
$(MKDIR) --parents $(prefix)
$(MKDIR) --parents $(exec_prefix)
$(MKDIR) --parents $(cache_dir)
- $(MKDIR) --parents $(xml_dir)
+ $(MKDIR) --parents $(build_dir)
# $(WGETFLAGS) and $(wget_whence) must be recursively expanded because
# $(host) and $(host_path) have target-specific values.
@@ -202,7 +202,7 @@ TARFLAGS := --keep-old-files
cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) $(wget_whence)/$@
cd $(cache_dir)/$(dir $@) && \
$(ECHO) "$(address@hidden) *$@" | $(MD5SUM) --check
- $(TAR) --extract $(TARFLAGS) --directory=$(xml_dir)
--file=$(cache_dir)/$@
+ $(TAR) --extract $(TARFLAGS) --directory=$(build_dir)
--file=$(cache_dir)/$@
# Someday it may be necessary to add a line like this to the recipe:
# export lt_cv_to_tool_file_cmd=func_convert_file_cygwin_to_w32
@@ -211,8 +211,8 @@ TARFLAGS := --keep-old-files
.PHONY: $(libraries)
$(libraries):
- -[ -e address@hidden ] && $(PATCH) --directory=$(xml_dir) --strip=1
<address@hidden
- cd $(xml_dir)/$@ \
+ -[ -e address@hidden ] && $(PATCH) --directory=$(build_dir) --strip=1
<address@hidden
+ cd $(build_dir)/$@ \
&& export PATH="$(mingw_bin_dir):${PATH}" \
&& PKG_CONFIG_PATH="$(prefix)/lib/pkgconfig" \
$(address@hidden) ./configure $(address@hidden) \
@@ -246,4 +246,4 @@ clobber_exec_prefix_only:
-$(RM) --force --recursive $(exec_prefix)/lib/*xslt*
-$(RM) --force --recursive $(exec_prefix)/lib/cmake
-$(RM) --force --recursive $(exec_prefix)/lib/pkgconfig
- -$(RM) --force --recursive $(xml_dir)
+ -$(RM) --force --recursive $(build_dir)
diff --git a/install_mingw.make b/install_mingw.make
index 6941928..e37f966 100644
--- a/install_mingw.make
+++ b/install_mingw.make
@@ -46,6 +46,8 @@ prefix := /MinGW_
cache_dir := /cache_for_lmi/downloads
+ad_hoc_dir := $(prefix)/ad_hoc
+
# In the past, it seemed necessary to specify a mirror, e.g.:
# mirror := http://easynews.dl.sourceforge.net/sourceforge/mingw
# but as of about 2006-12 sf.net seems to select one automatically
@@ -94,8 +96,8 @@ prefix_exists = \
"\nversion in order to preserve it; if not, then remove it." \
"\n"
-scratch_exists = \
- "\nError: Scratch directory 'scratch' already exists." \
+ad_hoc_dir_exists = \
+ "\nError: Nonce directory '$(ad_hoc_dir)' already exists." \
"\nProbably it is left over from a previous failure." \
"\nJust remove it unless you're sure you want whatever files" \
"\nit might contain." \
@@ -105,19 +107,19 @@ scratch_exists = \
.PHONY: all
all: $(file_list)
- $(CP) --archive scratch/mingw32 $(prefix)
- $(RM) --force --recursive scratch
+ $(CP) --archive $(ad_hoc_dir)/mingw32 $(prefix)
+ $(RM) --force --recursive $(ad_hoc_dir)
$(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
- type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) && false; }
- [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) && false; }
- [ ! -e scratch ] || { printf '%b' $(scratch_exists) && false; }
+ type "$(WGET)" >/dev/null || { printf '%b' $(wget_missing) &&
false; }
+ [ ! -e $(prefix) ] || { printf '%b' $(prefix_exists) &&
false; }
+ [ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) &&
false; }
$(MKDIR) --parents $(prefix)
$(RM) --force --recursive $(prefix)
- $(MKDIR) --parents scratch
+ $(MKDIR) --parents $(ad_hoc_dir)
BSDTARFLAGS := --keep-old-files
@@ -129,5 +131,5 @@ WGETFLAGS :=
%.7z:
cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) $(mirror)/$@
cd $(cache_dir) && $(ECHO) "$(address@hidden) *$@" | $(MD5SUM) --check
- $(BSDTAR) --extract $(BSDTARFLAGS) --directory=scratch
--file=$(cache_dir)/$@ \
- || c:/Program\ Files/7-Zip/7z x `cygpath -w
$(cache_dir)/address@hidden -oscratch
+ $(BSDTAR) --extract $(BSDTARFLAGS) --directory=$(ad_hoc_dir)
--file=$(cache_dir)/$@ \
+ || c:/Program\ Files/7-Zip/7z x `cygpath -w
$(cache_dir)/address@hidden -o$(ad_hoc_dir)
diff --git a/install_miscellanea.make b/install_miscellanea.make
index a6ac86a..34fca94 100644
--- a/install_miscellanea.make
+++ b/install_miscellanea.make
@@ -33,14 +33,14 @@ sf_mirror := https://downloads.sourceforge.net
# Nonconfigurable settings
#####################################################
-# 'z-' makes it alphabetize last:
-scratchdir := $(prefix)/third_party/zscratch
-destination := $(prefix)/third_party
+dest_dir := $(prefix)/third_party
-third_party_bin_dir := $(destination)/bin
-third_party_include_dir := $(destination)/include
-third_party_lib_dir := $(destination)/lib
-third_party_source_dir := $(destination)/src
+ad_hoc_dir := $(dest_dir)/ad_hoc
+
+third_party_bin_dir := $(dest_dir)/bin
+third_party_include_dir := $(dest_dir)/include
+third_party_lib_dir := $(dest_dir)/lib
+third_party_source_dir := $(dest_dir)/src
# File lists
###################################################################
@@ -104,15 +104,15 @@ WGET := wget
# Error messages
###############################################################
-destination_exists = \
- "\nError: Destination directory '$(destination)' already exists." \
+dest_dir_exists = \
+ "\nError: Destination directory '$(dest_dir)' already exists." \
"\nIt is generally unsafe to install one version of a program" \
"\non top of another. Probably you ought to rename the old" \
"\nversion in order to preserve it; if not, then remove it." \
"\n"
-scratch_exists = \
- "\nError: Scratch directory '$(scratchdir)' already exists." \
+ad_hoc_dir_exists = \
+ "\nError: Nonce directory '$(ad_hoc_dir)' already exists." \
"\nProbably it is left over from a previous failure." \
"\nJust remove it unless you're sure you want whatever files" \
"\nit might contain." \
@@ -135,7 +135,7 @@ all: boost cgicc jing md5sum_msw sample trang xmlwrapp
#
# cd /tmp
# diff --recursive --unified=3 original modified >foo.patch
-# patch --strip=1 --dry-run --directory=/wherever/scratch </tmp/foo.patch
+# patch --strip=1 --dry-run --directory=/any/where </tmp/foo.patch
#
# For example, to update the cgicc patch with additional changes:
# pushd /tmp
@@ -164,30 +164,30 @@ all: boost cgicc jing md5sum_msw sample trang xmlwrapp
.PHONY: boost
boost: $(file_list)
- -[ -e $(stem).patch ] && $(PATCH) --directory=$(scratchdir) --strip=1 <
$(stem).patch
+ -[ -e $(stem).patch ] && $(PATCH) --directory=$(ad_hoc_dir) --strip=1 <
$(stem).patch
$(MKDIR) $(third_party_include_dir)/boost/
- $(CP) --force --preserve --recursive $(scratchdir)/$(stem)/boost/*
$(third_party_include_dir)/boost/
+ $(CP) --force --preserve --recursive $(ad_hoc_dir)/$(stem)/boost/*
$(third_party_include_dir)/boost/
$(MKDIR) $(third_party_source_dir)/boost/
- $(MV) $(scratchdir)/$(stem)/*
$(third_party_source_dir)/boost/
+ $(MV) $(ad_hoc_dir)/$(stem)/*
$(third_party_source_dir)/boost/
.PHONY: cgicc
cgicc: $(file_list)
- $(PATCH) --directory=$(scratchdir) --strip=1 < $(stem).patch
+ $(PATCH) --directory=$(ad_hoc_dir) --strip=1 < $(stem).patch
$(MKDIR) $(third_party_include_dir)/cgicc
- $(MV) $(scratchdir)/$(stem)/cgicc/*.h
$(third_party_include_dir)/cgicc/
+ $(MV) $(ad_hoc_dir)/$(stem)/cgicc/*.h
$(third_party_include_dir)/cgicc/
$(MKDIR) $(third_party_source_dir)/cgicc
- $(MV) $(scratchdir)/$(stem)/cgicc/*.cpp $(third_party_source_dir)/cgicc/
- cd $(destination) && $(MD5SUM) --binary include/cgicc/* src/cgicc/*
>$(stem).md5sums
- cd $(destination) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
- $(SORT) --key=2 --output=$(stem).X $(stem).md5sums
- $(SORT) --key=2 --output=$(stem).Y $(destination)/$(stem).md5sums
- $(DIFF) --unified $(stem).X $(stem).Y && $(RM)
$(destination)/$(stem).md5sums $(stem).X $(stem).Y
+ $(MV) $(ad_hoc_dir)/$(stem)/cgicc/*.cpp $(third_party_source_dir)/cgicc/
+ cd $(dest_dir) && $(MD5SUM) --binary include/cgicc/* src/cgicc/*
>$(stem).md5sums
+ cd $(dest_dir) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
+ $(SORT) --key=2 --output=$(stem).X $(stem).md5sums
+ $(SORT) --key=2 --output=$(stem).Y $(dest_dir)/$(stem).md5sums
+ $(DIFF) --unified $(stem).X $(stem).Y && $(RM)
$(dest_dir)/$(stem).md5sums $(stem).X $(stem).Y
.PHONY: jing
jing: $(file_list)
- $(MKDIR) --parents $(destination)/rng
- $(MV) $(scratchdir)/$(stem)/bin/address@hidden
$(destination)/rng
- $(MV) $(scratchdir)/$(stem)/bin/xercesImpl.jar $(destination)/rng
+ $(MKDIR) --parents $(dest_dir)/rng
+ $(MV) $(ad_hoc_dir)/$(stem)/bin/address@hidden $(dest_dir)/rng
+ $(MV) $(ad_hoc_dir)/$(stem)/bin/xercesImpl.jar $(dest_dir)/rng
# The 'md5sum_msw' binary is redistributed to msw end users for
# authentication, so the 'fardel' target requires it. On other
@@ -212,39 +212,39 @@ md5sum_msw: $(file_list)
.PHONY: sample
sample: $(file_list)
-$(MKDIR) --parents $(prefix)/data
- $(MV) $(scratchdir)/$(stem)/* $(prefix)/data
+ $(MV) $(ad_hoc_dir)/$(stem)/* $(prefix)/data
.PHONY: trang
trang: $(file_list)
- $(MKDIR) --parents $(destination)/rng
- $(MV) $(scratchdir)/$(stem)/address@hidden $(destination)/rng
+ $(MKDIR) --parents $(dest_dir)/rng
+ $(MV) $(ad_hoc_dir)/$(stem)/address@hidden $(dest_dir)/rng
.PHONY: xmlwrapp
xmlwrapp: $(file_list)
- -[ -e $(stem).patch ] && $(PATCH) --directory=$(scratchdir) --strip=1 <
$(stem).patch
+ -[ -e $(stem).patch ] && $(PATCH) --directory=$(ad_hoc_dir) --strip=1 <
$(stem).patch
$(MKDIR) $(third_party_include_dir)/xmlwrapp/
- $(MV) $(scratchdir)/$(stem)/include/xmlwrapp/*.h
$(third_party_include_dir)/xmlwrapp/
+ $(MV) $(ad_hoc_dir)/$(stem)/include/xmlwrapp/*.h
$(third_party_include_dir)/xmlwrapp/
$(MKDIR) $(third_party_include_dir)/xsltwrapp/
- $(MV) $(scratchdir)/$(stem)/include/xsltwrapp/*.h
$(third_party_include_dir)/xsltwrapp/
+ $(MV) $(ad_hoc_dir)/$(stem)/include/xsltwrapp/*.h
$(third_party_include_dir)/xsltwrapp/
$(MKDIR) $(third_party_source_dir)/libxml/
- $(MV) $(scratchdir)/$(stem)/src/libxml/*
$(third_party_source_dir)/libxml/
+ $(MV) $(ad_hoc_dir)/$(stem)/src/libxml/*
$(third_party_source_dir)/libxml/
$(MKDIR) $(third_party_source_dir)/libxslt/
- $(MV) $(scratchdir)/$(stem)/src/libxslt/*
$(third_party_source_dir)/libxslt/
- cd $(destination) && $(MD5SUM) --binary include/xmlwrapp/*
include/xsltwrapp/* src/libxml/* src/libxslt/* >$(stem).md5sums
- cd $(destination) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
- $(SORT) --key=2 --output=$(stem).X $(stem).md5sums
- $(SORT) --key=2 --output=$(stem).Y $(destination)/$(stem).md5sums
- $(DIFF) --unified $(stem).X $(stem).Y && $(RM)
$(destination)/$(stem).md5sums $(stem).X $(stem).Y
+ $(MV) $(ad_hoc_dir)/$(stem)/src/libxslt/*
$(third_party_source_dir)/libxslt/
+ cd $(dest_dir) && $(MD5SUM) --binary include/xmlwrapp/*
include/xsltwrapp/* src/libxml/* src/libxslt/* >$(stem).md5sums
+ cd $(dest_dir) && $(MD5SUM) --check $(CURDIR)/$(stem).md5sums
+ $(SORT) --key=2 --output=$(stem).X $(stem).md5sums
+ $(SORT) --key=2 --output=$(stem).Y $(dest_dir)/$(stem).md5sums
+ $(DIFF) --unified $(stem).X $(stem).Y && $(RM)
$(dest_dir)/$(stem).md5sums $(stem).X $(stem).Y
$(file_list): initial_setup
.PHONY: initial_setup
initial_setup:
- @[ ! -e $(destination) ] || { printf '%b' $(destination_exists) &&
false; }
- @[ ! -e $(scratchdir) ] || { printf '%b' $(scratch_exists) &&
false; }
+ @[ ! -e $(dest_dir) ] || { printf '%b' $(dest_dir_exists) && false;
}
+ @[ ! -e $(ad_hoc_dir) ] || { printf '%b' $(ad_hoc_dir_exists) && false;
}
$(MKDIR) --parents $(cache_dir)
- $(MKDIR) --parents $(destination)
- $(MKDIR) --parents $(scratchdir)
+ $(MKDIR) --parents $(dest_dir)
+ $(MKDIR) --parents $(ad_hoc_dir)
$(MKDIR) $(third_party_bin_dir)
$(MKDIR) $(third_party_include_dir)
$(MKDIR) $(third_party_lib_dir)
@@ -262,7 +262,7 @@ WGETFLAGS := --no-check-certificate
%.tar.bz2 %.tar.gz:
cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) $(address@hidden)
$(ECHO) "$(address@hidden) *$(cache_dir)/$@" | $(MD5SUM) --check
- -$(TAR) --extract $(TARFLAGS) --directory=$(scratchdir)
--file=$(cache_dir)/$@
+ -$(TAR) --extract $(TARFLAGS) --directory=$(ad_hoc_dir)
--file=$(cache_dir)/$@
.PHONY: %.exe
%.exe:
@@ -274,7 +274,7 @@ WGETFLAGS := --no-check-certificate
%.zip:
cd $(cache_dir) && [ -e $@ ] || $(WGET) $(WGETFLAGS) $(address@hidden)
$(ECHO) "$(address@hidden) *$(cache_dir)/$@" | $(MD5SUM) --check
- -$(UNZIP) $(UNZIPFLAGS) $(cache_dir)/$@ -d $(scratchdir)
+ -$(UNZIP) $(UNZIPFLAGS) $(cache_dir)/$@ -d $(ad_hoc_dir)
# Maintenance
##################################################################
@@ -282,5 +282,5 @@ WGETFLAGS := --no-check-certificate
.PHONY: clobber
clobber:
- $(RM) --force --recursive $(scratchdir)
- $(RM) --force --recursive $(destination)
+ $(RM) --force --recursive $(dest_dir)
+ $(RM) --force --recursive $(ad_hoc_dir)
diff --git a/install_msw.sh b/install_msw.sh
index 2c522ed..94cf936 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -179,9 +179,6 @@ md5sum "$0"
find /cache_for_lmi/downloads -type f | xargs md5sum
SUPPRESSED
-# No longer necessary:
-rm --force --recursive scratch
-
# Not needed with for-loop below:
export LMI_HOST=${LMI_HOST:-"i686-w64-mingw32"}
diff --git a/install_wx.sh b/install_wx.sh
index 559a68e..1b118c7 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -135,7 +135,7 @@ config_options="
[ -n "$mingw_bin_dir" ] && export PATH="$mingw_bin_dir:${PATH}"
-build_dir="$prefix"/../wx-scratch/lmi-gcc-$gcc_version
+build_dir="$prefix"/../wx-ad_hoc/lmi-gcc-$gcc_version
if [ "$wx_skip_clean" != 1 ]
then
diff --git a/install_wxpdfdoc.sh b/install_wxpdfdoc.sh
index c659460..f267ca9 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -104,7 +104,7 @@ config_options="
cd "$proxy_wxpdfdoc_dir"
autoreconf --verbose
-build_dir="$prefix"/../wxpdfdoc-scratch/wxpdfdoc-$wxpdfdoc_commit_sha
+build_dir="$prefix"/../wxpdfdoc-ad_hoc/wxpdfdoc-$wxpdfdoc_commit_sha
if [ "$wxpdfdoc_skip_clean" != 1 ]
then