Skip to content

Commit

Permalink
Merge pull request #1316 from Sonu0305/fix#1315
Browse files Browse the repository at this point in the history
Fix compatibility with BSD tar by supporting both tar and gtar
  • Loading branch information
cbm755 authored Dec 1, 2024
2 parents a9a964d + 91e9c88 commit fde3f12
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
SHELL := /bin/bash

## Copyright 2016-2019, 2022 Colin B. Macdonald
## Copyright 2024 Swayam Shah
##
## Copying and distribution of this file, with or without modification,
## are permitted in any medium without royalty provided the copyright
Expand All @@ -23,6 +24,7 @@ HTML_TARBALL := ${HTML_DIR}.tar.gz

OCTAVE ?= octave
MATLAB ?= matlab
TAR ?= tar

.PHONY: help clean install test doctest dist dist_zip html matlab_test matlab_pkg

Expand All @@ -46,7 +48,7 @@ define create_tarball
$(shell cd $(dir $(1)) \
&& find $(notdir $(1)) -print0 \
| LC_ALL=C sort -z \
| tar c --mtime="$(GIT_DATE)" \
| $(TAR) c --mtime="$(GIT_DATE)" \
--owner=root --group=root --numeric-owner \
--no-recursion --null -T - -f - \
| gzip -9n > "$(2)")
Expand All @@ -61,7 +63,7 @@ endef
$(OCTAVE_RELEASE): .git/index | $(BUILD_DIR)
@echo "Creating package version $(VERSION) release ..."
-$(RM) -r "$@"
git archive --format=tar --prefix="$@/" HEAD | tar -x
git archive --format=tar --prefix="$@/" HEAD | $(TAR) -x
$(RM) "$@/README.matlab.md" \
"$@/HOWTO-release.md" \
"$@/TODO.md" \
Expand Down

0 comments on commit fde3f12

Please sign in to comment.