[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[lmi-commits] [lmi] master 9afb092 4/5: Rename "scratch" directories
From: |
Greg Chicares |
Subject: |
[lmi-commits] [lmi] master 9afb092 4/5: Rename "scratch" directories |
Date: |
Mon, 15 Apr 2019 07:03:21 -0400 (EDT) |
branch: master
commit 9afb0922363e6e93b3e3370a6534e2546970a77c
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 | 92 ++++++++++++++++++++++----------------------
install_msw.sh | 2 -
install_wx.sh | 2 +-
install_wxpdfdoc.sh | 2 +-
6 files changed, 70 insertions(+), 68 deletions(-)
diff --git a/install_libxml2_libxslt.make b/install_libxml2_libxslt.make
index 7d40d35..6be5930 100644
--- a/install_libxml2_libxslt.make
+++ b/install_libxml2_libxslt.make
@@ -53,7 +53,7 @@ exec_prefix := $(prefix)
cache_dir := /cache_for_lmi/downloads
-xml_dir := /opt/lmi/xml-scratch
+build_dir := /opt/lmi/xml-ad_hoc
# Variables that normally should be left alone
#################################
@@ -76,7 +76,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)" \
@@ -126,7 +126,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) \
@@ -145,7 +145,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) \
@@ -180,7 +180,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.
@@ -201,7 +201,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
@@ -210,8 +210,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) \
@@ -245,4 +245,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 8d58fe1..34fca94 100644
--- a/install_miscellanea.make
+++ b/install_miscellanea.make
@@ -33,12 +33,14 @@ sf_mirror := https://downloads.sourceforge.net
# Nonconfigurable settings
#####################################################
-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
###################################################################
@@ -102,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 '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." \
@@ -133,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
@@ -162,30 +164,30 @@ all: boost cgicc jing md5sum_msw sample trang xmlwrapp
.PHONY: boost
boost: $(file_list)
- -[ -e $(stem).patch ] && $(PATCH) --directory=scratch --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 scratch/$(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) scratch/$(stem)/*
$(third_party_source_dir)/boost/
+ $(MV) $(ad_hoc_dir)/$(stem)/*
$(third_party_source_dir)/boost/
.PHONY: cgicc
cgicc: $(file_list)
- $(PATCH) --directory=scratch --strip=1 < $(stem).patch
+ $(PATCH) --directory=$(ad_hoc_dir) --strip=1 < $(stem).patch
$(MKDIR) $(third_party_include_dir)/cgicc
- $(MV) scratch/$(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) scratch/$(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) scratch/$(stem)/bin/address@hidden $(destination)/rng
- $(MV) scratch/$(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
@@ -210,43 +212,43 @@ md5sum_msw: $(file_list)
.PHONY: sample
sample: $(file_list)
-$(MKDIR) --parents $(prefix)/data
- $(MV) scratch/$(stem)/* $(prefix)/data
+ $(MV) $(ad_hoc_dir)/$(stem)/* $(prefix)/data
.PHONY: trang
trang: $(file_list)
- $(MKDIR) --parents $(destination)/rng
- $(MV) scratch/$(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=scratch --strip=1 <
$(stem).patch
+ -[ -e $(stem).patch ] && $(PATCH) --directory=$(ad_hoc_dir) --strip=1 <
$(stem).patch
$(MKDIR) $(third_party_include_dir)/xmlwrapp/
- $(MV) scratch/$(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) scratch/$(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) scratch/$(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) scratch/$(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 scratch ] || { 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 $(dest_dir)
+ $(MKDIR) --parents $(ad_hoc_dir)
$(MKDIR) $(third_party_bin_dir)
$(MKDIR) $(third_party_include_dir)
$(MKDIR) $(third_party_lib_dir)
$(MKDIR) $(third_party_source_dir)
- $(MKDIR) scratch
TARFLAGS := --keep-old-files
%.tar.bz2: TARFLAGS += --bzip2
@@ -260,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=scratch --file=$(cache_dir)/$@
+ -$(TAR) --extract $(TARFLAGS) --directory=$(ad_hoc_dir)
--file=$(cache_dir)/$@
.PHONY: %.exe
%.exe:
@@ -272,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 scratch
+ -$(UNZIP) $(UNZIPFLAGS) $(cache_dir)/$@ -d $(ad_hoc_dir)
# Maintenance
##################################################################
@@ -280,5 +282,5 @@ WGETFLAGS := --no-check-certificate
.PHONY: clobber
clobber:
- $(RM) --force --recursive scratch
- $(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 fc8a111..974af68 100755
--- a/install_msw.sh
+++ b/install_msw.sh
@@ -172,8 +172,6 @@ mount
md5sum "$0"
find /cache_for_lmi/downloads -type f | xargs md5sum
-rm --force --recursive scratch
-
if [ "Cygwin" = "$platform" ]
then
# For Cygwin, install and use this msw-native compiler.
diff --git a/install_wx.sh b/install_wx.sh
index 3987b27..88cf9ce 100755
--- a/install_wx.sh
+++ b/install_wx.sh
@@ -134,7 +134,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 0123cbf..fe1721e 100755
--- a/install_wxpdfdoc.sh
+++ b/install_wxpdfdoc.sh
@@ -103,7 +103,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