-
Notifications
You must be signed in to change notification settings - Fork 1
/
Makefile
49 lines (49 loc) · 1.55 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
ARCH := $(shell perl -V | grep -w archname | cut -d = -f 2)
WHITELIST = ^(AnyEvent|JE|common)
# MINIFY_PROC=4
# MINIFY_ARGS=--backup-and-modify-in-place \
# --backup-file-extension=/ \
# --blank-lines-before-packages=0 \
# --blank-lines-before-subs=0 \
# --check-syntax \
# --converge \
# --delete-all-comments \
# --delete-old-newlines \
# --delete-old-whitespace \
# --delete-semicolons \
# --indent-columns=0 \
# --keep-old-blank-lines=0 \
# --maximum-consecutive-blank-lines=0 \
# --maximum-line-length=100000 \
# --noadd-semicolons \
# --noadd-whitespace \
# --noblanks-before-blocks \
# --noprofile \
# --notabs \
# --standard-error-output
all: depac
ls -alh depac
depac.trace: depac.pl
fatpack trace --to=depac.trace depac.pl
depac.packlists: depac.trace
fatpack packlists-for `egrep '$(WHITELIST)' depac.trace` > depac.packlists
fatlib: depac.packlists
fatpack tree `cat depac.packlists`
cp -a fatlib/$(ARCH)/* fatlib/
rm -rf fatlib/$(ARCH)
cp AnyEvent/constants.pm fatlib/AnyEvent/constants.pm
perl -i.bak -pe 's{(AnyEvent/constants)\.pl}{\1.pm}' fatlib/AnyEvent.pm
# fatlib/.minified: fatlib
# find fatlib/ -type f -name \*.pm | xargs -P $(MINIFY_PROC) perltidy $(MINIFY_ARGS)
# touch fatlib/.minified
depac: fatlib
fatpack file depac.pl > depac
perl -c depac && chmod +x depac
clean:
rm -rf depac depac.trace depac.packlists fatlib/
deps:
cpan -i App::FatPacker # Perl::Tidy
fast:
git checkout origin/master depac
git diff origin/master depac.pl | sed 's/depac\.pl/depac/' | patch -p1
rm depac.orig