@@ -7,6 +7,8 @@ ALEX = alex
7
7
ALEX_OPTS = -g
8
8
ALEX_VER = ` awk ' /^version:/ { print $$2 }' alex.cabal `
9
9
10
+ SDIST_DIR =dist-newstyle/sdist
11
+
10
12
sdist ::
11
13
@case " ` $( CABAL) --numeric-version` " in \
12
14
2.[2-9].* | [3-9].* ) ;; \
@@ -22,26 +24,26 @@ sdist ::
22
24
mv src/Parser.y src/Parser.y.boot
23
25
mv src/Scan.x src/Scan.x.boot
24
26
$(CABAL ) new-run gen-alex-sdist
25
- $(CABAL ) sdist
26
- @if [ ! -f " dist /alex-$( ALEX_VER) .tar.gz" ]; then \
27
+ $(CABAL ) new- sdist
28
+ @if [ ! -f " ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" ]; then \
27
29
echo " Error: source tarball not found: dist/alex-$( ALEX_VER) .tar.gz" ; \
28
30
exit 1; \
29
31
fi
30
32
git checkout .
31
33
git clean -f
32
34
33
35
sdist-test :: sdist sdist-test-only
34
- @rm -rf " dist /alex-$( ALEX_VER) /"
36
+ @rm -rf " ${SDIST_DIR} /alex-${ ALEX_VER} /"
35
37
36
38
sdist-test-only ::
37
- @if [ ! -f " dist /alex-$( ALEX_VER) .tar.gz" ]; then \
38
- echo " Error: source tarball not found: dist /alex-$( ALEX_VER) .tar.gz" ; \
39
+ @if [ ! -f " ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" ]; then \
40
+ echo " Error: source tarball not found: ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" ; \
39
41
exit 1; \
40
42
fi
41
- rm -rf " dist /alex-$( ALEX_VER) /"
42
- tar -xf " dist /alex-$( ALEX_VER) .tar.gz" -C dist /
43
- echo " packages: ." > " dist /alex-$( ALEX_VER) /cabal.project"
44
- cd " dist /alex-$( ALEX_VER) /" && cabal new-test --enable-tests all
43
+ rm -rf " ${SDIST_DIR} /alex-$( ALEX_VER) /"
44
+ tar -xf " ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz" -C ${SDIST_DIR} /
45
+ echo " packages: ." > " ${SDIST_DIR} /alex-$( ALEX_VER) /cabal.project"
46
+ cd " ${SDIST_DIR} /alex-$( ALEX_VER) /" && cabal new-test --enable-tests all
45
47
@echo " "
46
- @echo " Success! dist /alex-$( ALEX_VER) .tar.gz is ready for distribution!"
48
+ @echo " Success! ${SDIST_DIR} /alex-$( ALEX_VER) .tar.gz is ready for distribution!"
47
49
@echo " "
0 commit comments