distro-build: refine client--server split
This commit is contained in:
parent
1260dd6b2e
commit
df857e1c76
10
Makefile
10
Makefile
|
@ -334,8 +334,8 @@ local-build:
|
||||||
fresh-user:
|
fresh-user:
|
||||||
rm -rf build/user
|
rm -rf build/user
|
||||||
|
|
||||||
set-config:
|
set-server-config:
|
||||||
$(RACKET) -l distro-build/set-config build/user/config/config.rktd $(CONFIG_MODE_q) "$(DOC_SEARCH)" "" "" ""
|
$(RACKET) -l distro-build/set-server-config build/user/config/config.rktd $(CONFIG_MODE_q) "$(DOC_SEARCH)" "" "" ""
|
||||||
|
|
||||||
# Install packages from the source copies in this directory. The
|
# Install packages from the source copies in this directory. The
|
||||||
# packages are installed in user scope, but we set the add-on
|
# packages are installed in user scope, but we set the add-on
|
||||||
|
@ -344,7 +344,7 @@ set-config:
|
||||||
# from it):
|
# from it):
|
||||||
packages-from-local:
|
packages-from-local:
|
||||||
$(RACO) pkg install $(LOCAL_USER_AUTO) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
$(RACO) pkg install $(LOCAL_USER_AUTO) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
||||||
$(MAKE) set-config
|
$(MAKE) set-server-config
|
||||||
$(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(LOCAL_USER_AUTO)
|
$(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(LOCAL_USER_AUTO)
|
||||||
$(RACO) setup --avoid-main $(JOB_OPTIONS)
|
$(RACO) setup --avoid-main $(JOB_OPTIONS)
|
||||||
|
|
||||||
|
@ -354,7 +354,7 @@ packages-from-local:
|
||||||
build-from-catalog:
|
build-from-catalog:
|
||||||
$(MAKE) fresh-user
|
$(MAKE) fresh-user
|
||||||
$(RACO) pkg install --all-platforms $(SOURCE_USER_AUTO_q) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
$(RACO) pkg install --all-platforms $(SOURCE_USER_AUTO_q) $(REQUIRED_PKGS) $(DISTRO_BUILD_PKGS)
|
||||||
$(MAKE) set-config
|
$(MAKE) set-server-config
|
||||||
$(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(SOURCE_USER_AUTO_q) --all-platforms
|
$(RACKET) -l distro-build/install-pkgs $(CONFIG_MODE_q) "$(PKGS)" $(SOURCE_USER_AUTO_q) --all-platforms
|
||||||
$(RACO) setup --avoid-main $(JOB_OPTIONS)
|
$(RACO) setup --avoid-main $(JOB_OPTIONS)
|
||||||
|
|
||||||
|
@ -409,7 +409,7 @@ COPY_ARGS = $(PROP_ARGS) \
|
||||||
|
|
||||||
# Not copied, because used only immediately: DOC_SEARCH and DIST_CATALOGS_q
|
# Not copied, because used only immediately: DOC_SEARCH and DIST_CATALOGS_q
|
||||||
|
|
||||||
SET_BUNDLE_CONFIG_q = $(BUNDLE_CONFIG) "" "" "$(INSTALL_NAME)" "$(BUILD_STAMP)" "$(DOC_SEARCH)" $(DIST_CATALOGS_q)
|
SET_BUNDLE_CONFIG_q = $(BUNDLE_CONFIG) "$(INSTALL_NAME)" "$(BUILD_STAMP)" "$(DOC_SEARCH)" $(DIST_CATALOGS_q)
|
||||||
|
|
||||||
client:
|
client:
|
||||||
if [ ! -d build/log ] ; then rm -rf build/user ; fi
|
if [ ! -d build/log ] ; then rm -rf build/user ; fi
|
||||||
|
|
|
@ -1,20 +0,0 @@
|
||||||
#lang racket/base
|
|
||||||
(require racket/cmdline
|
|
||||||
pkg
|
|
||||||
pkg/lib
|
|
||||||
net/url)
|
|
||||||
|
|
||||||
(module test racket/base)
|
|
||||||
|
|
||||||
(define (add-catalog! url)
|
|
||||||
(define s (url->string url))
|
|
||||||
(define l (pkg-config-catalogs))
|
|
||||||
(unless (member s l)
|
|
||||||
(apply pkg-config-command #:set #t
|
|
||||||
"catalogs"
|
|
||||||
(append l (list s)))))
|
|
||||||
|
|
||||||
(command-line
|
|
||||||
#:args
|
|
||||||
(dir)
|
|
||||||
(add-catalog! (path->url (path->complete-path dir))))
|
|
|
@ -1,38 +1,30 @@
|
||||||
#lang racket/base
|
#lang racket/base
|
||||||
(require racket/cmdline
|
(require racket/cmdline
|
||||||
racket/file
|
racket/file
|
||||||
racket/path
|
racket/path)
|
||||||
(only-in "config.rkt" extract-options)
|
|
||||||
"url-options.rkt")
|
(provide set-config)
|
||||||
|
|
||||||
(module test racket/base)
|
(module test racket/base)
|
||||||
|
|
||||||
(define-values (dest-config-file config-file config-mode
|
(module+ main
|
||||||
install-name build-stamp
|
|
||||||
default-doc-search default-catalogs)
|
|
||||||
(command-line
|
(command-line
|
||||||
#:args
|
#:args
|
||||||
(dest-config-file config-file config-mode
|
(dest-config-file install-name build-stamp
|
||||||
install-name build-stamp
|
|
||||||
doc-search . catalog)
|
doc-search . catalog)
|
||||||
(values dest-config-file config-file config-mode
|
(set-config dest-config-file
|
||||||
install-name build-stamp
|
install-name build-stamp
|
||||||
doc-search catalog)))
|
doc-search catalog)))
|
||||||
|
|
||||||
(define config (if (equal? config-file "")
|
(define (set-config dest-config-file
|
||||||
(hash)
|
install-name build-stamp
|
||||||
(extract-options config-file config-mode)))
|
doc-search catalogs)
|
||||||
|
(define orig
|
||||||
(define doc-search (choose-doc-search config default-doc-search))
|
|
||||||
|
|
||||||
(define catalogs (choose-catalogs config default-catalogs))
|
|
||||||
|
|
||||||
(define orig
|
|
||||||
(if (file-exists? dest-config-file)
|
(if (file-exists? dest-config-file)
|
||||||
(call-with-input-file* dest-config-file read)
|
(call-with-input-file* dest-config-file read)
|
||||||
(hash)))
|
(hash)))
|
||||||
|
|
||||||
(let* ([table orig]
|
(let* ([table orig]
|
||||||
[table
|
[table
|
||||||
(if (equal? doc-search "")
|
(if (equal? doc-search "")
|
||||||
table
|
table
|
||||||
|
@ -54,4 +46,4 @@
|
||||||
#:exists 'truncate
|
#:exists 'truncate
|
||||||
(lambda (o)
|
(lambda (o)
|
||||||
(write table o)
|
(write table o)
|
||||||
(newline o)))))
|
(newline o))))))
|
||||||
|
|
|
@ -5,7 +5,7 @@
|
||||||
racket/system
|
racket/system
|
||||||
compiler/find-exe
|
compiler/find-exe
|
||||||
(only-in "config.rkt" extract-options)
|
(only-in "config.rkt" extract-options)
|
||||||
"display-time.rkt")
|
distro-build/display-time)
|
||||||
|
|
||||||
(module test racket/base)
|
(module test racket/base)
|
||||||
|
|
|
@ -0,0 +1,33 @@
|
||||||
|
#lang racket/base
|
||||||
|
(require racket/cmdline
|
||||||
|
racket/file
|
||||||
|
racket/path
|
||||||
|
(only-in "config.rkt" extract-options)
|
||||||
|
"url-options.rkt"
|
||||||
|
distro-build/set-config)
|
||||||
|
|
||||||
|
(module test racket/base)
|
||||||
|
|
||||||
|
(define-values (dest-config-file config-file config-mode
|
||||||
|
install-name build-stamp
|
||||||
|
default-doc-search default-catalogs)
|
||||||
|
(command-line
|
||||||
|
#:args
|
||||||
|
(dest-config-file config-file config-mode
|
||||||
|
install-name build-stamp
|
||||||
|
doc-search . catalog)
|
||||||
|
(values dest-config-file config-file config-mode
|
||||||
|
install-name build-stamp
|
||||||
|
doc-search catalog)))
|
||||||
|
|
||||||
|
(define config (if (equal? config-file "")
|
||||||
|
(hash)
|
||||||
|
(extract-options config-file config-mode)))
|
||||||
|
|
||||||
|
(define doc-search (choose-doc-search config default-doc-search))
|
||||||
|
|
||||||
|
(define catalogs (choose-catalogs config default-catalogs))
|
||||||
|
|
||||||
|
(set-config dest-config-file
|
||||||
|
install-name build-stamp
|
||||||
|
doc-search catalogs)
|
Loading…
Reference in New Issue
Block a user