head	1.8;
access;
symbols
	V-0-2-4:1.6
	V-0-2-3:1.5
	V-0-2-2:1.5
	V-0-2-1:1.5
	V-0-2:1.5
	V-0-1:1.2;
locks; strict;
comment	@# @;


1.8
date	2001.01.18.08.58.07;	author wkoch;	state Exp;
branches;
next	1.7;

1.7
date	2001.01.18.07.18.02;	author wkoch;	state Exp;
branches;
next	1.6;

1.6
date	2000.03.28.12.15.40;	author wk;	state Exp;
branches;
next	1.5;

1.5
date	2000.03.27.11.26.43;	author wk;	state Exp;
branches;
next	1.4;

1.4
date	2000.03.20.16.12.34;	author wk;	state Exp;
branches;
next	1.3;

1.3
date	2000.03.20.15.33.08;	author wk;	state Exp;
branches;
next	1.2;

1.2
date	97.06.23.15.22.19;	author wk;	state Exp;
branches;
next	1.1;

1.1
date	97.06.23.15.07.41;	author wk;	state Exp;
branches;
next	;


desc
@@


1.8
log
@Make sure that binutils are build before gcc
@
text
@# [Makefile wk 19.06.97] for the Mingw32/CPD system
#

.PHONY: all install clean distclean dist libs make-binutils make-gcc \
	copy-api-headers

-include config.mk

gcclibdir := $(PREFIX)/lib/gcc-lib/${TARGET}/${GCCVER}
target_dir := $(PREFIX)/$(TARGET)
cpdver_age := $(CPDVER_AGE)

all: config.okay make-gcc libs

config.okay:
	@@./Configure
	@@echo
	@@echo "You should now re-run make"
	@@echo "(Please ignore the error, it is used to stop the make run)"
	exit 1

libs:	
	$(MAKE) -C src

install: all install-mingw32
	$(MAKE) -C src install

clean:
	$(MAKE) -C src clean
	-rm -f *.tmp *~

distclean:  clean
	-rm -f config.okay  config.mk config.cache config.new

dist:
	@@set -e; \
	version=$$(sed -ne '/^CPDVER=/s/.*=\([0-9.]*\)/\1/p' config.in); \
	echo "Making mingw32-cpd-$$version.tar.gz"; \
	cvs -q diff || exit 1; \
	test -d ../temp || mkdir ../temp; \
	cd ../temp || exit 2; \
	rm -rf mingw32-cpd-$$version; \
	mkdir mingw32-cpd-$$version || exit 2; \
	cvs -Q checkout -d mingw32-cpd-$$version mingw32-cpd ; \
	cd mingw32-cpd-$$version || exit 2; \
	tagver=V-$$(echo $$version| sed -e 's/\./-/g'); \
	echo "Tagging the CVS archives with $$tagver"; \
	cvs -Q tag $$tagver || exit 2; \
	rm -r $$(find . -name CVS -type d); \
	cd .. || exit 2; \
	echo "Creating tar file"; \
	tar czf mingw32-cpd-$$version.tar.gz mingw32-cpd-$$version


make-binutils:
	make -C binutils-build
	make -C binutils-build install
	set -e; cd $(PREFIX)/bin; ln -sf ../$(TARGET)/bin/dlltool .

make-gcc: make-binutils
	-mkdir -p $(PREFIX)/$(TARGET)/include
	cp -a src/include/* $(PREFIX)/${TARGET}/include
	-mkdir gcc-build/binutils
	ln -sf $(target_dir)/bin/ar gcc-build/binutils/ar
	ln -sf $(target_dir)/bin/ranlib gcc-build/binutils/ranlib
	make -C gcc-build LANGUAGES="c"
	make -C gcc-build LANGUAGES="c" install
	rm -rf $(gcclibdir)/include
	# $(target_dir)/bin/gcc -dumpspecs > $(gcclibdir)/specs
	-strip $(PREFIX)/bin/$(TARGET)-*
	-strip $(PREFIX)/$(TARGET)/bin/*

install-mingw32: 
	sed < mingw32.in > $(MAINPREFIX)/bin/mingw32.tmp \
	   -e "s,@@INSTALL_DIR@@,$(PREFIX),g" \
	   -e "s,@@VERSION@@,$(CPDVER),g"
	chmod +x $(MAINPREFIX)/bin/mingw32.tmp
	mv $(MAINPREFIX)/bin/mingw32.tmp $(MAINPREFIX)/bin/mingw32

@


1.7
log
@Some restructuring for version 0.3
@
text
@d60 2
a61 2
make-gcc: # make-binutils
	-mkdir $(PREFIX)/$(TARGET)/include
@


1.6
log
@*** empty log message ***
@
text
@d11 1
d22 1
a22 18
copy-api-headers:
	( set -e; \
	  srcdir="$(WINDOWS32API_SRC_PATH)/Headers" ; \
	  dstdir="$(target_dir)/include"            ; \
	  if [ ! -f "$$srcdir/windows.h" ]; then       \
	      echo "windows.h not found in $srcdir" ; \
	      exit 1				    ; \
	  fi					    ; \
	  if [ ! -d "$$srcdir/Windows32" ]; then       \
	      echo "Windows32 directory not in $srcdir" ; \
	      exit 1				    ; \
	  fi					    ; \
	  cp -a $$srcdir/* $$dstdir	  ; \
	  sed -f patches/Functions.h.sed \
	    $$srcdir/Windows32/Functions.h > $$dstdir/Windows32/Functions.h \
	)

libs:	copy-api-headers
d25 1
a25 1
install: all
a54 3



d60 1
a60 1
make-gcc: make-binutils
d63 3
d69 1
a69 5
	-if test -f patches/specs-$(GCCVER) ; then sed -e \
		     "s|@@@@TARGET_INC@@@@|$(target_dir)|" \
		      patches/specs-$(GCCVER) > $(gcclibdir)/specs ; \
         else $(target_dir)/bin/gcc -dumpspecs \
           | sed -e "s,/usr/local,$(PREFIX),g" > $(gcclibdir)/specs ; fi
d73 6
@


1.5
log
@builds again.
@
text
@d85 1
a85 1
	-test -f patches/specs-$(GCCVER) && sed -e \
d87 3
a89 1
		      patches/specs-$(GCCVER) > $(gcclibdir)/specs
@


1.4
log
@.
@
text
@d85 2
a86 2
	test -f patches/specs-$(GCCVER) && sed -e \
		     "s!@@@@TARGET_INC@@@@!$(target_dir)!" \
@


1.3
log
@Quite old changes
@
text
@d75 2
a76 2
	make -C $(BINUTILS_SRC_PATH)
	make -C $(BINUTILS_SRC_PATH) install
d82 2
a83 2
	make -C $(GCC_SRC_PATH) LANGUAGES="c"
	make -C $(GCC_SRC_PATH) LANGUAGES="c" install
d85 3
a87 1
	sed -e "s!@@@@TARGET_INC@@@@!$(target_dir)!" patches/specs > $(gcclibdir)/specs
@


1.2
log
@add dist tag
@
text
@d89 1
@


1.1
log
@First check in
@
text
@a51 1
	-test -d ../temp || mkdir ../temp
d54 19
a72 35
	echo making mingw32-cpd-$$version.tar.gz; \
	rm -rf ../temp/mingw32-cpd-$$version; \
	mkdir ../temp/mingw32-cpd-$$version || exit 2; \
	cvs diff || exit 1; \
	#ln  $$(cut -d/ -f2 CVS/Entries) $$homedir/temp/wedit-$$version/w/src; \
	#cd ../contrib || exit 2; \
	#cvs diff || exit 1; \
	#ln  $$(cut -d/ -f2 CVS/Entries) $$homedir/temp/wedit-$$version/w/contrib; \
	#cd $(WKLIBS)/wklib || exit 2; \
	#cvs diff || exit 1; \
	#ln $$(cut -d/ -f2 CVS/Entries) $$homedir/temp/wedit-$$version/wklib; \
	#cd $(WKLIBS)/wk || exit 2; \
	#cvs diff || exit 1; \
	#ln $$(cut -d/ -f2 CVS/Entries) $$homedir/temp/wedit-$$version/wk; \
	#cd $(WKTOOLS_DIR) || exit 2; \
	#ln $(DEVEL_TOOLS)  $$homedir/temp/wedit-$$version/tools/src; \
	#cd $$homedir/src || exit 2; \
	#cat README.Linux  >$$homedir/temp/wedit-$$version/README; \
	#cat Makefile.dist >$$homedir/temp/wedit-$$version/Makefile; \
	#cat $(WKLIBS)/COPYING	>$$homedir/temp/wedit-$$version/COPYING; \
	#cd $$homedir/temp || exit 2; \
	#tagver=wedit-$$(echo $$version| sed -e 's/\./-/g'); \
	#echo Tagging the CVS archives with $$tagver; \
	#for i in $$homedir/src \
	#	  $$homedir/contrib \
	#	  $(WKLIBS)/wklib \
	#	  $(WKLIBS)/wk \
	#	  $(WKTOOLS_DIR) \
	#   ; do \
	#   cd $$i || exit 2; \
	#  cvs -Q tag $$tagver || exit 2; \
	#done; \
	#echo Creating tar file; \
	#cd $$homedir/temp || exit 2; \
	#tar chzf wedit-$$version.tar.gz wedit-$$version
@
