Selaa lähdekoodia

* Switched utils to fpmake building

git-svn-id: trunk@24621 -
joost 12 vuotta sitten
vanhempi
commit
94e7cd5a51
63 muutettua tiedostoa jossa 6042 lisäystä ja 12303 poistoa
  1. 20 0
      .gitattributes
  2. 10 889
      utils/Makefile
  3. 89 69
      utils/Makefile.fpc
  4. 84 0
      utils/Makefile.fpc.fpcmake
  5. 617 928
      utils/debugsvr/Makefile
  6. 78 13
      utils/debugsvr/Makefile.fpc
  7. 28 0
      utils/debugsvr/Makefile.fpc.fpcmake
  8. 564 221
      utils/dxegen/Makefile
  9. 79 7
      utils/dxegen/Makefile.fpc
  10. 21 0
      utils/dxegen/Makefile.fpc.fpcmake
  11. 10 704
      utils/fpcm/Makefile
  12. 72 55
      utils/fpcm/Makefile.fpc
  13. 85 0
      utils/fpcm/Makefile.fpc.fpcmake
  14. 95 424
      utils/fpcmkcfg/Makefile
  15. 78 36
      utils/fpcmkcfg/Makefile.fpc
  16. 51 0
      utils/fpcmkcfg/Makefile.fpc.fpcmake
  17. 9 505
      utils/fpcres/Makefile
  18. 79 9
      utils/fpcres/Makefile.fpc
  19. 23 0
      utils/fpcres/Makefile.fpc.fpcmake
  20. 9 505
      utils/fpcreslipo/Makefile
  21. 79 8
      utils/fpcreslipo/Makefile.fpc
  22. 22 0
      utils/fpcreslipo/Makefile.fpc.fpcmake
  23. 7 915
      utils/fpdoc/Makefile
  24. 74 32
      utils/fpdoc/Makefile.fpc
  25. 51 0
      utils/fpdoc/Makefile.fpc.fpcmake
  26. 9 734
      utils/fpmc/Makefile
  27. 74 20
      utils/fpmc/Makefile.fpc
  28. 39 0
      utils/fpmc/Makefile.fpc.fpcmake
  29. 5 3
      utils/fppkg/Makefile
  30. 4 0
      utils/fppkg/Makefile.fpc
  31. 374 437
      utils/fprcp/Makefile
  32. 79 6
      utils/fprcp/Makefile.fpc
  33. 20 0
      utils/fprcp/Makefile.fpc.fpcmake
  34. 375 657
      utils/h2pas/Makefile
  35. 74 42
      utils/h2pas/Makefile.fpc
  36. 61 0
      utils/h2pas/Makefile.fpc.fpcmake
  37. 9 551
      utils/importtl/Makefile
  38. 85 7
      utils/importtl/Makefile.fpc
  39. 15 0
      utils/importtl/Makefile.fpc.fpcmake
  40. 299 656
      utils/instantfpc/Makefile
  41. 76 13
      utils/instantfpc/Makefile.fpc
  42. 30 0
      utils/instantfpc/Makefile.fpc.fpcmake
  43. 374 437
      utils/mksymbian/Makefile
  44. 79 10
      utils/mksymbian/Makefile.fpc
  45. 24 0
      utils/mksymbian/Makefile.fpc.fpcmake
  46. 7 562
      utils/pas2fpm/Makefile
  47. 75 12
      utils/pas2fpm/Makefile.fpc
  48. 30 0
      utils/pas2fpm/Makefile.fpc.fpcmake
  49. 10 558
      utils/pas2jni/Makefile
  50. 80 8
      utils/pas2jni/Makefile.fpc
  51. 21 0
      utils/pas2jni/Makefile.fpc.fpcmake
  52. 7 562
      utils/pas2ut/Makefile
  53. 75 12
      utils/pas2ut/Makefile.fpc
  54. 30 0
      utils/pas2ut/Makefile.fpc.fpcmake
  55. 564 218
      utils/rmwait/Makefile
  56. 82 4
      utils/rmwait/Makefile.fpc
  57. 15 0
      utils/rmwait/Makefile.fpc.fpcmake
  58. 373 878
      utils/tply/Makefile
  59. 72 30
      utils/tply/Makefile.fpc
  60. 51 0
      utils/tply/Makefile.fpc.fpcmake
  61. 9 557
      utils/unicode/Makefile
  62. 79 9
      utils/unicode/Makefile.fpc
  63. 23 0
      utils/unicode/Makefile.fpc.fpcmake

+ 20 - 0
.gitattributes

@@ -14241,6 +14241,7 @@ tests/webtbs/uw9113a.pp svneol=native#text/plain
 tests/webtbs/uw9113b.pp svneol=native#text/plain
 utils/Makefile svneol=native#text/plain
 utils/Makefile.fpc svneol=native#text/plain
+utils/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/README.txt svneol=native#text/plain
 utils/bin2obj.pp svneol=native#text/plain
 utils/creumap.pp svneol=native#text/plain
@@ -14248,6 +14249,7 @@ utils/data2inc.exm -text
 utils/data2inc.pp svneol=native#text/plain
 utils/debugsvr/Makefile svneol=native#text/plain
 utils/debugsvr/Makefile.fpc svneol=native#text/plain
+utils/debugsvr/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/debugsvr/README.txt svneol=native#text/plain
 utils/debugsvr/console/Makefile svneol=native#text/plain
 utils/debugsvr/console/Makefile.fpc svneol=native#text/plain
@@ -14277,11 +14279,13 @@ utils/debugsvr/testdebug.pp svneol=native#text/plain
 utils/delp.pp svneol=native#text/plain
 utils/dxegen/Makefile svneol=native#text/plain
 utils/dxegen/Makefile.fpc svneol=native#text/plain
+utils/dxegen/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/dxegen/coff.pp svneol=native#text/plain
 utils/dxegen/dxegen.pp svneol=native#text/plain
 utils/dxegen/fpmake.pp svneol=native#text/plain
 utils/fpcm/Makefile svneol=native#text/plain
 utils/fpcm/Makefile.fpc svneol=native#text/plain
+utils/fpcm/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpcm/Makefile.fpmake.bs.template svneol=native#text/plain
 utils/fpcm/Makefile.fpmake.template svneol=native#text/plain
 utils/fpcm/convert_all_fpmake.sh svneol=native#text/plain
@@ -14303,6 +14307,7 @@ utils/fpcm/readme.txt svneol=native#text/plain
 utils/fpcm/revision.inc svneol=native#text/plain
 utils/fpcmkcfg/Makefile svneol=native#text/plain
 utils/fpcmkcfg/Makefile.fpc svneol=native#text/plain
+utils/fpcmkcfg/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpcmkcfg/default.cft svneol=native#text/plain
 utils/fpcmkcfg/default.inc svneol=native#text/plain
 utils/fpcmkcfg/fpc.cft svneol=native#text/plain
@@ -14317,6 +14322,7 @@ utils/fpcmkcfg/fppkg.cfg svneol=native#text/plain
 utils/fpcmkcfg/fppkg.inc svneol=native#text/plain
 utils/fpcres/Makefile svneol=native#text/plain
 utils/fpcres/Makefile.fpc svneol=native#text/plain
+utils/fpcres/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpcres/closablefilestream.pas svneol=native#text/plain
 utils/fpcres/fpcjres.pas svneol=native#text/plain
 utils/fpcres/fpcres.pas svneol=native#text/plain
@@ -14328,6 +14334,7 @@ utils/fpcres/sourcehandler.pas svneol=native#text/plain
 utils/fpcres/target.pas svneol=native#text/plain
 utils/fpcreslipo/Makefile svneol=native#text/plain
 utils/fpcreslipo/Makefile.fpc svneol=native#text/plain
+utils/fpcreslipo/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpcreslipo/fpcreslipo.pp svneol=native#text/plain
 utils/fpcreslipo/fpmake.pp svneol=native#text/plain
 utils/fpcreslipo/msghandler.pp svneol=native#text/plain
@@ -14336,6 +14343,7 @@ utils/fpcreslipo/sourcehandler.pp svneol=native#text/plain
 utils/fpdoc/COPYING.txt svneol=native#text/plain
 utils/fpdoc/Makefile svneol=native#text/plain
 utils/fpdoc/Makefile.fpc svneol=native#text/plain
+utils/fpdoc/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpdoc/README.txt svneol=native#text/plain
 utils/fpdoc/css.inc svneol=native#text/plain
 utils/fpdoc/dglobals.pp svneol=native#text/plain
@@ -14426,6 +14434,7 @@ utils/fpmake_add.inc svneol=native#text/plain
 utils/fpmake_proc.inc svneol=native#text/plain
 utils/fpmc/Makefile svneol=native#text/plain
 utils/fpmc/Makefile.fpc svneol=native#text/plain
+utils/fpmc/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fpmc/README.txt svneol=native#text/plain
 utils/fpmc/dumpfile.pp svneol=native#text/plain
 utils/fpmc/fpmake.pp svneol=native#text/plain
@@ -14485,6 +14494,7 @@ utils/fppkg/lnet/sys/osunits.inc svneol=native#text/plain
 utils/fppkg/pkglnet.pp svneol=native#text/plain
 utils/fprcp/Makefile svneol=native#text/plain
 utils/fprcp/Makefile.fpc svneol=native#text/plain
+utils/fprcp/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/fprcp/Readme.txt svneol=native#text/plain
 utils/fprcp/comments.pp svneol=native#text/plain
 utils/fprcp/demo.h -text
@@ -14498,6 +14508,7 @@ utils/fprcp/use_demo.bat -text
 utils/grab_vcsa.pp -text
 utils/h2pas/Makefile svneol=native#text/plain
 utils/h2pas/Makefile.fpc svneol=native#text/plain
+utils/h2pas/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/h2pas/README.txt svneol=native#text/plain
 utils/h2pas/converu.pas svneol=native#text/plain
 utils/h2pas/fpmake.pp svneol=native#text/plain
@@ -14514,11 +14525,13 @@ utils/h2pas/yylex.cod -text
 utils/h2pas/yyparse.cod -text
 utils/importtl/Makefile svneol=native#text/plain
 utils/importtl/Makefile.fpc svneol=native#text/plain
+utils/importtl/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/importtl/fpmake.pp svneol=native#text/plain
 utils/importtl/importtl.lpi svneol=native#text/plain
 utils/importtl/importtl.pas svneol=native#text/plain
 utils/instantfpc/Makefile svneol=native#text/plain
 utils/instantfpc/Makefile.fpc svneol=native#text/plain
+utils/instantfpc/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/instantfpc/README.txt svneol=native#text/plain
 utils/instantfpc/examples/envvars.pas svneol=native#text/plain
 utils/instantfpc/examples/exitcode.pas svneol=native#text/plain
@@ -14559,6 +14572,7 @@ utils/javapp/src/fpc/tools/javapp/TrapData.java svneol=native#text/plain
 utils/javapp/src/fpc/tools/javapp/TypeSignature.java svneol=native#text/plain
 utils/mksymbian/Makefile svneol=native#text/plain
 utils/mksymbian/Makefile.fpc svneol=native#text/plain
+utils/mksymbian/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/mksymbian/cfgfile.pas svneol=native#text/plain
 utils/mksymbian/cmdline.pas svneol=native#text/plain
 utils/mksymbian/compiler.pas svneol=native#text/plain
@@ -14569,11 +14583,13 @@ utils/mksymbian/projectparser.pas svneol=native#text/plain
 utils/mksymbian/sdkutil.pas svneol=native#text/plain
 utils/pas2fpm/Makefile svneol=native#text/plain
 utils/pas2fpm/Makefile.fpc svneol=native#text/plain
+utils/pas2fpm/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/pas2fpm/fpmake.pp svneol=native#text/plain
 utils/pas2fpm/pas2fpm.lpi svneol=native#text/plain
 utils/pas2fpm/pas2fpm.pp svneol=native#text/plain
 utils/pas2jni/Makefile svneol=native#text/plain
 utils/pas2jni/Makefile.fpc svneol=native#text/plain
+utils/pas2jni/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/pas2jni/def.pas svneol=native#text/plain
 utils/pas2jni/fpmake.pp svneol=native#text/plain
 utils/pas2jni/pas2jni.pas svneol=native#text/plain
@@ -14582,6 +14598,7 @@ utils/pas2jni/readme.txt svneol=native#text/plain
 utils/pas2jni/writer.pas svneol=native#text/plain
 utils/pas2ut/Makefile svneol=native#text/plain
 utils/pas2ut/Makefile.fpc svneol=native#text/plain
+utils/pas2ut/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/pas2ut/fpmake.pp svneol=native#text/plain
 utils/pas2ut/pas2ut.lpi svneol=native#text/plain
 utils/pas2ut/pas2ut.pp svneol=native#text/plain
@@ -14592,6 +14609,7 @@ utils/ptopu.pp svneol=native#text/plain
 utils/rmcvsdir.pp svneol=native#text/plain
 utils/rmwait/Makefile svneol=native#text/plain
 utils/rmwait/Makefile.fpc svneol=native#text/plain
+utils/rmwait/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/rmwait/fpmake.pp svneol=native#text/plain
 utils/rmwait/rmwait.pas svneol=native#text/plain
 utils/rstconv.pp svneol=native#text/plain
@@ -14670,6 +14688,7 @@ utils/svn2cvs/vers.pp svneol=native#text/plain
 utils/tply/COPYING.txt svneol=native#text/plain
 utils/tply/Makefile svneol=native#text/plain
 utils/tply/Makefile.fpc svneol=native#text/plain
+utils/tply/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/tply/README.txt svneol=native#text/plain
 utils/tply/fpmake.pp svneol=native#text/plain
 utils/tply/lexbase.pas svneol=native#text/plain
@@ -14699,6 +14718,7 @@ utils/tply/yylex.cod svneol=native#text/plain
 utils/tply/yyparse.cod svneol=native#text/plain
 utils/unicode/Makefile svneol=native#text/plain
 utils/unicode/Makefile.fpc svneol=native#text/plain
+utils/unicode/Makefile.fpc.fpcmake svneol=native#text/plain
 utils/unicode/cldrhelper.pas svneol=native#text/pascal
 utils/unicode/cldrparser.lpi svneol=native#text/plain
 utils/unicode/cldrparser.lpr svneol=native#text/pascal

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 10 - 889
utils/Makefile


+ 89 - 69
utils/Makefile.fpc

@@ -1,84 +1,104 @@
 #
-#   Makefile.fpc for Free Pascal Utils
+#   Makefile.fpc for running fpmake
 #
-
-[package]
-name=utils
-version=2.7.1
-
-[target]
-dirs=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg pas2ut pas2fpm pas2jni
-programs=ppdep ptop rstconv data2inc delp bin2obj postw32 rmcvsdir
-programs_linux=grab_vcsa
-dirs_win32=fpmc fpcres rmwait instantfpc importtl unicode
-dirs_win64=fpmc fpcres rmwait instantfpc importtl unicode
-dirs_wince=fpcres rmwait instantfpc
-dirs_haiku=fpcres instantfpc
-dirs_linux=fpcres instantfpc unicode
-dirs_freebsd=fpcres instantfpc
-dirs_openbsd=fpcres instantfpc
-dirs_netbsd=fpcres instantfpc
-dirs_darwin=fpcres fpcreslipo instantfpc unicode
-dirs_iphonesim=fpcres fpcreslipo instantfpc
-dirs_solaris=fpcres instantfpc
-dirs_os2=fpmc fpcres rmwait
-dirs_emx=fpmc fpcres rmwait
-dirs_go32v2=rmwait
-dirs_aix=fpcres instantfpc
-rsts=rstconv
-
 [require]
-packages=fcl-base paszlib hash
-packages_darwin=univint
-packages_iphonesim=univint
-
-[clean]
-units=ptopu
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
+fpcsubdir=utils
 
 [default]
 fpcdir=..
 
+[prerules]
+# Translate INSTALL_UNITDIR to fpmake's --unitinstalldir parameter
+ifdef INSTALL_UNITDIR
+FPMAKE_INSTALL_OPT+=--unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# Translate OS_TARGET and CPU_TARGET to fpmake's --os and --cpu parameters
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
-#
-# Pascal beautifier
-#
-ptop$(EXEEXT): ptop.pp ptopu$(PPUEXT)
-
-ptopu$(PPUEXT): ptopu.pp
-
-#
-# Other
-#
-
-ppdep$(EXEEXT): ppdep.pp
-
-#
-# Don't export some tools, which are found in the current dir if it's in
-# the path, so are not valid for the subdirs
-#
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=..
+FPMAKE_OPT+=--globalunitdir=../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+ifndef BUILDFULLNATIVE
+FPMAKE_OPT+=-sp
+endif
+.NOTPARALLEL:
 
-unexport DATA2INC
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
 
-# order dependencies to avoid link.res clashes
-# -- only supported as of Make 3.80, which is not available for go32v2 ->
-#    no parallel making here...
-#
-#grab_vcsa$(EXEEXT): | ppdep$(EXEEXT)
-#
-#ppdep$(EXEEXT): | ptop$(EXEEXT)
-#
-#ptop$(EXEEXT): | postw32$(EXEEXT)
-#
-#postw32$(EXEEXT): | rstconv$(EXEEXT)
-#
-#rstconv$(EXEEXT): | data2inc$(EXEEXT)
-#
-#data2inc$(EXEEXT): | delp$(EXEEXT)
-#
-#delp$(EXEEXT): | bin2obj$(EXEEXT)
+CLEAN_TARGET_DIRS=$(subst /Makefile.fpc, ,$(wildcard */Makefile.fpc))
+%_distclean:
+	$(MAKE) -C $* distclean
 
-.NOTPARALLEL:
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	fpc_cleanall $(addsuffix _distclean,$(CLEAN_TARGET_DIRS))
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+	-$(DEL) fpmake.o
+	-$(DEL) fpmake.dbg
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) $(FPMAKE_INSTALL_OPT)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) $(FPMAKE_INSTALL_OPT)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) $(FPMAKE_INSTALL_OPT) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) $(FPMAKE_INSTALL_OPT) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 84 - 0
utils/Makefile.fpc.fpcmake

@@ -0,0 +1,84 @@
+#
+#   Makefile.fpc for Free Pascal Utils
+#
+
+[package]
+name=utils
+version=2.7.1
+
+[target]
+dirs=fppkg fpcm tply h2pas fprcp dxegen fpdoc fpcmkcfg pas2ut pas2fpm pas2jni
+programs=ppdep ptop rstconv data2inc delp bin2obj postw32 rmcvsdir
+programs_linux=grab_vcsa
+dirs_win32=fpmc fpcres rmwait instantfpc importtl unicode
+dirs_win64=fpmc fpcres rmwait instantfpc importtl unicode
+dirs_wince=fpcres rmwait instantfpc
+dirs_haiku=fpcres instantfpc
+dirs_linux=fpcres instantfpc unicode
+dirs_freebsd=fpcres instantfpc
+dirs_openbsd=fpcres instantfpc
+dirs_netbsd=fpcres instantfpc
+dirs_darwin=fpcres fpcreslipo instantfpc unicode
+dirs_iphonesim=fpcres fpcreslipo instantfpc
+dirs_solaris=fpcres instantfpc
+dirs_os2=fpmc fpcres rmwait
+dirs_emx=fpmc fpcres rmwait
+dirs_go32v2=rmwait
+dirs_aix=fpcres instantfpc
+rsts=rstconv
+
+[require]
+packages=fcl-base paszlib hash
+packages_darwin=univint
+packages_iphonesim=univint
+
+[clean]
+units=ptopu
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=..
+
+
+[rules]
+#
+# Pascal beautifier
+#
+ptop$(EXEEXT): ptop.pp ptopu$(PPUEXT)
+
+ptopu$(PPUEXT): ptopu.pp
+
+#
+# Other
+#
+
+ppdep$(EXEEXT): ppdep.pp
+
+#
+# Don't export some tools, which are found in the current dir if it's in
+# the path, so are not valid for the subdirs
+#
+
+unexport DATA2INC
+
+# order dependencies to avoid link.res clashes
+# -- only supported as of Make 3.80, which is not available for go32v2 ->
+#    no parallel making here...
+#
+#grab_vcsa$(EXEEXT): | ppdep$(EXEEXT)
+#
+#ppdep$(EXEEXT): | ptop$(EXEEXT)
+#
+#ptop$(EXEEXT): | postw32$(EXEEXT)
+#
+#postw32$(EXEEXT): | rstconv$(EXEEXT)
+#
+#rstconv$(EXEEXT): | data2inc$(EXEEXT)
+#
+#data2inc$(EXEEXT): | delp$(EXEEXT)
+#
+#delp$(EXEEXT): | bin2obj$(EXEEXT)
+
+.NOTPARALLEL:

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 617 - 928
utils/debugsvr/Makefile


+ 78 - 13
utils/debugsvr/Makefile.fpc

@@ -1,16 +1,13 @@
 #
-#   Makefile.fpc for debugserver
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-units=msgintf debugserverintf dbugintf
-dirs=gtk console
-examples=testdebug speeddebug
-rsts=debugserverintf dbugintf
+[package]
+name=debugsvr
+version=2.7.1
 
-[clean]
-
-[compiler]
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -18,11 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-debugserverintf$(PPUEXT): msgintf$(PPUEXT) debugserverintf.pp
-        $(COMPILER) debugserverintf$(PASEXT)
 
-dbugintf$(PPUEXT): msgintf$(PPUEXT) dbugintf.pp
-        $(COMPILER) dbugintf.pp
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 28 - 0
utils/debugsvr/Makefile.fpc.fpcmake

@@ -0,0 +1,28 @@
+#
+#   Makefile.fpc for debugserver
+#
+
+[target]
+units=msgintf debugserverintf dbugintf
+dirs=gtk console
+examples=testdebug speeddebug
+rsts=debugserverintf dbugintf
+
+[clean]
+
+[compiler]
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+
+[rules]
+.NOTPARALLEL:
+debugserverintf$(PPUEXT): msgintf$(PPUEXT) debugserverintf.pp
+        $(COMPILER) debugserverintf$(PASEXT)
+
+dbugintf$(PPUEXT): msgintf$(PPUEXT) dbugintf.pp
+        $(COMPILER) dbugintf.pp

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 564 - 221
utils/dxegen/Makefile


+ 79 - 7
utils/dxegen/Makefile.fpc

@@ -1,12 +1,13 @@
 #
-#   Makefile.fpc for Free Pascal Utils
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs_go32v2=dxegen
+[package]
+name=dxegen
+version=2.7.1
 
-[clean]
-units=coff
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -14,8 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-dxegen$(EXEEXT): dxegen.pp coff$(PPUEXT)
 
-coff$(PPUEXT)  : coff.pp
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 21 - 0
utils/dxegen/Makefile.fpc.fpcmake

@@ -0,0 +1,21 @@
+#
+#   Makefile.fpc for Free Pascal Utils
+#
+
+[target]
+programs_go32v2=dxegen
+
+[clean]
+units=coff
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+dxegen$(EXEEXT): dxegen.pp coff$(PPUEXT)
+
+coff$(PPUEXT)  : coff.pp

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 10 - 704
utils/fpcm/Makefile


+ 72 - 55
utils/fpcm/Makefile.fpc

@@ -1,17 +1,13 @@
 #
-#   Makefile.fpc for FPCMake
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fpcmake
-rsts=fpcmmain
-
-[clean]
-units=fpcmmain fpcmdic fpcmwr fpcmpkg
+[package]
+name=fpcm
+version=2.7.1
 
 [require]
-packages=fcl-base
-tools=data2inc
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -20,62 +16,83 @@ fpcpackage=y
 fpcdir=../..
 
 [prerules]
-BS_UNITDIR=$(BASEDIR)/units/$(SOURCESUFFIX)
-
-# Check if revision.inc is present
-REVINC:=$(wildcard revision.inc)
-ifneq ($(REVINC),)
-# File revision.inc is present
-# Use it to compile fpcmmain.pp unit
-override FPCOPT+=-dREVINC
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
 endif
-REVINC_FILES=$(wildcard fpcm*.pp fpcmake.ini Makefile.fpc)
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+BS_UNITDIR=$(BASEDIR)/units/$(SOURCESUFFIX)
 
-SVN:=$(firstword $(wildcard $(addsuffix /svn$(SRCEXEEXT),$(SEARCHPATH))))
-SVNLOG:=svninfo.log
-# This one can be overriden on command line for debugging purposes
-GETREVEXE:=./getrev$(EXEEXT)
 
 [rules]
-.NOTPARALLEL:
-ifneq ($(DATA2INC),)
-fpcmake.inc: fpcmake.ini
-        $(DATA2INC) -b -s fpcmake.ini fpcmake.inc fpcmakeini
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
 endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
 
-
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
 ifdef inUnix
-EnableRevIncRule=1
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
 endif
-ifdef inCygWin
-EnableRevIncRule=1
+	-$(DEL) $(LOCALFPMAKE)
 endif
-
-ifneq (,$(SVN))
-# revision.inc rule
-revision.inc : $(REVINC_FILES)
-	-$(SVN) info $(REVINC_FILES) > $(SVNLOG)
-	$(MAKE) getrev$(EXEEXT)
-	$(GETREVEXE) $(SVNLOG)
-	-$(DEL) getrev$(EXEEXT)
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
 endif
-
-.PHONY : revision
-
-# Use -B option to force
-# regeneration of revision.inc
-revision :
-	$(MAKE) -B revision.inc
-
-
-fpcmwr$(PPUEXT): fpcmake.inc
-
-fpcmmain$(PPUEXT): $(REVINC)
-
-fpcmake$(EXEEXT): $(wildcard fpcm*.pp) fpcmake.inc $(REVINC)
-
-fpcmake$(EXEEXT): fpcmwr$(PPUEXT) fpcmmain$(PPUEXT)
-
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie
 # Cygwin doesn't like c:/path/
 ifndef inCygWin
 $(BS_UNITDIR):

+ 85 - 0
utils/fpcm/Makefile.fpc.fpcmake

@@ -0,0 +1,85 @@
+#
+#   Makefile.fpc for FPCMake
+#
+
+[target]
+programs=fpcmake
+rsts=fpcmmain
+
+[clean]
+units=fpcmmain fpcmdic fpcmwr fpcmpkg
+
+[require]
+packages=fcl-base
+tools=data2inc
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[prerules]
+BS_UNITDIR=$(BASEDIR)/units/$(SOURCESUFFIX)
+
+# Check if revision.inc is present
+REVINC:=$(wildcard revision.inc)
+ifneq ($(REVINC),)
+# File revision.inc is present
+# Use it to compile fpcmmain.pp unit
+override FPCOPT+=-dREVINC
+endif
+REVINC_FILES=$(wildcard fpcm*.pp fpcmake.ini Makefile.fpc)
+
+SVN:=$(firstword $(wildcard $(addsuffix /svn$(SRCEXEEXT),$(SEARCHPATH))))
+SVNLOG:=svninfo.log
+# This one can be overriden on command line for debugging purposes
+GETREVEXE:=./getrev$(EXEEXT)
+
+[rules]
+.NOTPARALLEL:
+ifneq ($(DATA2INC),)
+fpcmake.inc: fpcmake.ini
+        $(DATA2INC) -b -s fpcmake.ini fpcmake.inc fpcmakeini
+endif
+
+
+ifdef inUnix
+EnableRevIncRule=1
+endif
+ifdef inCygWin
+EnableRevIncRule=1
+endif
+
+ifneq (,$(SVN))
+# revision.inc rule
+revision.inc : $(REVINC_FILES)
+	-$(SVN) info $(REVINC_FILES) > $(SVNLOG)
+	$(MAKE) getrev$(EXEEXT)
+	$(GETREVEXE) $(SVNLOG)
+	-$(DEL) getrev$(EXEEXT)
+endif
+
+.PHONY : revision
+
+# Use -B option to force
+# regeneration of revision.inc
+revision :
+	$(MAKE) -B revision.inc
+
+
+fpcmwr$(PPUEXT): fpcmake.inc
+
+fpcmmain$(PPUEXT): $(REVINC)
+
+fpcmake$(EXEEXT): $(wildcard fpcm*.pp) fpcmake.inc $(REVINC)
+
+fpcmake$(EXEEXT): fpcmwr$(PPUEXT) fpcmmain$(PPUEXT)
+
+# Cygwin doesn't like c:/path/
+ifndef inCygWin
+$(BS_UNITDIR):
+        $(MKDIRTREE) $(BS_UNITDIR)
+bootstrap: $(BS_UNITDIR) fpcmake.inc
+        $(FPCFPMAKE) fpcmake.pp $(FPMAKE_SKIP_CONFIG) -Fu$(UNITDIR_FPMAKE_RTL) -FU$(BS_UNITDIR) $(OPT)
+endif

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 95 - 424
utils/fpcmkcfg/Makefile


+ 78 - 36
utils/fpcmkcfg/Makefile.fpc

@@ -1,51 +1,93 @@
 #
-#   Makefile.fpc for fpcmkcfg
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fpcmkcfg
-rst=fpcmkcfg
+[package]
+name=fpcmkcfg
+version=2.7.1
+
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
 
-[require]
-tools=data2inc
-packages=fcl-base fcl-process
-tools=data2inc
-
 [default]
 fpcdir=../..
 
-[shared]
-build=n
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
-#
-# PPU Tools
-#
-
-# not parallel because systems using an external linker will get conflicts
-# due to overwriting each other's link.res file
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
 
-fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc fppkg.inc default.inc
-
-ifneq ($(DATA2INC),)
-fpccfg.inc: fpc.cft
-        $(DATA2INC) -b -s fpc.cft fpccfg.inc DefaultConfig
-
-fpcfg.inc : fpinc.cfg
-        $(DATA2INC) -b -s fpinc.cfg fpcfg.inc fpcfg
-
-fpini.inc : fpinc.ini
-        $(DATA2INC) -b -s fpinc.ini fpini.inc fpini
-
-fppkg.inc : fppkg.cfg
-        $(DATA2INC) -b -s fppkg.cfg fppkg.inc fppkg
-
-default.inc : default.cft
-        $(DATA2INC) -b -s default.cft default.inc fppkg_default
-
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
 endif
-
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 51 - 0
utils/fpcmkcfg/Makefile.fpc.fpcmake

@@ -0,0 +1,51 @@
+#
+#   Makefile.fpc for fpcmkcfg
+#
+
+[target]
+programs=fpcmkcfg
+rst=fpcmkcfg
+
+[install]
+fpcpackage=y
+
+[require]
+tools=data2inc
+packages=fcl-base fcl-process
+tools=data2inc
+
+[default]
+fpcdir=../..
+
+[shared]
+build=n
+
+[rules]
+#
+# PPU Tools
+#
+
+# not parallel because systems using an external linker will get conflicts
+# due to overwriting each other's link.res file
+.NOTPARALLEL:
+
+fpcmkcfg$(EXEEXT): fpcmkcfg.pp fpccfg.inc fpcfg.inc fpini.inc fppkg.inc default.inc
+
+ifneq ($(DATA2INC),)
+fpccfg.inc: fpc.cft
+        $(DATA2INC) -b -s fpc.cft fpccfg.inc DefaultConfig
+
+fpcfg.inc : fpinc.cfg
+        $(DATA2INC) -b -s fpinc.cfg fpcfg.inc fpcfg
+
+fpini.inc : fpinc.ini
+        $(DATA2INC) -b -s fpinc.ini fpini.inc fpini
+
+fppkg.inc : fppkg.cfg
+        $(DATA2INC) -b -s fppkg.cfg fppkg.inc fppkg
+
+default.inc : default.cft
+        $(DATA2INC) -b -s default.cft default.inc fppkg_default
+
+endif
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 505
utils/fpcres/Makefile


+ 79 - 9
utils/fpcres/Makefile.fpc

@@ -1,15 +1,13 @@
 #
-#   Makefile.fpc for fpcres
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fpcres fpcjres
-
-[clean]
-units=closablefilestream msghandler paramparser sourcehandler target jarsourcehandler jarparamparser
+[package]
+name=fpcres
+version=2.7.1
 
 [require]
-packages=rtl fcl-res paszlib
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -17,7 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpcres$(EXEEXT): target.pas msghandler.pas closablefilestream.pas paramparser.pas sourcehandler.pas fpcres.pas
-fpcjres$(EXEEXT): msghandler.pas closablefilestream.pas paramparser.pas sourcehandler.pas fpcjres.pas jarsourcehandler.pas
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 23 - 0
utils/fpcres/Makefile.fpc.fpcmake

@@ -0,0 +1,23 @@
+#
+#   Makefile.fpc for fpcres
+#
+
+[target]
+programs=fpcres fpcjres
+
+[clean]
+units=closablefilestream msghandler paramparser sourcehandler target jarsourcehandler jarparamparser
+
+[require]
+packages=rtl fcl-res paszlib
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+fpcres$(EXEEXT): target.pas msghandler.pas closablefilestream.pas paramparser.pas sourcehandler.pas fpcres.pas
+fpcjres$(EXEEXT): msghandler.pas closablefilestream.pas paramparser.pas sourcehandler.pas fpcjres.pas jarsourcehandler.pas

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 505
utils/fpcreslipo/Makefile


+ 79 - 8
utils/fpcreslipo/Makefile.fpc

@@ -1,15 +1,13 @@
 #
-#   Makefile.fpc for fpcreslipo
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fpcreslipo
-
-[clean]
-units=msghandler paramparser sourcehandler
+[package]
+name=fpcreslipo
+version=2.7.1
 
 [require]
-packages=rtl fcl-res
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -17,6 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpcreslipo$(EXEEXT): msghandler.pp paramparser.pp sourcehandler.pp fpcreslipo.pp
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 22 - 0
utils/fpcreslipo/Makefile.fpc.fpcmake

@@ -0,0 +1,22 @@
+#
+#   Makefile.fpc for fpcreslipo
+#
+
+[target]
+programs=fpcreslipo
+
+[clean]
+units=msghandler paramparser sourcehandler
+
+[require]
+packages=rtl fcl-res
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+fpcreslipo$(EXEEXT): msghandler.pp paramparser.pp sourcehandler.pp fpcreslipo.pp

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 7 - 915
utils/fpdoc/Makefile


+ 74 - 32
utils/fpdoc/Makefile.fpc

@@ -1,5 +1,5 @@
 #
-#   Makefile.fpc for FPDoc
+#   Makefile.fpc for running fpmake
 #
 
 [package]
@@ -7,19 +7,7 @@ name=fpdoc
 version=2.7.1
 
 [require]
-packages=fcl-base fcl-xml fcl-passrc chm
-packages_darwin=univint
-packages_iphonesim=univint
-
-[target]
-programs=fpdoc makeskel unitdiff fpclasschart
-rst=dwriter fpdoc dglobals makeskel dwlinear 
-# removed to reduce dependencies of rpm.
-#dirs_linux_i386=fpde
-#dirs_win32=fpde
-
-[compiler]
-options=-S2h
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -27,25 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
-[clean]
-units=dglobals dwriter dw_xml sh_pas dw_html dw_latex dw_ipf dw_txt dw_man dwlinear dw_linrtf dw_dxml fpdocproj fpdocxmlopts mkfpdoc
-files=dwriter.rst fpdoc.rst dglobals.rst makeskel.rst fpdocopts.rst
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpdoc$(EXEEXT): fpdoc.pp dglobals.pp dwriter.pp dw_xml.pp sh_pas.pp dw_html.pp\
-  dw_latex.pp dwlinear.pp dw_txt.pp dw_linrtf.pp css.inc plusimage.inc minusimage.inc
-
-makeskel$(EXEEXT): makeskel.pp dglobals.pp
-
-css.inc: fpdoc.css ../bin2obj$(EXEEXT)
-	../bin2obj$(EXEEXT) -o css.inc -c DefaultCSS fpdoc.css
-
-plusimage.inc: images/plus.png ../bin2obj$(EXEEXT)
-	../bin2obj$(EXEEXT) -o plusimage.inc -c PlusImageData images/plus.png
-
-minusimage.inc: images/minus.png ../bin2obj$(EXEEXT)
-	../bin2obj$(EXEEXT) -o minusimage.inc -c MinusImageData images/minus.png
 
-../bin2obj$(EXEEXT):
-	$(MAKE) -C .. bin2obj$(EXEEXT)
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 51 - 0
utils/fpdoc/Makefile.fpc.fpcmake

@@ -0,0 +1,51 @@
+#
+#   Makefile.fpc for FPDoc
+#
+
+[package]
+name=fpdoc
+version=2.7.1
+
+[require]
+packages=fcl-base fcl-xml fcl-passrc chm
+packages_darwin=univint
+packages_iphonesim=univint
+
+[target]
+programs=fpdoc makeskel unitdiff fpclasschart
+rst=dwriter fpdoc dglobals makeskel dwlinear 
+# removed to reduce dependencies of rpm.
+#dirs_linux_i386=fpde
+#dirs_win32=fpde
+
+[compiler]
+options=-S2h
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[clean]
+units=dglobals dwriter dw_xml sh_pas dw_html dw_latex dw_ipf dw_txt dw_man dwlinear dw_linrtf dw_dxml fpdocproj fpdocxmlopts mkfpdoc
+files=dwriter.rst fpdoc.rst dglobals.rst makeskel.rst fpdocopts.rst
+
+[rules]
+.NOTPARALLEL:
+fpdoc$(EXEEXT): fpdoc.pp dglobals.pp dwriter.pp dw_xml.pp sh_pas.pp dw_html.pp\
+  dw_latex.pp dwlinear.pp dw_txt.pp dw_linrtf.pp css.inc plusimage.inc minusimage.inc
+
+makeskel$(EXEEXT): makeskel.pp dglobals.pp
+
+css.inc: fpdoc.css ../bin2obj$(EXEEXT)
+	../bin2obj$(EXEEXT) -o css.inc -c DefaultCSS fpdoc.css
+
+plusimage.inc: images/plus.png ../bin2obj$(EXEEXT)
+	../bin2obj$(EXEEXT) -o plusimage.inc -c PlusImageData images/plus.png
+
+minusimage.inc: images/minus.png ../bin2obj$(EXEEXT)
+	../bin2obj$(EXEEXT) -o minusimage.inc -c MinusImageData images/minus.png
+
+../bin2obj$(EXEEXT):
+	$(MAKE) -C .. bin2obj$(EXEEXT)

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 734
utils/fpmc/Makefile


+ 74 - 20
utils/fpmc/Makefile.fpc

@@ -1,20 +1,13 @@
 #
-#   Makefile.fpc for Free Pascal Message Compiler
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fpmc
-programs_linux=fpmcgtk
-programs_win32=$(FPMCGTK)
-rsts=frmabout frmmain frmoptions msgcomp
-
-[clean]
-units=frmmain msgcomp frmabout frmoptions
+[package]
+name=fpmc
+version=2.7.1
 
 [require]
-packages=fcl-base fpgtk
-
-[compiler]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -23,17 +16,78 @@ fpcpackage=y
 fpcdir=../..
 
 [prerules]
-ifeq ($(OS_TARGET),win32)
-GTKDLL:=$(strip $(wildcard $(addsuffix /libgtk-0.dll,$(SEARCHPATH))))
-ifneq ($(GTKDLL),)
-FPMCGTK=fpmcgtk
-else
-$(warning GTK DLLs not found, skipping build of fpmcgtk)
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
 endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
 endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpmc$(EXEEXT): msgcomp.pp fpmc.pp
 
-fpmcgtk$(EXEEXT): msgcomp.pp fpmcgtk.pp $(wildcard frm*.pp)
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 39 - 0
utils/fpmc/Makefile.fpc.fpcmake

@@ -0,0 +1,39 @@
+#
+#   Makefile.fpc for Free Pascal Message Compiler
+#
+
+[target]
+programs=fpmc
+programs_linux=fpmcgtk
+programs_win32=$(FPMCGTK)
+rsts=frmabout frmmain frmoptions msgcomp
+
+[clean]
+units=frmmain msgcomp frmabout frmoptions
+
+[require]
+packages=fcl-base fpgtk
+
+[compiler]
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[prerules]
+ifeq ($(OS_TARGET),win32)
+GTKDLL:=$(strip $(wildcard $(addsuffix /libgtk-0.dll,$(SEARCHPATH))))
+ifneq ($(GTKDLL),)
+FPMCGTK=fpmcgtk
+else
+$(warning GTK DLLs not found, skipping build of fpmcgtk)
+endif
+endif
+
+[rules]
+.NOTPARALLEL:
+fpmc$(EXEEXT): msgcomp.pp fpmc.pp
+
+fpmcgtk$(EXEEXT): msgcomp.pp fpmcgtk.pp $(wildcard frm*.pp)

+ 5 - 3
utils/fppkg/Makefile

@@ -2272,13 +2272,11 @@ examples:
 shared:
 sourceinstall: fpc_sourceinstall
 exampleinstall: fpc_exampleinstall
-zipinstall: fpc_zipinstall
 zipsourceinstall: fpc_zipsourceinstall
 zipexampleinstall: fpc_zipexampleinstall
-zipdistinstall: fpc_zipdistinstall
 info: fpc_info
 makefiles: fpc_makefiles
-.PHONY: units examples shared sourceinstall exampleinstall zipinstall zipsourceinstall zipexampleinstall zipdistinstall info makefiles
+.PHONY: units examples shared sourceinstall exampleinstall zipsourceinstall zipexampleinstall info makefiles
 ifneq ($(wildcard fpcmake.loc),)
 include fpcmake.loc
 endif
@@ -2334,3 +2332,7 @@ ifdef UNIXHier
 else
 	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
 endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 4 - 0
utils/fppkg/Makefile.fpc

@@ -87,3 +87,7 @@ ifdef UNIXHier
 else
 	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
 endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 374 - 437
utils/fprcp/Makefile


+ 79 - 6
utils/fprcp/Makefile.fpc

@@ -1,12 +1,13 @@
 #
-#   Makefile.fpc for fprcp
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=fprcp
+[package]
+name=fprcp
+version=2.7.1
 
-[clean]
-units=comments expr pasprep
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -14,7 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpcrp$(EXEEXT): fpcrp.pp comments.pp pexpr.pp pasprep.pp
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 20 - 0
utils/fprcp/Makefile.fpc.fpcmake

@@ -0,0 +1,20 @@
+#
+#   Makefile.fpc for fprcp
+#
+
+[target]
+programs=fprcp
+
+[clean]
+units=comments expr pasprep
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+
+[rules]
+.NOTPARALLEL:
+fpcrp$(EXEEXT): fpcrp.pp comments.pp pexpr.pp pasprep.pp

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 375 - 657
utils/h2pas/Makefile


+ 74 - 42
utils/h2pas/Makefile.fpc

@@ -1,15 +1,13 @@
 #
-#   Makefile.fpc for h2pas
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=h2pas h2paspp
+[package]
+name=h2pas
+version=2.7.1
 
-[clean]
-units=h2poptions h2plexlib scan h2pyacclib converu
-
-[compiler]
-options=-Sg
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -17,45 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-# do we have pyacc?
-ifndef PYACC
-PYACC=$(strip $(wildcard $(addsuffix /pyacc$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PYACC),)
-PYACC=
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
 else
-export PYACC:=$(firstword $(PYACC))
-endif
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
 endif
-
-# do we have plex?
-ifndef PLEX
-PLEX=$(strip $(wildcard $(addsuffix /plex$(EXEEXT),$(SEARCHPATH))))
-ifeq ($(PLEX),)
-PLEX=
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
 else
-export PLEX:=$(firstword $(PLEX))
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
 endif
+	-$(DEL) $(LOCALFPMAKE)
 endif
-
-h2pas$(EXEEXT): h2pas.pas scan.pas h2poptions.pas
-
-#
-# Lex and Yacc (only if pyacc is found)
-#
-ifdef  PYACC
-h2pas.pas: h2pas.y
-        $(PYACC) h2pas.y
-
-yacclex: yacc lex
-
-scan.pas: scan.l
-        $(PLEX) scan.l
-
-yacc:
-        $(PYACC) h2pas.y
-
-lex :
-        $(PLEX) scan.l
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
 endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 61 - 0
utils/h2pas/Makefile.fpc.fpcmake

@@ -0,0 +1,61 @@
+#
+#   Makefile.fpc for h2pas
+#
+
+[target]
+programs=h2pas h2paspp
+
+[clean]
+units=h2poptions h2plexlib scan h2pyacclib converu
+
+[compiler]
+options=-Sg
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+# do we have pyacc?
+ifndef PYACC
+PYACC=$(strip $(wildcard $(addsuffix /pyacc$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PYACC),)
+PYACC=
+else
+export PYACC:=$(firstword $(PYACC))
+endif
+endif
+
+# do we have plex?
+ifndef PLEX
+PLEX=$(strip $(wildcard $(addsuffix /plex$(EXEEXT),$(SEARCHPATH))))
+ifeq ($(PLEX),)
+PLEX=
+else
+export PLEX:=$(firstword $(PLEX))
+endif
+endif
+
+h2pas$(EXEEXT): h2pas.pas scan.pas h2poptions.pas
+
+#
+# Lex and Yacc (only if pyacc is found)
+#
+ifdef  PYACC
+h2pas.pas: h2pas.y
+        $(PYACC) h2pas.y
+
+yacclex: yacc lex
+
+scan.pas: scan.l
+        $(PLEX) scan.l
+
+yacc:
+        $(PYACC) h2pas.y
+
+lex :
+        $(PLEX) scan.l
+endif

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 551
utils/importtl/Makefile


+ 85 - 7
utils/importtl/Makefile.fpc

@@ -1,15 +1,93 @@
 #
-#   Makefile.fpc for h2pas
+#   Makefile.fpc for running fpmake
 #
-[install]
-fpcpackage=y
 
+[package]
+name=importtl
+version=2.7.1
 
-[target]
-programs=importtl
+[require]
+packages=rtl fpmkunit
+
+[install]
+fpcpackage=y
 
 [default]
 fpcdir=../..
 
-[require]
-packages=winunits-base fcl-base fcl-registry
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
+[rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 15 - 0
utils/importtl/Makefile.fpc.fpcmake

@@ -0,0 +1,15 @@
+#
+#   Makefile.fpc for h2pas
+#
+[install]
+fpcpackage=y
+
+
+[target]
+programs=importtl
+
+[default]
+fpcdir=../..
+
+[require]
+packages=winunits-base fcl-base fcl-registry

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 299 - 656
utils/instantfpc/Makefile


+ 76 - 13
utils/instantfpc/Makefile.fpc

@@ -1,30 +1,93 @@
 #
-#   Makefile.fpc for FPDoc
+#   Makefile.fpc for running fpmake
 #
 
 [package]
 name=instantfpc
 version=2.7.1
 
-[install]
-fpcpackage=y
-
 [require]
-packages=fcl-process
+packages=rtl fpmkunit
 
-[target]
-programs=instantfpc
-
-[compiler]
-options=-S2h
+[install]
+fpcpackage=y
 
 [default]
 fpcdir=../..
 
-[clean]
-units=instantfptools
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-fpdoc$(EXEEXT): instantfpc.pas instantfptools.pas
 
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 30 - 0
utils/instantfpc/Makefile.fpc.fpcmake

@@ -0,0 +1,30 @@
+#
+#   Makefile.fpc for FPDoc
+#
+
+[package]
+name=instantfpc
+version=2.7.1
+
+[install]
+fpcpackage=y
+
+[require]
+packages=fcl-process
+
+[target]
+programs=instantfpc
+
+[compiler]
+options=-S2h
+
+[default]
+fpcdir=../..
+
+[clean]
+units=instantfptools
+
+[rules]
+.NOTPARALLEL:
+fpdoc$(EXEEXT): instantfpc.pas instantfptools.pas
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 374 - 437
utils/mksymbian/Makefile


+ 79 - 10
utils/mksymbian/Makefile.fpc

@@ -1,17 +1,13 @@
 #
-#   Makefile.fpc for Free Pascal Symbian Build Tool
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=mksymbian
-
-[clean]
-units=cfgfile cmdline compiler constants projectparser sdkutil
+[package]
+name=mksymbian
+version=2.7.1
 
 [require]
-packages=
-
-[compiler]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -19,6 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-mksymbian$(EXEEXT): mksymbian.pas
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 24 - 0
utils/mksymbian/Makefile.fpc.fpcmake

@@ -0,0 +1,24 @@
+#
+#   Makefile.fpc for Free Pascal Symbian Build Tool
+#
+
+[target]
+programs=mksymbian
+
+[clean]
+units=cfgfile cmdline compiler constants projectparser sdkutil
+
+[require]
+packages=
+
+[compiler]
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+mksymbian$(EXEEXT): mksymbian.pas

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 7 - 562
utils/pas2fpm/Makefile


+ 75 - 12
utils/pas2fpm/Makefile.fpc

@@ -1,5 +1,5 @@
 #
-#   Makefile.fpc for pas2fpm
+#   Makefile.fpc for running fpmake
 #
 
 [package]
@@ -7,16 +7,7 @@ name=pas2fpm
 version=2.7.1
 
 [require]
-packages=fcl-passrc fcl-base
-packages_darwin=univint
-packages_iphonesim=univint
-
-[target]
-programs=pas2fpm
-rst=pas2fpm
-
-[compiler]
-options=-S2h
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -24,7 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-pas2fm$(EXEEXT): pas2fpm.pp
 
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 30 - 0
utils/pas2fpm/Makefile.fpc.fpcmake

@@ -0,0 +1,30 @@
+#
+#   Makefile.fpc for pas2fpm
+#
+
+[package]
+name=pas2fpm
+version=2.7.1
+
+[require]
+packages=fcl-passrc fcl-base
+packages_darwin=univint
+packages_iphonesim=univint
+
+[target]
+programs=pas2fpm
+rst=pas2fpm
+
+[compiler]
+options=-S2h
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+pas2fm$(EXEEXT): pas2fpm.pp
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 10 - 558
utils/pas2jni/Makefile


+ 80 - 8
utils/pas2jni/Makefile.fpc

@@ -1,15 +1,13 @@
 #
-#   Makefile.fpc for pas2jni
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=pas2jni
-
-[clean]
-units=pas2jni def ppuparser writer
+[package]
+name=pas2jni
+version=2.7.1
 
 [require]
-packages=rtl fcl-base fcl-json
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -17,5 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
-pas2jni$(EXEEXT): pas2jni.pas
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 21 - 0
utils/pas2jni/Makefile.fpc.fpcmake

@@ -0,0 +1,21 @@
+#
+#   Makefile.fpc for pas2jni
+#
+
+[target]
+programs=pas2jni
+
+[clean]
+units=pas2jni def ppuparser writer
+
+[require]
+packages=rtl fcl-base fcl-json
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+pas2jni$(EXEEXT): pas2jni.pas

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 7 - 562
utils/pas2ut/Makefile


+ 75 - 12
utils/pas2ut/Makefile.fpc

@@ -1,5 +1,5 @@
 #
-#   Makefile.fpc for pas2ut
+#   Makefile.fpc for running fpmake
 #
 
 [package]
@@ -7,16 +7,7 @@ name=pas2ut
 version=2.7.1
 
 [require]
-packages=fcl-passrc fcl-base
-packages_darwin=univint
-packages_iphonesim=univint
-
-[target]
-programs=pas2ut
-rst=pas2ut
-
-[compiler]
-options=-S2h
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -24,7 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-pas2ut$(EXEEXT): pas2ut.pp
 
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 30 - 0
utils/pas2ut/Makefile.fpc.fpcmake

@@ -0,0 +1,30 @@
+#
+#   Makefile.fpc for pas2ut
+#
+
+[package]
+name=pas2ut
+version=2.7.1
+
+[require]
+packages=fcl-passrc fcl-base
+packages_darwin=univint
+packages_iphonesim=univint
+
+[target]
+programs=pas2ut
+rst=pas2ut
+
+[compiler]
+options=-S2h
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+pas2ut$(EXEEXT): pas2ut.pp
+

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 564 - 218
utils/rmwait/Makefile


+ 82 - 4
utils/rmwait/Makefile.fpc

@@ -1,9 +1,13 @@
 #
-#   Makefile.fpc for Free Pascal Utils
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=rmwait
+[package]
+name=rmwait
+version=2.7.1
+
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -11,5 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
-rmwait$(EXEEXT): rmwait.pas
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
+.NOTPARALLEL:
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 15 - 0
utils/rmwait/Makefile.fpc.fpcmake

@@ -0,0 +1,15 @@
+#
+#   Makefile.fpc for Free Pascal Utils
+#
+
+[target]
+programs=rmwait
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+rmwait$(EXEEXT): rmwait.pas

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 373 - 878
utils/tply/Makefile


+ 72 - 30
utils/tply/Makefile.fpc

@@ -1,21 +1,13 @@
 #
-#   Makefile.fpc for Pascal lex/yacc
+#   Makefile.fpc for running fpmake
 #
 
 [package]
-name=lexyacc
+name=tply
 version=2.7.1
 
-[target]
-programs=plex pyacc
-units=lexlib yacclib
-
-[clean]
-units=lexbase lexopt lexdfa lexpos lexlist lexrules lexmsgs lextable \
-      yaccbase yaccmsgs yaccclos yaccpars yacclook yaccsem yacclr0 yacctabl
-
-[compiler]
-options=-Sg
+[require]
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -23,29 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
-[shared]
-build=n
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
 
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-pyacc$(EXEEXT): pyacc.pas $(wildcard yacc*.pas)
-        $(COMPILER) pyacc.pas
-
-plex$(EXEEXT): plex.pas $(wildcard lex*.pas)
-        $(COMPILER) plex.pas
-
-lexlib$(PPUEXT): lexlib.pas
-
-yacclib$(PPUEXT): yacclib.pas
 
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
 ifdef UNIXHier
-CODPATH=$(INSTALL_PREFIX)/lib/fpc/lexyacc
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
 else
-CODPATH=$(INSTALL_BINDIR)
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
 endif
-
-install: fpc_install
-ifndef CROSSINSTALL
-        $(MKDIR) $(CODPATH)
-        $(COPY) yylex.cod yyparse.cod $(CODPATH)
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
 endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 51 - 0
utils/tply/Makefile.fpc.fpcmake

@@ -0,0 +1,51 @@
+#
+#   Makefile.fpc for Pascal lex/yacc
+#
+
+[package]
+name=lexyacc
+version=2.7.1
+
+[target]
+programs=plex pyacc
+units=lexlib yacclib
+
+[clean]
+units=lexbase lexopt lexdfa lexpos lexlist lexrules lexmsgs lextable \
+      yaccbase yaccmsgs yaccclos yaccpars yacclook yaccsem yacclr0 yacctabl
+
+[compiler]
+options=-Sg
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[shared]
+build=n
+
+[rules]
+.NOTPARALLEL:
+pyacc$(EXEEXT): pyacc.pas $(wildcard yacc*.pas)
+        $(COMPILER) pyacc.pas
+
+plex$(EXEEXT): plex.pas $(wildcard lex*.pas)
+        $(COMPILER) plex.pas
+
+lexlib$(PPUEXT): lexlib.pas
+
+yacclib$(PPUEXT): yacclib.pas
+
+ifdef UNIXHier
+CODPATH=$(INSTALL_PREFIX)/lib/fpc/lexyacc
+else
+CODPATH=$(INSTALL_BINDIR)
+endif
+
+install: fpc_install
+ifndef CROSSINSTALL
+        $(MKDIR) $(CODPATH)
+        $(COPY) yylex.cod yyparse.cod $(CODPATH)
+endif

Tiedoston diff-näkymää rajattu, sillä se on liian suuri
+ 9 - 557
utils/unicode/Makefile


+ 79 - 9
utils/unicode/Makefile.fpc

@@ -1,15 +1,13 @@
 #
-#   Makefile.fpc for Unicode Utils
+#   Makefile.fpc for running fpmake
 #
 
-[target]
-programs=cldrparser unihelper
-
-[clean]
-units=cldrhelper cldrtest cldrxml grbtree helper trie uca_test unicodeset
+[package]
+name=unicode
+version=2.7.1
 
 [require]
-packages=rtl fcl-base fcl-xml
+packages=rtl fpmkunit
 
 [install]
 fpcpackage=y
@@ -17,7 +15,79 @@ fpcpackage=y
 [default]
 fpcdir=../..
 
+[prerules]
+FPMAKE_BIN_CLEAN=$(wildcard .$(PATHSEP)fpmake$(SRCEXEEXT))
+ifdef OS_TARGET
+FPC_TARGETOPT+=--os=$(OS_TARGET)
+endif
+ifdef CPU_TARGET
+FPC_TARGETOPT+=--cpu=$(CPU_TARGET)
+endif
+LOCALFPMAKE=.$(PATHSEP)fpmake$(SRCEXEEXT)
+
 [rules]
+# Do not pass the Makefile's unit and binary target locations. fpmake uses it's own.
+override FPCOPT:=$(filter-out -FU%,$(FPCOPT))
+override FPCOPT:=$(filter-out -FE%,$(FPCOPT))
+# Compose general fpmake-parameters
+ifdef FPMAKEOPT
+FPMAKE_OPT+=$(FPMAKEOPT)
+endif
+FPMAKE_OPT+=--localunitdir=../..
+FPMAKE_OPT+=--globalunitdir=../../packages
+FPMAKE_OPT+=$(FPC_TARGETOPT)
+FPMAKE_OPT+=$(addprefix -o ,$(FPCOPT))
+FPMAKE_OPT+=--compiler=$(FPC)
+FPMAKE_OPT+=-bu
 .NOTPARALLEL:
-cldrparser$(EXEEXT): cldrparser.lpr cldrhelper.pas helper.pas cldrtest.pas cldrxml.pas unicodeset.pas
-unihelper$(EXEEXT): unihelper.lpr helper.pas uca_test.pas
+
+fpmake: fpmake.pp
+	$(FPCFPMAKE) fpmake.pp $(FPMAKE_SKIP_CONFIG) $(addprefix -Fu,$(COMPILER_FPMAKE_UNITDIR)) $(FPCMAKEOPT) $(OPT)
+all:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT)
+smart:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -XX -o -CX
+release:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dRELEASE
+debug:	fpmake
+	$(LOCALFPMAKE) compile $(FPMAKE_OPT) -o -dDEBUG
+# If no fpmake exists and (dist)clean is called, do not try to build fpmake, it will
+# most often fail because the dependencies are cleared.
+# In case of a clean, simply do nothing
+ifeq ($(FPMAKE_BIN_CLEAN),)
+clean:
+else
+clean:
+	$(FPMAKE_BIN_CLEAN) clean $(FPMAKE_OPT)
+endif
+# In case of a distclean, perform an 'old'-style distclean. This to avoid problems
+# when the package is compiled using fpcmake prior to running this clean using fpmake
+ifeq ($(FPMAKE_BIN_CLEAN),)
+distclean:	$(addsuffix _distclean,$(TARGET_DIRS)) fpc_cleanall
+else
+distclean:
+ifdef inUnix
+        { $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT); if [ $$? != "0" ]; then { echo Something wrong with fpmake exectable. Remove the executable and call make recursively to recover.; $(DEL) $(FPMAKE_BIN_CLEAN); $(MAKE) fpc_cleanall; }; fi;  }
+else
+        $(FPMAKE_BIN_CLEAN) distclean $(FPMAKE_OPT)
+endif
+	-$(DEL) $(LOCALFPMAKE)
+endif
+cleanall: distclean
+install:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR)
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR) --unitinstalldir=$(INSTALL_UNITDIR)
+endif
+# distinstall also installs the example-sources
+distinstall:	fpmake
+ifdef UNIXHier
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_PREFIX) --baseinstalldir=$(INSTALL_LIBDIR)/fpc/$(FPC_VERSION) --unitinstalldir=$(INSTALL_UNITDIR) -ie
+else
+	$(LOCALFPMAKE) install $(FPMAKE_OPT) --prefix=$(INSTALL_BASEDIR)  --unitinstalldir=$(INSTALL_UNITDIR) -ie
+endif
+zipinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX)
+zipdistinstall:	fpmake
+	$(LOCALFPMAKE) zipinstall $(FPMAKE_OPT) --zipprefix=$(DIST_DESTDIR)/$(ZIPPREFIX) -ie

+ 23 - 0
utils/unicode/Makefile.fpc.fpcmake

@@ -0,0 +1,23 @@
+#
+#   Makefile.fpc for Unicode Utils
+#
+
+[target]
+programs=cldrparser unihelper
+
+[clean]
+units=cldrhelper cldrtest cldrxml grbtree helper trie uca_test unicodeset
+
+[require]
+packages=rtl fcl-base fcl-xml
+
+[install]
+fpcpackage=y
+
+[default]
+fpcdir=../..
+
+[rules]
+.NOTPARALLEL:
+cldrparser$(EXEEXT): cldrparser.lpr cldrhelper.pas helper.pas cldrtest.pas cldrxml.pas unicodeset.pas
+unihelper$(EXEEXT): unihelper.lpr helper.pas uca_test.pas

Kaikkia tiedostoja ei voida näyttää, sillä liian monta tiedostoa muuttui tässä diffissä