Skip to content

Commit

Permalink
a kludge to make tar --xform "work" on MacOS
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Mar 14, 2024
1 parent f84a23f commit a7f8757
Showing 1 changed file with 14 additions and 4 deletions.
18 changes: 14 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,22 @@ clean:
tokenize:
$(MAKE) -C adjunct tokenize


# GNU tar lets us easily put the files into a subdirectory in the archive.
# Unfortunately, MacOS's tar cannot do that.
UNAME := $(shell uname)
ifeq ($(UNAME), Darwin)
gnuxform :=
else
gnuxform := --xform 's%^%m100le/%'
endif

### Create an archive of the final product for distribution.
archivefiles := M100LE.BA M100LE+comments.DO WL*.CO README.md
archive: all tar zip
tar:
tar -acf m100le.tar.gz --xform 's#^#m100le/#' ${archivefiles}
zip:
archive: tar zip
tar: all
tar -acf m100le.tar.gz ${gnuxform} ${archivefiles}
zip: all
zip -q m100le.zip ${archivefiles}

### IMPLICIT RULES
Expand Down

0 comments on commit a7f8757

Please sign in to comment.