# makefile to configure the http handlers to be used # default is: http access may be done via a native http module # or via an external program curl called via pipes # the access can be controlled at runtime by option --withCurl # # variants: # # 1. ONLY_NATIVE_HTTP: does not need the code for calling external programs via pipes # activate this variant by running "make only_native_http" in this dir before compilation # # 2. ONLY_CURL_HTTP: does not need the code for a socked connection and other stuff used by http modules # activate this variant by running "make only_curl_http" in this dir before compilation # # 3. NO_HTTP: does not need any code for http, only local file access is supported # activate this variant by running "make no_http" in this dir before compilation # # reset to default (both variants compiled in and selected by runtime options) by # running "make default_http" source = ProtocolHandler.Config.hs tmp = ProtocolHandler.tmp target = ProtocolHandler.hs all : $(target) $(target) : $(source) ghc -E -cpp -o $(tmp) $(source) ; grep -v '^#' $(tmp) > $(target) ; rm -f $(tmp) only_native_http : ghc -E -cpp -DONLY_NATIVE_HTTP=1 -o $(tmp) $(source) ; grep -v '^#' $(tmp) > $(target) ; rm -f $(tmp) only_curl_http : ghc -E -cpp -DONLY_CURL_HTTP=1 -o $(tmp) $(source) ; grep -v '^#' $(tmp) > $(target) ; rm -f $(tmp) no_http : ghc -E -cpp -DNO_HTTP=1 -o $(tmp) $(source) ; grep -v '^#' $(tmp) > $(target) ; rm -f $(tmp) default_http : ghc -E -cpp -o $(tmp) $(source) ; grep -v '^#' $(tmp) > $(target) ; rm -f $(tmp)