Skip to content

Commit

Permalink
make archive now creates tar files that unpack into a subdirectory
Browse files Browse the repository at this point in the history
  • Loading branch information
hackerb9 committed Mar 13, 2024
1 parent 7c0fce5 commit 0056329
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ clean:
rm ${targets} \
$(addsuffix .c, ${targets}) \
bacmp \
*.tar.gz \
*.o *~ core \
input.do output.do output.ba \
2>/dev/null || true
Expand Down Expand Up @@ -70,6 +71,15 @@ distcheck: all
# Maybe useful for copying to projects without requiring a dependency on flex.
cfiles: $(addsuffix .c, ${targets})

# Dirname so we can create tar files that unpack into a directory
thisdir := $(notdir $(shell pwd))

artifacts: all cfiles
tar -zcf linux-amd64.tar.gz ${targets} bacmp ${scripts}
tar -zcf cfiles.tar.gz $(addsuffix .c, ${targets}) m100-tokenize-main.c bacmp.c ${scripts}
tar -C .. -zcf ../source.tar.gz \
--exclude='*reference*' --exclude='.git*' --exclude='*.tar.gz' \
${thisdir}
mv ../source.tar.gz .
tar -C .. -zcf linux-amd64.tar.gz \
$(addprefix ${thisdir}/, ${targets} bacmp ${scripts})
tar -C .. -zcf cfiles.tar.gz \
$(addprefix ${thisdir}/, $(addsuffix .c, ${targets}) m100-tokenize-main.c bacmp.c ${scripts})

0 comments on commit 0056329

Please sign in to comment.