From: <kr_...@us...> - 2003-07-16 22:11:09
|
Update of /cvsroot/htoolkit/port In directory sc8-pr-cvs1:/tmp/cvs-serv32397 Modified Files: configure makefile Log Message: better configure/make scripts Index: configure =================================================================== RCS file: /cvsroot/htoolkit/port/configure,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** configure 4 Jul 2003 17:39:04 -0000 1.14 --- configure 16 Jul 2003 22:11:06 -0000 1.15 *************** *** 15,19 **** hcpkg="" hcpkglocal="" ! ffidir="" hdoc="" hdoclibs="" --- 15,20 ---- hcpkg="" hcpkglocal="" ! incdir="" ! libdir="" hdoc="" hdoclibs="" *************** *** 48,53 **** -hc*) hc="$2"; shift;; ! -ffidir*) ! ffidir="$2"; shift;; -hcpkg*) hcpkg="$2"; shift;; --- 49,54 ---- -hc*) hc="$2"; shift;; ! -incdir*) ! incdir="$2"; shift;; -hcpkg*) hcpkg="$2"; shift;; *************** *** 117,121 **** echo " unable to find: $hc" echo " pleasy specify the path to GHC." ! echo " for example: ./configure -hc //c/ghc/ghc-5.04.2/bin/ghc" hc=echo exit 2 --- 118,122 ---- echo " unable to find: $hc" echo " pleasy specify the path to GHC." ! echo " for example: ./configure -hc /usr/bin/ghc" hc=echo exit 2 *************** *** 124,128 **** # check ghc version ! version="`$hc --version | sed -e 's|[A-Za-z \t,]*||'`" case $version in 0* | 1* | 2* | 3* | 4* | 5.00* | 5.01* | 5.02* | 5.03* | 5.04 | 5.04.0 | 5.04.1) echo "WARNING:" --- 125,129 ---- # check ghc version ! version="`$hc --numeric-version`" case $version in 0* | 1* | 2* | 3* | 4* | 5.00* | 5.01* | 5.02* | 5.03* | 5.04 | 5.04.0 | 5.04.1) echo "WARNING:" *************** *** 136,152 **** echo " unable to recognise the ghc version ($version ?)" echo " ghc versions prior to 5.04.2 have gc bugs that make port applications crash." ! echo "";; esac ! # find HsFFI.h ! if test -z "$ffidir"; then ! if test -f $hc; then ! ffidir="`echo $hc | sed -e 's|bin/ghc|include|' -e 's|.exe||'`" ! else ! ffidir="`which $hc | sed -e 's|bin/ghc|include|' -e 's|.exe||'`" ! fi ! fi ! if test -f "$ffidir/HsFFI.h"; then echo "HsFFI.h found" else --- 137,147 ---- echo " unable to recognise the ghc version ($version ?)" echo " ghc versions prior to 5.04.2 have gc bugs that make port applications crash." ! echo "";; esac ! libdir="`$hc --print-libdir`" ! incdir="$libdir/include" ! if test -f "$incdir/HsFFI.h"; then echo "HsFFI.h found" else *************** *** 154,158 **** echo " could not find 'HsFFI.h'" echo " please specify the ffi include directories" ! echo " for example: ./configure -ffidir /pkg/ghc-5.04.2/lib/ghc-5.04.2/include" exit 2 fi --- 149,153 ---- echo " could not find 'HsFFI.h'" echo " please specify the ffi include directories" ! echo " for example: ./configure -incdir /usr/lib/ghc-6.0/include" exit 2 fi *************** *** 385,389 **** fi ! echo "FFIDIR=$ffidir" >> config/config.mk echo "GUILIB=$target" >> config/config.mk echo "CLIBS=$clibopts" >> config/config.mk --- 380,385 ---- fi ! echo "LIBDIR=$libdir" >> config/config.mk ! echo "INCDIR=$incdir" >> config/config.mk echo "GUILIB=$target" >> config/config.mk echo "CLIBS=$clibopts" >> config/config.mk *************** *** 425,431 **** echo " { name=\"port\"" >> config/port.pkg echo " , auto=True" >> config/port.pkg ! echo " , import_dirs=[\"$curdir/imports\"]" >> config/port.pkg ! echo " , library_dirs=[\"$curdir\" $extralibdirs]" >> config/port.pkg ! echo " , hs_libraries=[\"port\"]" >> config/port.pkg echo " , extra_libraries=[$extralibs]" >> config/port.pkg echo " , package_deps=[]" >> config/port.pkg --- 421,427 ---- echo " { name=\"port\"" >> config/port.pkg echo " , auto=True" >> config/port.pkg ! echo " , import_dirs=[\"\$libdir/imports\"]" >> config/port.pkg ! echo " , library_dirs=[\"$libdir\" $extralibdirs]" >> config/port.pkg ! echo " , hs_libraries=[\"HSport\"]" >> config/port.pkg echo " , extra_libraries=[$extralibs]" >> config/port.pkg echo " , package_deps=[]" >> config/port.pkg Index: makefile =================================================================== RCS file: /cvsroot/htoolkit/port/makefile,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** makefile 8 Jul 2003 20:31:29 -0000 1.23 --- makefile 16 Jul 2003 22:11:06 -0000 1.24 *************** *** 82,86 **** CSRCDIRS = src/cbits/$(GUILIB) HEADERDIR = src/include ! CINCDIRS = $(HEADERDIR) $(HOUTDIR)/Port $(FFIDIR) src/cbits/$(GUILIB) --- 82,86 ---- CSRCDIRS = src/cbits/$(GUILIB) HEADERDIR = src/include ! CINCDIRS = $(HEADERDIR) $(HOUTDIR)/Port $(INCDIR) src/cbits/$(GUILIB) *************** *** 89,94 **** #-------------------------------------------------------------------------- ! HC-OPTIONS = # -O2 ! CC-OPTIONS = ifdef HDOCHTML --- 89,94 ---- #-------------------------------------------------------------------------- ! HC-OPTIONS = -O2 ! CC-OPTIONS = -O2 ifdef HDOCHTML *************** *** 115,120 **** # main, object files, dependencies and hi files ! MAINLIB = lib$(MAIN).a ! MAINOBJ = $(MAIN).o HOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(HSRCS)) --- 115,120 ---- # main, object files, dependencies and hi files ! MAINLIB = libHS$(MAIN).a ! MAINOBJ = HS$(MAIN).o HOBJS = $(patsubst %.hs,$(HOUTDIR)/%.o, $(HSRCS)) *************** *** 139,148 **** all: release doc ! release: $(MAINOBJ) ! # build a library ! $(MAINOBJ): $(MAINLIB) $(PKG) ! $(RM) $(MAINOBJ) ! $(HCPKG) -u -g -i $(PKG) $(MAINLIB): $(HOBJS) $(COBJS) $(STUBSTUBOBJS) --- 139,156 ---- all: release doc ! release: $(MAINLIB) ! install: $(MAINLIB) $(PKG) ! install -d $(LIBDIR)/imports/Graphics/UI/Port ! install -d $(LIBDIR)/include/port ! install -m 644 src/include/HsPort.h $(LIBDIR)/include/port ! install -m 644 imports/Graphics/UI/*.hi $(LIBDIR)/imports/Graphics/UI ! install -m 644 imports/Graphics/UI/Port/*.hi $(LIBDIR)/imports/Graphics/UI/Port ! install -m 644 $(MAINLIB) $(LIBDIR)/$(MAINLIB) ! install -m 644 src/include/HsPort.h $(LIBDIR)/include ! install -m 644 src/include/*.h $(LIBDIR)/include/port ! $(RM) $(LIBDIR)/include/port/HsPort.h ! $(RM) $(LIBDIR)/$(MAINOBJ) ! $(HCPKG) -u -g -i $(PKG) $(MAINLIB): $(HOBJS) $(COBJS) $(STUBSTUBOBJS) *************** *** 160,164 **** $(HOBJS): $(HOUTDIR)/%.o: %.hs ! $(HC) -o $@ -package-name port -ohi $(IMPORTDIR)/Graphics/UI/$(*D)/$(*F).hi -odir $(HOUTDIR)/$(*D) -c $< $(HC-OPTIONS) $($(*F)_OPTIONS) -i$(IMPORTDIR) $(INCDIRS) @# move stub files @-if test -f $(<D)/$(*F)_stub.h; then $(MV) $(<D)/$(*F)_stub.[ch] $(HOUTDIR)/$(*D); fi --- 168,172 ---- $(HOBJS): $(HOUTDIR)/%.o: %.hs ! $(HC) -o $@ -package-name port -ohi $(IMPORTDIR)/Graphics/UI/$(*D)/$(*F).hi -odir $(HOUTDIR)/$(*D) -c $< $(HC-OPTIONS) $($(*F)_OPTIONS) -i$(IMPORTDIR) $(INCDIRS) @# move stub files @-if test -f $(<D)/$(*F)_stub.h; then $(MV) $(<D)/$(*F)_stub.[ch] $(HOUTDIR)/$(*D); fi *************** *** 194,198 **** $(HOUTDIR)/Port/Window.o: $(HEADERDIR)/Window.h $(HOUTDIR)/Port/Canvas.o: $(HEADERDIR)/Canvas.h $(HEADERDIR)/Font.h ! $(HOUTDIR)/Port/FileDialog.o: $(HEADERDIR)/FileDialog.h $(HOUTDIR)/Port/Font.o: $(HEADERDIR)/Font.h $(HOUTDIR)/Port/Handlers.o: $(HEADERDIR)/Types.h $(HEADERDIR)/Timer.h --- 202,207 ---- $(HOUTDIR)/Port/Window.o: $(HEADERDIR)/Window.h $(HOUTDIR)/Port/Canvas.o: $(HEADERDIR)/Canvas.h $(HEADERDIR)/Font.h ! $(HOUTDIR)/Port/CommonDialogs.o: $(HEADERDIR)/CommonDialogs.h ! $(HOUTDIR)/Port/Message.o: $(HEADERDIR)/Message.h $(HOUTDIR)/Port/Font.o: $(HEADERDIR)/Font.h $(HOUTDIR)/Port/Handlers.o: $(HEADERDIR)/Types.h $(HEADERDIR)/Timer.h *************** *** 202,206 **** $(HEADERDIR)/EditBox.h $(HEADERDIR)/Label.h \ $(HEADERDIR)/ListBox.h $(HEADERDIR)/PopUp.h \ ! $(HEADERDIR)/RadioBox.h $(HEADERDIR)/Window.h --- 211,217 ---- $(HEADERDIR)/EditBox.h $(HEADERDIR)/Label.h \ $(HEADERDIR)/ListBox.h $(HEADERDIR)/PopUp.h \ ! $(HEADERDIR)/RadioBox.h $(HEADERDIR)/Window.h \ ! $(HEADERDIR)/ProgressBar.h $(HEADERDIR)/Slider.h ! $(HOUTDIR)/Port/ToolBar.o: $(HEADERDIR)/ToolBar.h |