]> Nishi Git Mirror - dataworks.git/commitdiff
sepearate huge makefiles
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Mon, 17 Jun 2024 00:00:28 +0000 (00:00 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Mon, 17 Jun 2024 00:00:28 +0000 (00:00 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@315 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Makefiles/archive.mk [new file with mode: 0644]
Makefiles/common-decl.mk
Makefiles/common.mk
Makefiles/dosbox.mk [new file with mode: 0644]
Makefiles/package.mk [new file with mode: 0644]

diff --git a/Makefiles/archive.mk b/Makefiles/archive.mk
new file mode 100644 (file)
index 0000000..697db4f
--- /dev/null
@@ -0,0 +1,42 @@
+# $Id$
+
+.PHONY: archive archive-prepare archive-cleanup archive-targz archive-zip
+
+archive-prepare: all
+       rm -f dataworks.zip dataworks.tar.gz
+       rm -rf dataworks-dist
+       mkdir -p dataworks-dist
+       mkdir -p dataworks-dist/RemoteClient
+       mkdir -p dataworks-dist/Server
+       mkdir -p dataworks-dist/Client
+       mkdir -p dataworks-dist/Library
+       mkdir -p dataworks-dist/Document
+       -cp Library/*$(LIB_SUFFIX) dataworks-dist/Library/
+       -cp Library/*$(STATICLIB_SUFFIX) dataworks-dist/Library/
+       -cp Library/*.lib dataworks-dist/Library/
+       -cp Server/dataworks_server$(EXEC_SUFFIX) dataworks-dist/Server/
+       -rmdir dataworks-dist/Server
+       -cp RemoteClient/dataworks_remote_client$(EXEC_SUFFIX) dataworks-dist/RemoteClient/
+       -rmdir dataworks-dist/RemoteClient
+       cp Library/*.h dataworks-dist/Library/
+       cp Client/dataworks$(EXEC_SUFFIX) dataworks-dist/Client/
+       cp -rf Document/doc/html dataworks-dist/Document/html
+
+archive-cleanup:
+       rm -rf dataworks-dist
+
+archive-targz:
+       if [ "$(PREP)" = "" ]; then $(MAKE) archive-prepare ; fi
+       tar czvf dataworks.tar.gz dataworks-dist
+       if [ "$(PREP)" = "" ]; then $(MAKE) archive-cleanup ; fi
+
+archive-zip:
+       if [ "$(PREP)" = "" ]; then $(MAKE) archive-prepare ; fi
+       zip -rv dataworks.zip dataworks-dist
+       if [ "$(PREP)" = "" ]; then $(MAKE) archive-cleanup ; fi
+
+archive:
+       $(MAKE) archive-prepare
+       -$(MAKE) archive-targz PREP=NO
+       -$(MAKE) archive-zip PREP=NO
+       $(MAKE) archive-cleanup
index f1429674a5145610c374f62b745a2c591b0813b9..f045ba87501a11d6f282faedc0428c5c860d1596 100644 (file)
@@ -1,4 +1,4 @@
-# $Id$
+# $Id: common-decl.mk 302 2024-06-14 12:23:13Z nishi $
 
 CC = cc
 SHCC = cc
index 683ad90a8a3fddcc13b1cacca9c29fb77c67c6b1..4b38faeb6675f778c2c1d10cb179a54217cc9e11 100644 (file)
@@ -1,6 +1,6 @@
-# $Id$
+# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $
 
-.PHONY: all no-doc replace format clean ./Library ./Client ./Document ./Server ./Grammar ./RemoteClient ./Installer ./Tool ./Package/PKGBUILD archive archive-prepare archive-cleanup archive-targz archive-zip dosbox prepare-dosbox dosbox-x cleanup-dosbox get-version thanks-banner dos-installer
+.PHONY: all no-doc replace format clean ./Library ./Client ./Document ./Server ./Grammar ./RemoteClient ./Installer ./Tool get-version thanks-banner dos-installer
 
 all: ./Tool ./Grammar ./Library ./Client $(SERVER) $(RCLI) ./Document
        @$(MAKE) thanks-banner
@@ -105,117 +105,9 @@ dos-installer:
        if [ ! "$(FORMAT)" = "NO" ]; then rm -f install-dosbox.conf ; fi
        $(MAKE) clean
 
-archive-prepare: all
-       rm -f dataworks.zip dataworks.tar.gz
-       rm -rf dataworks-dist
-       mkdir -p dataworks-dist
-       mkdir -p dataworks-dist/RemoteClient
-       mkdir -p dataworks-dist/Server
-       mkdir -p dataworks-dist/Client
-       mkdir -p dataworks-dist/Library
-       mkdir -p dataworks-dist/Document
-       -cp Library/*$(LIB_SUFFIX) dataworks-dist/Library/
-       -cp Library/*$(STATICLIB_SUFFIX) dataworks-dist/Library/
-       -cp Library/*.lib dataworks-dist/Library/
-       -cp Server/dataworks_server$(EXEC_SUFFIX) dataworks-dist/Server/
-       -rmdir dataworks-dist/Server
-       -cp RemoteClient/dataworks_remote_client$(EXEC_SUFFIX) dataworks-dist/RemoteClient/
-       -rmdir dataworks-dist/RemoteClient
-       cp Library/*.h dataworks-dist/Library/
-       cp Client/dataworks$(EXEC_SUFFIX) dataworks-dist/Client/
-       cp -rf Document/doc/html dataworks-dist/Document/html
-
-archive-cleanup:
-       rm -rf dataworks-dist
-
-archive-targz:
-       if [ "$(PREP)" = "" ]; then $(MAKE) archive-prepare ; fi
-       tar czvf dataworks.tar.gz dataworks-dist
-       if [ "$(PREP)" = "" ]; then $(MAKE) archive-cleanup ; fi
-
-archive-zip:
-       if [ "$(PREP)" = "" ]; then $(MAKE) archive-prepare ; fi
-       zip -rv dataworks.zip dataworks-dist
-       if [ "$(PREP)" = "" ]; then $(MAKE) archive-cleanup ; fi
-
-archive:
-       $(MAKE) archive-prepare
-       -$(MAKE) archive-targz PREP=NO
-       -$(MAKE) archive-zip PREP=NO
-       $(MAKE) archive-cleanup
-
-prepare-dosbox: no-doc
-       echo 'create_table("test", "string:key", "floating:value");' > op.txt
-       echo '.tables' >> op.txt
-       echo "[serial]" > dosbox.conf
-       echo "serial1=modem listenport:4096" >> dosbox.conf
-       echo "[sdl]" >> dosbox.conf
-       echo "output=openglpp" >> dosbox.conf
-       echo "windowresolution=640x400" >> dosbox.conf
-       echo "[render]" >> dosbox.conf
-       echo "aspect=true" >> dosbox.conf
-       echo "aspect_ratio=9:5" >> dosbox.conf
-       echo "[cpu]" >> dosbox.conf
-       echo "cycles=12000" >> dosbox.conf
-       echo "[autoexec]" >> dosbox.conf
-       echo "mount c: ." >> dosbox.conf
-       echo "c:" >> dosbox.conf
-       echo "copy Server\*$(EXEC_SUFFIX) dwserv$(EXEC_SUFFIX)" >> dosbox.conf
-       echo "copy Client\*$(EXEC_SUFFIX) dw$(EXEC_SUFFIX)" >> dosbox.conf
-       echo "dwserv -p COM1 db.dwf" >> dosbox.conf
-       echo "dw /NC /f op.txt /create db.dwf" >> dosbox.conf
-       echo "dw /NC /f op.txt db.dwf" >> dosbox.conf
-       echo "pause" >> dosbox.conf
-       echo "del db.dwf" >> dosbox.conf
-       echo "del dw.exe" >> dosbox.conf
-       echo "del dwserv.exe" >> dosbox.conf
-       echo "exit" >> dosbox.conf
-       if [ ! -e "dos4gw.exe" ]; then wget "https://github.com/yetmorecode/dos32a-ng/releases/download/9.1.2/DOS32ANG.EXE" -O dos4gw.exe ; fi
-
-dosbox: prepare-dosbox
-       dosbox
-       $(MAKE) cleanup-dosbox
-
-dosbox-x: prepare-dosbox
-       dosbox-x -conf dosbox.conf
-       $(MAKE) cleanup-dosbox
-
-cleanup-dosbox:
-       rm -f op.txt dosbox.conf DW.* DWSERV.* dw.* dwserv.* dosbox.core
-
 get-version:
        @echo $(VERSION)
 
-./Package/PKGBUILD:
-       echo "# \$$Id\$$" > $@
-       echo >> $@
-       echo "pkgname='dataworks'" >> $@
-       echo "pkgver='"$(VERSION)"'" >> $@
-       echo "pkgdesc='Database System'" >> $@
-       echo "arch=('i686' 'x86_64')" >> $@
-       echo "license=('BSD')" >> $@
-       echo "pkgrel='`cat ./Package/increment-PKGBUILD`'" >> $@
-       echo "makedepends=('byacc')" >> $@
-       echo "source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision="`svn info -r HEAD | grep "Revision" | grep -Eo "[0-9]+" | xargs expr 1 +`"')" >> $@
-       echo "sha256sums=('SKIP')" >> $@
-       echo >> $@
-       echo "build() {" >> $@
-       echo "  cd dataworks" >> $@
-       echo "  make clean" >> $@
-       echo "  make no-doc YACC=byacc" >> $@
-       echo "}" >> $@
-       echo >> $@
-       echo "package() {" >> $@
-       echo "  cd dataworks" >> $@
-       echo "  mkdir -p \$$pkgdir/usr/include" >> $@
-       echo "  mkdir -p \$$pkgdir/usr/lib" >> $@
-       echo "  mkdir -p \$$pkgdir/usr/bin" >> $@
-       echo "  cp -rf Library/*.h \$$pkgdir/usr/include/" >> $@
-       echo "  cp -rf Library/*.a \$$pkgdir/usr/lib/" >> $@
-       echo "  cp -rf Library/*.so \$$pkgdir/usr/lib/" >> $@
-       echo "  cp -rf Server/dataworks_server \$$pkgdir/usr/bin/" >> $@
-       echo "  cp -rf Client/dataworks \$$pkgdir/usr/bin/" >> $@
-       echo "  ln -sf dataworks_server \$$pkgdir/usr/bin/dwserv" >> $@
-       echo "  ln -sf dataworks \$$pkgdir/usr/bin/dw" >> $@
-       echo "}" >> $@
-       expr `cat ./Package/increment-PKGBUILD` + 1 > ./Package/increment-PKGBUILD
+include Makefiles/archive.mk
+include Makefiles/dosbox.mk
+include Makefiles/package.mk
diff --git a/Makefiles/dosbox.mk b/Makefiles/dosbox.mk
new file mode 100644 (file)
index 0000000..2f669ba
--- /dev/null
@@ -0,0 +1,42 @@
+# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $
+
+.PHONY: dosbox prepare-dosbox dosbox-x cleanup-dosbox
+
+prepare-dosbox: no-doc
+       echo 'create_table("test", "string:key", "floating:value");' > op.txt
+       echo '.tables' >> op.txt
+       echo "[serial]" > dosbox.conf
+       echo "serial1=modem listenport:4096" >> dosbox.conf
+       echo "[sdl]" >> dosbox.conf
+       echo "output=openglpp" >> dosbox.conf
+       echo "windowresolution=640x400" >> dosbox.conf
+       echo "[render]" >> dosbox.conf
+       echo "aspect=true" >> dosbox.conf
+       echo "aspect_ratio=9:5" >> dosbox.conf
+       echo "[cpu]" >> dosbox.conf
+       echo "cycles=12000" >> dosbox.conf
+       echo "[autoexec]" >> dosbox.conf
+       echo "mount c: ." >> dosbox.conf
+       echo "c:" >> dosbox.conf
+       echo "copy Server\*$(EXEC_SUFFIX) dwserv$(EXEC_SUFFIX)" >> dosbox.conf
+       echo "copy Client\*$(EXEC_SUFFIX) dw$(EXEC_SUFFIX)" >> dosbox.conf
+       echo "dwserv -p COM1 db.dwf" >> dosbox.conf
+       echo "dw /NC /f op.txt /create db.dwf" >> dosbox.conf
+       echo "dw /NC /f op.txt db.dwf" >> dosbox.conf
+       echo "pause" >> dosbox.conf
+       echo "del db.dwf" >> dosbox.conf
+       echo "del dw.exe" >> dosbox.conf
+       echo "del dwserv.exe" >> dosbox.conf
+       echo "exit" >> dosbox.conf
+       if [ ! -e "dos4gw.exe" ]; then wget "https://github.com/yetmorecode/dos32a-ng/releases/download/9.1.2/DOS32ANG.EXE" -O dos4gw.exe ; fi
+
+dosbox: prepare-dosbox
+       dosbox
+       $(MAKE) cleanup-dosbox
+
+dosbox-x: prepare-dosbox
+       dosbox-x -conf dosbox.conf
+       $(MAKE) cleanup-dosbox
+
+cleanup-dosbox:
+       rm -f op.txt dosbox.conf DW.* DWSERV.* dw.* dwserv.* dosbox.core
diff --git a/Makefiles/package.mk b/Makefiles/package.mk
new file mode 100644 (file)
index 0000000..de40e49
--- /dev/null
@@ -0,0 +1,37 @@
+# $Id: common.mk 312 2024-06-15 02:13:12Z nishi $
+
+.PHONY: ./Package/PKGBUILD
+
+./Package/PKGBUILD:
+       echo "# \$$Id\$$" > $@
+       echo >> $@
+       echo "pkgname='dataworks'" >> $@
+       echo "pkgver='"$(VERSION)"'" >> $@
+       echo "pkgdesc='Database System'" >> $@
+       echo "arch=('i686' 'x86_64')" >> $@
+       echo "license=('BSD')" >> $@
+       echo "pkgrel='`cat ./Package/increment-PKGBUILD`'" >> $@
+       echo "makedepends=('byacc')" >> $@
+       echo "source=('dataworks::svn+http://sw.nishi.boats/svn/nishi-dataworks/trunk#revision="`svn info -r HEAD | grep "Revision" | grep -Eo "[0-9]+" | xargs expr 1 +`"')" >> $@
+       echo "sha256sums=('SKIP')" >> $@
+       echo >> $@
+       echo "build() {" >> $@
+       echo "  cd dataworks" >> $@
+       echo "  make clean" >> $@
+       echo "  make no-doc YACC=byacc" >> $@
+       echo "}" >> $@
+       echo >> $@
+       echo "package() {" >> $@
+       echo "  cd dataworks" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/include" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/lib" >> $@
+       echo "  mkdir -p \$$pkgdir/usr/bin" >> $@
+       echo "  cp -rf Library/*.h \$$pkgdir/usr/include/" >> $@
+       echo "  cp -rf Library/*.a \$$pkgdir/usr/lib/" >> $@
+       echo "  cp -rf Library/*.so \$$pkgdir/usr/lib/" >> $@
+       echo "  cp -rf Server/dataworks_server \$$pkgdir/usr/bin/" >> $@
+       echo "  cp -rf Client/dataworks \$$pkgdir/usr/bin/" >> $@
+       echo "  ln -sf dataworks_server \$$pkgdir/usr/bin/dwserv" >> $@
+       echo "  ln -sf dataworks \$$pkgdir/usr/bin/dw" >> $@
+       echo "}" >> $@
+       expr `cat ./Package/increment-PKGBUILD` + 1 > ./Package/increment-PKGBUILD