From: nishi Date: Mon, 17 Jun 2024 00:00:28 +0000 (+0000) Subject: sepearate huge makefiles X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=978cc302e53781496e65c60e20de569687915416;p=dataworks.git sepearate huge makefiles git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@315 d4a5a174-5a4a-5b4b-b672-37683c10d7d5 --- diff --git a/Makefiles/archive.mk b/Makefiles/archive.mk new file mode 100644 index 0000000..697db4f --- /dev/null +++ b/Makefiles/archive.mk @@ -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 diff --git a/Makefiles/common-decl.mk b/Makefiles/common-decl.mk index f142967..f045ba8 100644 --- a/Makefiles/common-decl.mk +++ b/Makefiles/common-decl.mk @@ -1,4 +1,4 @@ -# $Id$ +# $Id: common-decl.mk 302 2024-06-14 12:23:13Z nishi $ CC = cc SHCC = cc diff --git a/Makefiles/common.mk b/Makefiles/common.mk index 683ad90..4b38fae 100644 --- a/Makefiles/common.mk +++ b/Makefiles/common.mk @@ -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 index 0000000..2f669ba --- /dev/null +++ b/Makefiles/dosbox.mk @@ -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 index 0000000..de40e49 --- /dev/null +++ b/Makefiles/package.mk @@ -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