Windows distribution: remove compiler-specific libraries
Building creates compiler-specific files in "lib/msvc" or "lib/gcc". For consistency, strip those directories when creating a distribution. The newly added ".def" file provides information that would otherwise be lost by removing the MSVC ".lib" file from the distribution. Removing the compiler-specific ".obj" files means that used to be included for linking extensions. My guess is that the files are now completely unused.
This commit is contained in:
parent
0e924525ee
commit
8620f95763
1
Makefile
1
Makefile
|
@ -492,6 +492,7 @@ bundle-from-server:
|
||||||
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(REQUIRED_PKGS)
|
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(REQUIRED_PKGS)
|
||||||
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(PKGS)
|
$(BUNDLE_RACO) pkg install $(REMOTE_INST_AUTO) $(PKG_SOURCE_MODE) $(PKGS)
|
||||||
$(RACKET) -l setup/unixstyle-install post-adjust "$(SOURCE_MODE)" "$(PKG_SOURCE_MODE)" racket bundle/racket
|
$(RACKET) -l setup/unixstyle-install post-adjust "$(SOURCE_MODE)" "$(PKG_SOURCE_MODE)" racket bundle/racket
|
||||||
|
$(RACKET) -l setup/winstrip bundle/racket
|
||||||
$(RACKET) -l setup/winvers-change bundle/racket
|
$(RACKET) -l setup/winvers-change bundle/racket
|
||||||
|
|
||||||
UPLOAD_q = --readme "$(README)" --upload "$(UPLOAD)" --desc "$(DIST_DESC)"
|
UPLOAD_q = --readme "$(README)" --upload "$(UPLOAD)" --desc "$(DIST_DESC)"
|
||||||
|
|
|
@ -1,5 +1,7 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require racket/cmdline)
|
(require racket/cmdline
|
||||||
|
setup/cross-system
|
||||||
|
racket/file)
|
||||||
|
|
||||||
(module test racket/base)
|
(module test racket/base)
|
||||||
|
|
||||||
|
@ -20,6 +22,7 @@
|
||||||
(printf "Deleting ~a\n" p)
|
(printf "Deleting ~a\n" p)
|
||||||
(delete-file p))
|
(delete-file p))
|
||||||
|
|
||||||
|
(when (eq? 'windows (cross-system-type))
|
||||||
(for ([a (directory-list dir)])
|
(for ([a (directory-list dir)])
|
||||||
(define f (build-path dir a))
|
(define f (build-path dir a))
|
||||||
(define b (path-element->bytes a))
|
(define b (path-element->bytes a))
|
||||||
|
@ -39,4 +42,14 @@
|
||||||
(not (regexp-match? #rx#"3m" b))))))
|
(not (regexp-match? #rx#"3m" b))))))
|
||||||
(delete-file* f)))
|
(delete-file* f)))
|
||||||
|
|
||||||
|
;; Delete any subdirectory that contains ".lib" files.
|
||||||
|
;; Those are compiler-specific directories, and so we
|
||||||
|
;; don't want to include them in a distribution.
|
||||||
|
(for ([f (in-directory (build-path dir "lib"))])
|
||||||
|
(when (and (directory-exists? f)
|
||||||
|
(for/or ([f (in-directory f)])
|
||||||
|
(regexp-match? #rx"[.]lib$" f)))
|
||||||
|
(delete-directory/files f))))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user