Skip to content

Commit

Permalink
Eliminate renames in patches (#3617)
Browse files Browse the repository at this point in the history
* Eliminate renames in patches

* ensure that `patch` removes zero-length files

This fixes the build on some platforms like Alpine where
this behaviour is not active by default, and thus results
in empty `.ml` files being generated in the source tree.

Signed-off-by: Anil Madhavapeddy <anil@recoil.org>

* Revert "ensure that `patch` removes zero-length files"

This reverts commit f6d0017.

* Workaround strict POSIX patching

POSIX patch will leave src_ext/seq/seq.ml{,i} as zero-length files but
patch -E is non-POSIX.
  • Loading branch information
dra27 authored and rjbou committed Oct 23, 2018
1 parent 9cacabd commit 5853cbf
Show file tree
Hide file tree
Showing 4 changed files with 679 additions and 63 deletions.
2 changes: 1 addition & 1 deletion src_ext/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ else
MD5CHECK = test "`md5sum $(1) | sed -e 's/^[^a-f0-9]*\([a-f0-9]*\).*/\1/'`" = "$(2)" || (rm $(1) && false)
endif

lib-ext: clone
lib-ext: clone ensure-seq-patched.stamp
@

ifeq ($(CAN_PKG),1)
Expand Down
4 changes: 4 additions & 0 deletions src_ext/Makefile.sources
Original file line number Diff line number Diff line change
Expand Up @@ -65,4 +65,8 @@ MD5_PKG_topkg = 8978a0595db1a22e4251ec62735d4b84
URL_seq = https://github.com/c-cube/seq/archive/0.1.tar.gz
MD5_seq = 0e87f9709541ed46ecb6f414bc31458c

# This is necessary as long as a patch is used to rename seq.ml and seq.mli
ensure-seq-patched.stamp: seq.stamp
rm -f seq/src/seq.ml seq/src/seq.mli

$(call PKG_SAME,seq)

0 comments on commit 5853cbf

Please sign in to comment.