Skip to content

Commit

Permalink
Use cabal -f old-patch
Browse files Browse the repository at this point in the history
I guess that works now. I don't care about cabal one bit.
  • Loading branch information
lep committed Mar 5, 2023
1 parent 2bba412 commit 819fbc6
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 20 deletions.
22 changes: 8 additions & 14 deletions GNUmakefile
Expand Up @@ -15,30 +15,24 @@ all: patch133
# 1.26b to 1.28
patch128: COMMONJ=common-1.28.j
patch128: PATCH_LVL=128
patch128: clean configure-old-patch build
patch128: CABAL_FLAGS=-f old-patch
patch128: clean build

patch133: COMMONJ=common-1.33.j
patch133: PATCH_LVL=133
patch133: clean configure-new-patch build

configure-old-patch:
rm -f cabal.project.local
ln -s cabal.project.local.128 cabal.project.local

configure-new-patch:
rm -f cabal.project.local
ln -s cabal.project.local.133 cabal.project.local
patch133: CABAL_FLAGS=
patch133: clean build

build: $(PROCESSED) Hot/Types.hs Hot/CommonJHash.hs
cabal build jhcr
cabal build $(CABAL_FLAGS) jhcr

jhcr.exe: build
rm -f $@
strip $$(cabal list-bin jhcr)
upx -qq $$(cabal list-bin jhcr) -o $@
strip $$(cabal list-bin $(CABAL_FLAGS) jhcr)
upx -qq $$(cabal list-bin $(CABAL_FLAGS) jhcr) -o $@

runtime/convert.j Hot/Types.hs Hot/CommonJHash.hs runtime/types.j runtime/g-type-bin.j: $(COMMONJ)
cabal run convert -- $(COMMONJ)
cabal run $(CABAL_FLAGS) convert -- $(COMMONJ)

process: $(PROCESSED)

Expand Down
3 changes: 2 additions & 1 deletion Main.hs
Expand Up @@ -297,7 +297,8 @@ updateX o = do
# if OLD_PATCH
withBinaryFile (preloadPath o </> "JHCR.txt") WriteMode $ \f ->
hPutBuilder f $ J.pretty preload
#else -- technically this only needs to be done on patch 1.33 or higher
#else
-- technically this only needs to be done on patch 1.33 or higher
withBinaryFile (preloadPath o </> "JHCR-" <> show seq <> ".txt") WriteMode $ \f ->
hPutBuilder f $ J.pretty preload
#endif
Expand Down
3 changes: 0 additions & 3 deletions cabal.project.local.128

This file was deleted.

2 changes: 0 additions & 2 deletions cabal.project.local.133

This file was deleted.

0 comments on commit 819fbc6

Please sign in to comment.