From f7755b11d163316030ed0842ecd498f00851e19e Mon Sep 17 00:00:00 2001 From: nishi Date: Sat, 11 May 2024 05:16:42 +0000 Subject: [PATCH] add project files git-svn-id: file:///raid/svn-main/nishi-mandshurica/trunk@83 f982e544-4a7d-3444-ad1a-fde59a2a69f1 --- GNUmakefile | 14 +++++++------- Mandshurica/GNUmakefile | 2 +- Mandshurica/ms_project.h | 34 ++++++++++++++++++++++++++++++++++ Mandshurica/project.c | 31 +++++++++++++++++++++++++++++++ 4 files changed, 73 insertions(+), 8 deletions(-) create mode 100644 Mandshurica/ms_project.h create mode 100644 Mandshurica/project.c diff --git a/GNUmakefile b/GNUmakefile index 753d0db..d9a084c 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -2,12 +2,12 @@ PREFIX := /usr/local MODULE_PREFIX := $(PREFIX)/lib/mandshurica/module WEBROOT_PREFIX := $(PREFIX)/lib/mandshurica/webroot -PROJECTS_PREFIX := $(PREFIX)/lib/mandshurica/projects +PROJECT_PREFIX := $(PREFIX)/lib/mandshurica/project TOOL_PREFIX := $(PREFIX)/lib/mandshurica/tool DATABASE_PREFIX := $(PREFIX)/lib/mandshurica/db CC := gcc -CFLAGS := -g -std=c99 -DPREFIX=\\\"$(PREFIX)\\\" -DWEBROOT_PREFIX=\\\"$(WEBROOT_PREFIX)\\\" -DMODULE_PREFIX=\\\"$(MODULE_PREFIX)\\\" -DPROJECTS_PREFIX=\\\"$(PROJECTS_PREFIX)\\\" -DTOOL_PREFIX=\\\"$(TOOL_PREFIX)\\\" -DDATABASE_PREFIX=\\\"$(DATABASE_PREFIX)\\\" -D_DEFAULT_SOURCE +CFLAGS := -g -std=c99 -DPREFIX=\\\"$(PREFIX)\\\" -DWEBROOT_PREFIX=\\\"$(WEBROOT_PREFIX)\\\" -DMODULE_PREFIX=\\\"$(MODULE_PREFIX)\\\" -DPROJECT_PREFIX=\\\"$(PROJECT_PREFIX)\\\" -DTOOL_PREFIX=\\\"$(TOOL_PREFIX)\\\" -DDATABASE_PREFIX=\\\"$(DATABASE_PREFIX)\\\" -D_DEFAULT_SOURCE LDFLAGS := LIBS := @@ -37,14 +37,14 @@ replace: done install: all - mkdir -p $(PREFIX) $(MODULE_PREFIX) $(DATABASE_PREFIX) $(WEBROOT_PREFIX) $(PROJECTS_PREFIX) $(TOOL_PREFIX) $(PREFIX)/etc $(PREFIX)/bin $(PREFIX)/lib/mandshurica/db + mkdir -p $(PREFIX) $(MODULE_PREFIX) $(DATABASE_PREFIX) $(WEBROOT_PREFIX) $(PROJECT_PREFIX) $(TOOL_PREFIX) $(PREFIX)/etc $(PREFIX)/bin $(PREFIX)/lib/mandshurica/db touch $(PREFIX)/lib/mandshurica/db/auth.db $(PREFIX)/lib/mandshurica/db/login.db $(PREFIX)/lib/mandshurica/db/project.db cp ./mkpasswd.pl $(PREFIX)/bin/ ./Mandshurica/mandshurica --create $(PREFIX)/etc/mandshurica.conf - $(MAKE) -C ./Mandshurica install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECTS_PREFIX="$(PROJECTS_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" - $(MAKE) -C ./Module install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECTS_PREFIX="$(PROJECTS_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" - $(MAKE) -C ./Tool install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECTS_PREFIX="$(PROJECTS_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" - $(MAKE) -C ./Webroot install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECTS_PREFIX="$(PROJECTS_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" + $(MAKE) -C ./Mandshurica install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECT_PREFIX="$(PROJECT_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" + $(MAKE) -C ./Module install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECT_PREFIX="$(PROJECT_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" + $(MAKE) -C ./Tool install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECT_PREFIX="$(PROJECT_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" + $(MAKE) -C ./Webroot install PREFIX="$(PREFIX)" MODULE_PREFIX="$(MODULE_PREFIX)" PROJECT_PREFIX="$(PROJECT_PREFIX)" TOOL_PREFIX="$(TOOL_PREFIX)" WEBROOT_PREFIX="$(WEBROOT_PREFIX)" DATABASE_PREFIX="$(DATABASE_PREFIX)" @echo "-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*" @echo "Mandshurica executable has been installed to $(PREFIX)/bin" @echo "mkpasswd.pl has been installed to $(PREFIX)/bin" diff --git a/Mandshurica/GNUmakefile b/Mandshurica/GNUmakefile index bd7e82b..5c0a4b2 100644 --- a/Mandshurica/GNUmakefile +++ b/Mandshurica/GNUmakefile @@ -12,7 +12,7 @@ endif all: ./mandshurica -./mandshurica: ./main.o ./log.o ./config.o ./util.o ./template.o ./file.o ./db.o ./crypto.o +./mandshurica: ./main.o ./log.o ./config.o ./util.o ./template.o ./file.o ./db.o ./crypto.o ./project.o $(CC) $(LDFLAGS) $(EXTRA_LDFLAGS) -o $@ $^ $(LIBS) $(EXTRA_LIBS) ./main.o: ./main.c ./mandshurica.h diff --git a/Mandshurica/ms_project.h b/Mandshurica/ms_project.h new file mode 100644 index 0000000..e19ce93 --- /dev/null +++ b/Mandshurica/ms_project.h @@ -0,0 +1,34 @@ +/* $Id: ms_util.h 49 2024-04-20 02:24:31Z nishi $ */ +/* --- START LICENSE --- */ +/* -------------------------------------------------------------------------- */ +/* Mandshurica - Build Automation */ +/* -------------------------------------------------------------------------- */ +/* Copyright (c) 2024 Nishi. */ +/* Redistribution and use in source and binary forms, with or without modific */ +/* ation, are permitted provided that the following conditions are met: */ +/* 1. Redistributions of source code must retain the above copyright noti */ +/* ce, this list of conditions and the following disclaimer. */ +/* 2. Redistributions in binary form must reproduce the above copyright n */ +/* otice, this list of conditions and the following disclaimer in the documen */ +/* tation and/or other materials provided with the distribution. */ +/* 3. Neither the name of the copyright holder nor the names of its contr */ +/* ibutors may be used to endorse or promote products derived from this softw */ +/* are without specific prior written permission. */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS */ +/* " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, TH */ +/* E IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO */ +/* SE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS */ +/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CON */ +/* SEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITU */ +/* TE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPT */ +/* ION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S */ +/* TRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN */ +/* Y WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY */ +/* OF SUCH DAMAGE. */ +/* -------------------------------------------------------------------------- */ +/* --- END LICENSE --- */ + +#ifndef __MANDSHURICA_MS_PROJECT_H__ +#define __MANDSHURICA_MS_PROJECT_H__ + +#endif diff --git a/Mandshurica/project.c b/Mandshurica/project.c new file mode 100644 index 0000000..35942c5 --- /dev/null +++ b/Mandshurica/project.c @@ -0,0 +1,31 @@ +/* $Id: util.c 50 2024-04-20 02:35:41Z nishi $ */ +/* --- START LICENSE --- */ +/* -------------------------------------------------------------------------- */ +/* Mandshurica - Build Automation */ +/* -------------------------------------------------------------------------- */ +/* Copyright (c) 2024 Nishi. */ +/* Redistribution and use in source and binary forms, with or without modific */ +/* ation, are permitted provided that the following conditions are met: */ +/* 1. Redistributions of source code must retain the above copyright noti */ +/* ce, this list of conditions and the following disclaimer. */ +/* 2. Redistributions in binary form must reproduce the above copyright n */ +/* otice, this list of conditions and the following disclaimer in the documen */ +/* tation and/or other materials provided with the distribution. */ +/* 3. Neither the name of the copyright holder nor the names of its contr */ +/* ibutors may be used to endorse or promote products derived from this softw */ +/* are without specific prior written permission. */ +/* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS */ +/* " AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, TH */ +/* E IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPO */ +/* SE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS */ +/* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CON */ +/* SEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITU */ +/* TE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPT */ +/* ION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, S */ +/* TRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN AN */ +/* Y WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY */ +/* OF SUCH DAMAGE. */ +/* -------------------------------------------------------------------------- */ +/* --- END LICENSE --- */ + +#include "ms_project.h" -- 2.43.0