Changeset 11892 in project


Ignore:
Timestamp:
09/04/08 10:25:51 (13 years ago)
Author:
felix winkelmann
Message:

resurrected local documentation and examples handling in setup api; removed chicken-setup

Location:
chicken/branches/hygienic
Files:
2 deleted
6 edited

Legend:

Unmodified
Added
Removed
  • chicken/branches/hygienic/TODO

    r11864 r11892  
    5757*** HTTP_PROXY
    5858*** handle redirects in http-fetch
     59*** connect timeout and alternative download location
    5960** chicken-install
    6061*** handle needs/depends of builtin extension
    6162*** should cache extension-info
    62 *** handle connection failure by allowing alternative sites
    63 ** write manual chapters
    64 ** remove all remnants of chicken-setup
    6563
    6664* documentation
     
    7472* syntax-error
    7573** if ##sys#current-module is set, add name to error message?
     74** fluidly keep track of expanded forms (extend meaning of culprit)
     75   to pprint pruned expr on error
    7676
    7777* modules
     
    7979*** reimport of imported id
    8080*** unused defs?
    81 
    82 * compiler
    83 ** warn if encountering global ref or assignment to "unquote[-splicing]"
  • chicken/branches/hygienic/c-platform.scm

    r10952 r11892  
    3535  standard-bindings-that-never-return-false side-effect-free-standard-bindings-that-never-return-false
    3636  installation-home debugging
    37   dump-nodes
     37  dump-nodes unlikely-variables
    3838  unit-name insert-timer-checks used-units inlining
    3939  foreign-declarations block-compilation line-number-database-size
     
    104104(define parameter-limit 1024)
    105105(define small-parameter-limit 128)
     106(define unlikely-variables '(unquote unquote-splicing))
    106107
    107108(define eq-inline-operator "C_eqp")
  • chicken/branches/hygienic/compiler.scm

    r11842 r11892  
    296296  process-custom-declaration do-lambda-lifting file-requirements emit-closure-info
    297297  foreign-argument-conversion foreign-result-conversion foreign-type-convert-argument foreign-type-convert-result
    298   big-fixnum? import-libraries)
     298  big-fixnum? import-libraries unlikely-variables)
    299299
    300300
     
    526526  (define (walk x se dest)
    527527    (cond ((symbol? x)
     528           (when (memq x unlikely-variables)
     529             (compiler-warning
     530              'var
     531              "reference to variable `~s' possibly unintended" x) )
    528532           (resolve-variable x se dest))
    529533          ((not-pair? x)
     
    864868                                [ln (get-line x)]
    865869                                [val (walk (caddr x) se var0)] )
     870                           (when (memq var unlikely-variables)
     871                             (compiler-warning
     872                              'var
     873                              "assignment to variable `~s' possibly unintended"
     874                              var))
    866875                           (when (eq? var var0) ; global?
    867876                             (set! var (##sys#alias-global-hook var #t))
  • chicken/branches/hygienic/defaults.make

    r11771 r11892  
    326326CSI_PROGRAM = $(PROGRAM_PREFIX)csi$(PROGRAM_SUFFIX)
    327327CHICKEN_PROFILE_PROGRAM = $(PROGRAM_PREFIX)chicken-profile$(PROGRAM_SUFFIX)
    328 ifndef BUILD_SETUP_TOOLS
    329 CHICKEN_SETUP_PROGRAM = $(PROGRAM_PREFIX)chicken-setup$(PROGRAM_SUFFIX)
    330 else
    331328CHICKEN_INSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-install$(PROGRAM_SUFFIX)
    332329CHICKEN_UNINSTALL_PROGRAM = $(PROGRAM_PREFIX)chicken-uninstall$(PROGRAM_SUFFIX)
    333330CHICKEN_STATUS_PROGRAM = $(PROGRAM_PREFIX)chicken-status$(PROGRAM_SUFFIX)
    334 endif
    335331CHICKEN_BUG_PROGRAM = $(PROGRAM_PREFIX)chicken-bug$(PROGRAM_SUFFIX)
    336332IMPORT_LIBRARIES = chicken lolevel srfi-1 srfi-4 data-structures ports files posix srfi-13 srfi-69 extras \
    337333        regex srfi-14 tcp foreign scheme srfi-18 utils csi
    338 ifdef BUILD_SETUP_TOOLS
    339334IMPORT_LIBRARIES += setup-api setup-download setup-utils
    340 endif
    341335
    342336ifdef STATICBUILD
     
    357351TARGETLIBS ?= libchicken$(A) libuchicken$(A) \
    358352        $(LIBCHICKEN_SO_FILE) $(LIBUCHICKEN_SO_FILE)
    359 ifndef BUILD_SETUP_TOOLS
    360 TARGETS ?= $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
    361         $(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    362         $(CSC_PROGRAM)$(EXE) $(CHICKEN_SETUP_PROGRAM)$(EXE) chicken.info \
    363         $(CHICKEN_BUG_PROGRAM)$(EXE) \
    364         $(IMPORT_LIBRARIES:%=%.import.so)
    365 else
    366353TARGETS ?= $(TARGETLIBS) $(CHICKEN_SHARED_EXECUTABLE) \
    367354        $(CSI_SHARED_EXECUTABLE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
     
    370357        chicken.info $(CHICKEN_BUG_PROGRAM)$(EXE) \
    371358        $(IMPORT_LIBRARIES:%=%.import.so)
    372 endif
    373359endif
    374360
  • chicken/branches/hygienic/rules.make

    r11767 r11892  
    512512          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
    513513          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    514 ifdef BUILD_SETUP_TOOLS
    515514setup-api.import$(O): setup-api.import.c chicken.h $(CHICKEN_CONFIG_H)
    516515        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
     
    525524          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
    526525          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    527 endif
    528526
    529527# setup extension objects
    530 ifdef BUILD_SETUP_TOOLS
    531528setup-api$(O): setup-api.c chicken.h $(CHICKEN_CONFIG_H)
    532529        $(HOST_C_COMPILER) $(HOST_C_COMPILER_OPTIONS) $(HOST_C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) -DC_SHARED \
     
    541538          $(HOST_C_COMPILER_COMPILE_OPTION) $(HOST_C_COMPILER_OPTIMIZATION_OPTIONS) $(HOST_C_COMPILER_SHARED_OPTIONS) \
    542539          $(HOST_C_COMPILER_BUILD_RUNTIME_OPTIONS) $< $(HOST_C_COMPILER_OUTPUT)
    543 endif
    544540
    545541# compiler objects
     
    776772        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
    777773          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
    778 ifndef BUILD_SETUP_TOOLS
    779 chicken-setup$(O): chicken-setup.c chicken.h $(CHICKEN_CONFIG_H)
    780         $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
    781           $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
    782 else
    783774chicken-install$(O): chicken-install.c chicken.h $(CHICKEN_CONFIG_H)
    784775        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
     
    790781        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
    791782          $(C_COMPILER_COMPILE_OPTION) $(C_COMPILER_OPTIMIZATION_OPTIONS) $< $(C_COMPILER_OUTPUT)
    792 endif
    793783csc$(O): csc.c chicken.h $(CHICKEN_CONFIG_H)
    794784        $(C_COMPILER) $(C_COMPILER_OPTIONS) $(C_COMPILER_PTABLES_OPTIONS) $(INCLUDES) $(C_COMPILER_SHARED_OPTIONS) \
     
    881871          $(LINKER_LIBRARY_PREFIX)chicken$(LINKER_LIBRARY_SUFFIX) $(LINKER_LINK_SHARED_PROGRAM_OPTIONS) $(LIBRARIES)
    882872
    883 ifndef BUILD_SETUP_TOOLS
    884 $(CHICKEN_SETUP_PROGRAM)$(EXE): chicken-setup$(O) $(PRIMARY_LIBCHICKEN)
    885         $(LINKER) $(LINKER_OPTIONS) $(LINKER_EXECUTABLE_OPTIONS) $< $(LINKER_OUTPUT) \
    886           $(LINKER_LIBRARY_PREFIX)chicken$(LINKER_LIBRARY_SUFFIX) $(LINKER_LINK_SHARED_PROGRAM_OPTIONS) $(LIBRARIES)
    887 else
    888873$(CHICKEN_INSTALL_PROGRAM)$(EXE): chicken-install$(O) $(PRIMARY_LIBCHICKEN)
    889874        $(LINKER) $(LINKER_OPTIONS) $(LINKER_EXECUTABLE_OPTIONS) $< $(LINKER_OUTPUT) \
     
    895880        $(LINKER) $(LINKER_OPTIONS) $(LINKER_EXECUTABLE_OPTIONS) $< $(LINKER_OUTPUT) \
    896881          $(LINKER_LIBRARY_PREFIX)chicken$(LINKER_LIBRARY_SUFFIX) $(LINKER_LINK_SHARED_PROGRAM_OPTIONS) $(LIBRARIES)
    897 endif
    898882
    899883$(CHICKEN_PROFILE_PROGRAM)$(EXE): chicken-profile$(O) $(PRIMARY_LIBCHICKEN)
     
    980964        -$(INSTALL_PROGRAM) $(INSTALL_MANIFEST_OPTIONS) $(CHICKEN_BUG_MANIFEST) $(DESTDIR)$(IBINDIR)
    981965ifndef STATICBUILD
    982 ifndef BUILD_SETUP_TOOLS
    983         -$(INSTALL_PROGRAM) $(INSTALL_MANIFEST_OPTIONS) $(CHICKEN_SETUP_MANIFEST) $(DESTDIR)$(IBINDIR)
    984 else
    985966        -$(INSTALL_PROGRAM) $(INSTALL_MANIFEST_OPTIONS) $(CHICKEN_INSTALL_MANIFEST) $(DESTDIR)$(IBINDIR)
    986967        -$(INSTALL_PROGRAM) $(INSTALL_MANIFEST_OPTIONS) $(CHICKEN_UNINSTALL_MANIFEST) $(DESTDIR)$(IBINDIR)
     
    988969endif
    989970endif
    990 endif
    991971
    992972ifeq ($(NEEDS_RELINKING),yes)
    993973install:
    994 ifndef BUILD_SETUP_TOOLS
    995         $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(CHICKEN_PROGRAM)$(EXE) \
    996           $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    997           $(CHICKEN_SETUP_PROGRAM)$(EXE)
    998 else
    999974        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(CHICKEN_PROGRAM)$(EXE) \
    1000975          $(CSI_PROGRAM)$(EXE) $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    1001976          $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) \
    1002977          $(CHICKEN_STATUS_PROGRAM)$(EXE)
    1003 endif
    1004978        $(MAKE) -f $(SRCDIR)/Makefile.$(PLATFORM) NEEDS_RELINKING=no RUNTIME_LINKER_PATH=$(LIBDIR) install
    1005979        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_PROGRAM)$(EXE) $(CSI_PROGRAM)$(EXE) \
    1006980          $(CSC_PROGRAM)$(EXE) $(CHICKEN_PROFILE_PROGRAM)$(EXE)
    1007981ifndef STATICBUILD
    1008 ifndef BUILD_SETUP_TOOLS
    1009         $(MAKE_WRITABLE_COMMAND) $(CHICKEN_SETUP_PROGRAM)$(EXE)
    1010 else
    1011982        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_INSTALL_PROGRAM)$(EXE)
    1012983        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE)
    1013984        $(MAKE_WRITABLE_COMMAND) $(CHICKEN_STATUS_PROGRAM)$(EXE)
    1014985endif
    1015 endif
    1016 else
    1017 ifndef BUILD_SETUP_TOOLS
    1018 install: $(TARGETS) install-libs install-import-libs install-manifests
    1019986else
    1020987install: $(TARGETS) install-libs install-import-libs install-manifests install-setup-files
    1021 endif
    1022988ifneq ($(DESTDIR),)
    1023989        $(MAKEDIR_COMMAND) $(MAKEDIR_COMMAND_OPTIONS) $(DESTDIR)
     
    10391005        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CSC_PROGRAM)
    10401006        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_PROGRAM)
    1041 ifdef BUILD_SETUP_TOOLS
    10421007        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-api.so
    10431008        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-download.so
     
    10461011        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-download.import.so
    10471012        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/setup-utils.import.so
    1048 endif
    10491013        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/chicken.import.so
    10501014        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IEGGDIR)/lolevel.import.so
     
    10681032endif
    10691033ifndef STATICBUILD
    1070 ifndef BUILD_SETUP_TOOLS
    1071         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_SETUP_PROGRAM)$(EXE) \
    1072           $(DESTDIR)$(IBINDIR)
    1073 else
    10741034        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_INSTALL_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
    10751035        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_UNINSTALL_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
    10761036        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) $(CHICKEN_STATUS_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)
    1077 endif
    10781037ifneq ($(POSTINSTALL_PROGRAM),true)
    1079 ifndef BUILD_SETUP_TOOLS
    1080         $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_SETUP_PROGRAM)
    1081 else
    10821038        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_INSTALL_PROGRAM)
    10831039        $(POSTINSTALL_PROGRAM) $(POSTINSTALL_PROGRAM_FLAGS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_UNINSTALL_PROGRAM)
     
    10851041endif
    10861042endif
    1087 endif
    10881043        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken.1 $(DESTDIR)$(IMANDIR)
    10891044        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csi.1 $(DESTDIR)$(IMANDIR)
    10901045        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/csc.1 $(DESTDIR)$(IMANDIR)
    1091 ifndef BUILD_SETUP_TOOLS
    1092         $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-setup.1 $(DESTDIR)$(IMANDIR)
    1093 else
    10941046        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-install.1 $(DESTDIR)$(IMANDIR)
    10951047        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-uninstall.1 $(DESTDIR)$(IMANDIR)
    10961048        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-status.1 $(DESTDIR)$(IMANDIR)
    1097 endif
    10981049        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)
    10991050        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/chicken-bug.1 $(DESTDIR)$(IMANDIR)
     
    11191070endif
    11201071
    1121 ifndef BUILD_SETUP_TOOLS
    1122 install-setup-files:
    1123 else
    11241072install-setup-files:
    11251073        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_FILE_OPTIONS) $(SRCDIR)/setup.defaults $(DESTDIR)$(IEGGDIR)
     
    11271075        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-download.so $(DESTDIR)$(IEGGDIR)
    11281076        $(INSTALL_PROGRAM) $(INSTALL_PROGRAM_EXECUTABLE_OPTIONS) setup-utils.so $(DESTDIR)$(IEGGDIR)
    1129 endif
    11301077
    11311078uninstall:
    1132 ifndef BUILD_SETUP_TOOLS
    1133         $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROGRAM)$(EXE) \
    1134           $(DESTDIR)$(IBINDIR)/$(CSI_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_PROGRAM)$(EXE) \
    1135           $(DESTDIR)$(IBINDIR)/$(CHICKEN_SETUP_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)/$(CSC_PROGRAM)$(EXE) \
    1136           $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_PROGRAM)$(EXE)
    1137 else
    11381079        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROGRAM)$(EXE) \
    11391080          $(DESTDIR)$(IBINDIR)/$(CSI_PROGRAM)$(EXE) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_PROGRAM)$(EXE) \
     
    11431084          $(DESTDIR)$(IBINDIR)/$(CSC_PROGRAM)$(EXE) \
    11441085          $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_PROGRAM)$(EXE)
    1145 endif
    11461086        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(ILIBDIR)/libchicken*.* $(DESTDIR)$(ILIBDIR)/libuchicken*.* $(DESTDIR)$(IBINDIR)/libchicken*.* $(DESTDIR)$(IBINDIR)/libuchicken*.*
    11471087ifdef ($(PLATFORM),cygwin)
     
    11491089endif
    11501090ifneq ($(CHICKEN_MANIFEST),)
    1151 ifndef BUILD_SETUP_TOOLS
    1152         $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_MANIFEST) \
    1153         $(DESTDIR)$(IBINDIR)/$(CSI_MANIFEST) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_MANIFEST) \
    1154         $(DESTDIR)$(IBINDIR)/$(CSC_MANIFEST) $(DESTDIR)$(IBINDIR)/$(CHICKEN_BUG_MANIFEST) \
    1155         $(DESTDIR)$(IBINDIR)/$(CHICKEN_SETUP_MANIFEST)
    1156 else
    11571091        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IBINDIR)/$(CHICKEN_MANIFEST) \
    11581092        $(DESTDIR)$(IBINDIR)/$(CSI_MANIFEST) $(DESTDIR)$(IBINDIR)/$(CHICKEN_PROFILE_MANIFEST) \
     
    11621096        $(DESTDIR)$(IBINDIR)/$(CHICKEN_STATUS_MANIFEST)
    11631097endif
    1164 endif
    11651098        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IMANDIR)/chicken.1 $(DESTDIR)$(IMANDIR)/csi.1 \
    1166           $(DESTDIR)$(IMANDIR)/csc.1 $(DESTDIR)$(IMANDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)/chicken-setup.1 \
    1167           $(DESTDIR)$(IMANDIR)/chicken-bug.1
     1099          $(DESTDIR)$(IMANDIR)/csc.1 $(DESTDIR)$(IMANDIR)/chicken-profile.1 $(DESTDIR)$(IMANDIR)/chicken-install.1 \
     1100          $(DESTDIR)$(IMANDIR)/chicken-bug.1 $(DESTDIR)$(IMANDIR)/chicken-uninstall.1 \
     1101          $(DESTDIR)$(IMANDIR)/chicken-status.1
    11681102        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IINCDIR)/chicken.h $(DESTDIR)$(IINCDIR)/chicken-config.h
    11691103        $(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) $(DESTDIR)$(IINCDIR)/chicken.gch
     
    12991233utils.import.c: utils.import.scm
    13001234        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1301 ifdef BUILD_SETUP_TOOLS
    13021235setup-api.import.c: setup-api.import.scm setup-api.scm
    13031236        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
     
    13061239setup-utils.import.c: setup-utils.import.scm setup-utils.scm
    13071240        $(CHICKEN) $< $(CHICKEN_IMPORT_LIBRARY_OPTIONS) -output-file $@
    1308 endif
    13091241
    13101242chicken.c: chicken.scm chicken-more-macros.scm chicken-ffi-macros.scm private-namespace.scm
     
    13271259chicken-profile.c: chicken-profile.scm
    13281260        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
    1329 ifndef BUILD_SETUP_TOOLS
    1330 chicken-setup.c: chicken-setup.scm chicken-more-macros.scm
    1331         $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
    1332 else
    13331261chicken-install.c: chicken-install.scm setup-download.c setup-utils.c
    13341262        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
     
    13371265chicken-status.c: chicken-status.scm setup-utils.c
    13381266        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
    1339 endif
    13401267csc.c: csc.scm
    13411268        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
     
    13431270        $(CHICKEN) $< $(CHICKEN_PROGRAM_OPTIONS) -output-file $@
    13441271
    1345 ifdef BUILD_SETUP_TOOLS
    13461272setup-api.c: setup-api.scm setup-utils.c
    13471273        $(CHICKEN) $< $(CHICKEN_DYNAMIC_OPTIONS) -emit-import-library setup-api -output-file $@
     
    13501276setup-utils.c: setup-utils.scm
    13511277        $(CHICKEN) $< $(CHICKEN_DYNAMIC_OPTIONS) -emit-import-library setup-utils -output-file $@
    1352 endif
    13531278
    13541279# distribution files
     
    13621287        uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    13631288        usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c \
    1364         chicken-profile.c chicken-setup.c csc.c csi.c \
    1365         chicken.c batch-driver.c compiler.c optimizer.c support.c \
     1289        chicken-profile.c chicken-install.c chicken-uninstall.c chicken-status.c \
     1290        csc.c csi.c chicken.c batch-driver.c compiler.c optimizer.c support.c \
    13661291        c-platform.c c-backend.c chicken-bug.c $(IMPORT_LIBRARIES:=.import.c)
    13671292
     
    13831308clean:
    13841309        -$(REMOVE_COMMAND) $(REMOVE_COMMAND_OPTIONS) chicken$(EXE) csi$(EXE) csc$(EXE) \
    1385           chicken-setup$(EXE) chicken-profile$(EXE) csi-static$(EXE) \
     1310          chicken-profile$(EXE) csi-static$(EXE) \
    13861311          chicken-install$(EXE) chicken-uninstall$(EXE) chicken-status$(EXE) \
    13871312          csc-static$(EXE) chicken-static$(EXE) chicken-bug$(EXE) chicken.info *$(O) \
     
    14001325          ulibrary.c ueval.c udata-structures.c uports.c ufiles.c uextras.c ulolevel.c \
    14011326          uutils.c utcp.c usrfi-1.c usrfi-4.c usrfi-13.c usrfi-14.c \
    1402           usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-setup.c chicken-bug.c \
    1403           csc.c csi.c \
     1327          usrfi-18.c usrfi-69.c uposixunix.c uposixwin.c uregex.c chicken-profile.c chicken-bug.c \
     1328          csc.c csi.c chicken-install.c chicken-uninstall.c chicken-status.c \
    14041329          chicken.c batch-driver.c compiler.c optimizer.c support.c \
    14051330          c-platform.c c-backend.c \
  • chicken/branches/hygienic/setup-api.scm

    r11680 r11892  
    5757#endif
    5858
     59#ifndef C_INSTALL_SHARE_HOME
     60# define C_INSTALL_SHARE_HOME   NULL
     61#endif
     62
    5963#ifndef C_INSTALL_CC
    6064# ifdef _MSC_VER
     
    138142(define host-extension (make-parameter #f))
    139143
    140 (define chicken-bin-path
     144(define *chicken-bin-path*
    141145  (or (and-let* ((p (getenv "CHICKEN_PREFIX")))
    142146        (make-pathname p "bin") )
    143147      (foreign-value "C_INSTALL_BIN_HOME" c-string) ) )
    144148
     149(define *doc-path*
     150  (or (and-let* ((p (getenv "CHICKEN_PREFIX")))
     151        (make-pathname p "share/chicken/doc") )
     152      (make-pathname
     153       (foreign-value "C_INSTALL_SHARE_HOME" c-string)
     154       "doc")))
     155
    145156(define chicken-prefix
    146157  (or (getenv "CHICKEN_PREFIX")
    147       (let ((m (string-match "(.*)/bin/?" chicken-bin-path)))
     158      (let ((m (string-match "(.*)/bin/?" *chicken-bin-path*)))
    148159        (if m
    149160            (cadr m)
     
    164175(define setup-verbose-flag        (make-parameter #f))
    165176(define setup-install-flag        (make-parameter #t))
    166 (define program-path (make-parameter chicken-bin-path))
     177(define program-path (make-parameter *chicken-bin-path*))
    167178(define keep-intermediates (make-parameter #f))
    168179
     
    273284          (cons* (qs
    274285                  (make-pathname
    275                    chicken-bin-path
     286                   *chicken-bin-path*
    276287                   (cdr (assoc prg *installed-executables*))))
    277288                 "-feature" "compiling-extension"
     
    280291          " ") )
    281292        ((assoc prg *installed-executables*) =>
    282          (lambda (a) (qs (make-pathname chicken-bin-path (cdr a)))))
     293         (lambda (a) (qs (make-pathname *chicken-bin-path* (cdr a)))))
    283294        (else prg) ) )
    284295
     
    559570                           (make-dest-pathname rpath f)))
    560571                       files) ) )
     572      (and-let* ((docs (assq 'documentation info)))
     573        (print "\n* Installing documentation files in " *doc-path* ":")
     574        (for-each
     575         (lambda (f)
     576           (copy-file f (make-pathname *doc-path* f) #f) )
     577         (cdr docs))
     578        (newline))
     579      (and-let* ((exs (assq 'examples info)))
     580        (print "\n* Installing example files in " *doc-path* ":")
     581        (for-each
     582         (lambda (f)
     583           (let ((destf (make-pathname *doc-path* f)))
     584             (copy-file f destf #f)
     585             (unless *windows-shell*
     586               (run (chmod a+rx ,(quotewrap destf))) ) ))
     587         (cdr exs))
     588        (newline))
    561589      (write-info id dests info) ) ) )
    562590
Note: See TracChangeset for help on using the changeset viewer.