Compare commits

...

31 Commits

Author SHA1 Message Date
a86e6ae9b0 Import the newer scripts from DeforaOS configure 2024-12-20 21:22:58 +01:00
2afdc3aada deforaos-c-ci_ubuntu-latest: use checkout v4 2024-05-26 00:08:31 +02:00
d3e158a717 README.md: install this file as well 2022-05-10 03:09:38 +02:00
1f93c2c86a README.md: initial import 2022-05-10 03:09:16 +02:00
7826c03ebc Create deforaos-c-ci_ubuntu-latest.yml 2022-05-10 02:56:10 +02:00
b75fc10cea Prepare to release DeforaOS CPP 0.0.6 2022-04-30 22:25:48 +02:00
2e529e785a Document a race condition issue 2022-04-30 22:24:34 +02:00
b5d49ab82e Update the copyright notice 2022-04-30 22:20:11 +02:00
35e6a0c428 Use PROGNAME_CPP for the binary name 2022-04-30 22:20:00 +02:00
45918377c7 Complete the GtkDoc documentation 2022-04-30 05:11:04 +02:00
a0cbdcb4c0 Pass the "clint" test 2022-04-30 05:09:44 +02:00
de0a1ee8e3 Prepare to release DeforaOS CPP 0.0.5 2022-04-30 05:03:13 +02:00
ab9afb258f Register the vendor 2022-04-30 05:02:51 +02:00
25d63a2e48 Import missing files 2022-04-30 05:01:42 +02:00
92ca340c67 Register some documentation targets 2022-04-30 02:15:20 +02:00
a2662cb960 Prepare to release DeforaOS CPP 0.0.4 2022-04-30 02:13:10 +02:00
e00a6acbd3 Register config.ent 2022-04-30 02:11:24 +02:00
375ef49946 Review the documentation generation
This notably fixes "make distcheck".
2022-04-30 02:11:15 +02:00
a79124b8d5 Also install the COPYING file 2022-04-30 02:02:21 +02:00
1d3ae53c60 Add support for compilation modes 2022-04-30 02:02:08 +02:00
a79535107d Import the newer scripts from DeforaOS configure 2022-04-30 01:55:12 +02:00
a5f07547c0 Register the three tests 2022-01-31 19:19:15 +01:00
2bcac1eb7c Import the "clint" and "distcheck" tests 2022-01-31 19:17:13 +01:00
dc06c4db9d Fix "make dist" 2022-01-31 19:16:05 +01:00
b44a81085a Generate the GtkDoc documentation with XML 2022-01-31 19:09:33 +01:00
965b125eb8 Update the copyright notice 2022-01-31 19:03:14 +01:00
67e0f4b38f Build libcpp in its own folder 2022-01-31 19:03:14 +01:00
df68815cb5 Import the newer scripts from DeforaOS configure 2020-11-19 03:17:47 +01:00
f29338bf63 Import a test for FIXME in comments
Disabled by default.
2018-02-24 21:36:26 +01:00
d185479478 Update a couple comments 2016-03-06 13:44:15 +01:00
414e1bc8df Build cpp(1) as PIE and with RELRO by default 2016-03-06 13:37:19 +01:00
26 changed files with 1033 additions and 182 deletions

View File

@ -0,0 +1,27 @@
name: DeforaOS C CI (ubuntu-latest)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: bootstrap libSystem
run: git clone https://github.com/DeforaOS/libSystem.git libSystem && for dir in include data src; do (cd libSystem/$dir && make PREFIX="$HOME/opt/DeforaOS" install); done
- name: bootstrap configure
run: git clone https://github.com/DeforaOS/configure.git configure && (cd configure/src && PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make PREFIX="$HOME/opt/DeforaOS" install)
- name: configure
run: $HOME/opt/DeforaOS/bin/configure -p "$HOME/opt/DeforaOS"
- name: make
run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared"
- name: make tests
run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared" tests
- name: make distcheck
run: PKG_CONFIG_PATH="$HOME/opt/DeforaOS/lib/pkgconfig" make CCSHARED="cc -shared" distcheck

1
.gitignore vendored
View File

@ -5,5 +5,6 @@ Makefile
*.so
*.so.*
*.so.*.*
/config.ent
/config.h
/config.sh

44
README.md Normal file
View File

@ -0,0 +1,44 @@
DeforaOS CPP
============
About CPP
---------
CPP is a macro preprocessor for the C programming language. It provides the
ability for the inclusion of header files, macro expansions, conditional
compilation, and line control.
CPP depends on the DeforaOS libSystem library (version 0.4.3 or above),
which is found on the website for the DeforaOS Project:
<https://www.defora.org/>.
Compiling CPP
-------------
CPP depends on the following components:
* DeforaOS libSystem
* An implementation of `make`
* GTK-Doc for the API documentation
With GCC, this should then be enough to compile and install CPP:
$ make install
To install CPP in a dedicated directory, like `/path/to/CPP`:
$ make PREFIX="/path/to/CPP" install
Distributing CPP
----------------
DeforaOS CPP is subject to the terms of the GNU LGPL license (version 3).
Please see the `COPYING` file for more information.
Known issues
------------
* The cpp(1) binary may conflict with the system's own version.
* Macro expansions are not fully supported yet.

View File

@ -1,6 +1,6 @@
#!/bin/sh
#$Id$
#Copyright (c) 2011-2015 Pierre Pronchery <khorben@defora.org>
#Copyright (c) 2011-2022 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
@ -25,19 +25,116 @@
#variables
CONFIGSH="${0%/pkgconfig.sh}/../config.sh"
PREFIX="/usr/local"
[ -f "../config.sh" ] && . "../config.sh"
DEBUG="_debug"
DEVNULL="/dev/null"
PROGNAME="pkgconfig.sh"
#executables
INSTALL="install -m 0644"
DEBUG="_debug"
INSTALL="install"
MKDIR="mkdir -m 0755 -p"
RM="rm -f"
SED="sed"
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
#functions
#pkgconfig
_pkgconfig()
{
#check the variables
if [ -z "$PACKAGE" ]; then
_error "The PACKAGE variable needs to be set"
return $?
fi
if [ -z "$VERSION" ]; then
_error "The VERSION variable needs to be set"
return $?
fi
[ -z "$BINDIR" ] && BINDIR="$PREFIX/bin"
[ -z "$DATADIR" ] && DATADIR="$PREFIX/share"
[ -z "$INCLUDEDIR" ] && INCLUDEDIR="$PREFIX/include"
[ -z "$LIBDIR" ] && LIBDIR="$PREFIX/lib"
[ -z "$LIBEXECDIR" ] && LIBEXECDIR="$PREFIX/libexec"
[ -z "$MANDIR" ] && MANDIR="$DATADIR/man"
[ -z "$SBINDIR" ] && SBINDIR="$PREFIX/sbin"
if [ -z "$SYSCONFDIR" ]; then
SYSCONFDIR="$PREFIX/etc"
[ "$PREFIX" = "/usr" ] && SYSCONFDIR="/etc"
fi
PKGCONFIG="$PREFIX/lib/pkgconfig"
while [ $# -gt 0 ]; do
target="$1"
shift
#clean
[ "$clean" -ne 0 ] && continue
#uninstall
if [ "$uninstall" -eq 1 ]; then
$DEBUG $RM -- "$PKGCONFIG/$target" || return 2
continue
fi
#install
if [ "$install" -eq 1 ]; then
source="${target#$OBJDIR}"
$DEBUG $MKDIR -- "$PKGCONFIG" || return 2
mode="-m 0644"
basename="$source"
if [ "${source##*/}" != "$source" ]; then
basename="${source##*/}"
fi
$DEBUG $INSTALL $mode "$target" "$PKGCONFIG/$basename" \
|| return 2
continue
fi
#portability
RPATH=
if [ "$PREFIX" != "/usr" ]; then
RPATH="-Wl,-rpath-link,\${libdir} -Wl,-rpath,\${libdir}"
case $(uname -s) in
"Darwin")
RPATH="-Wl,-rpath,\${libdir}"
;;
"SunOS")
RPATH="-Wl,-R\${libdir}"
;;
esac
fi
#create
source="${target#$OBJDIR}"
source="${source}.in"
([ -z "$OBJDIR" ] || $DEBUG $MKDIR -- "${target%/*}") \
|| return 2
$DEBUG $SED -e "s;@VENDOR@;$VENDOR;g" \
-e "s;@PACKAGE@;$PACKAGE;g" \
-e "s;@VERSION@;$VERSION;g" \
-e "s;@PREFIX@;$PREFIX;g" \
-e "s;@BINDIR@;$BINDIR;g" \
-e "s;@DATADIR@;$DATADIR;g" \
-e "s;@INCLUDEDIR@;$INCLUDEDIR;g" \
-e "s;@LIBDIR@;$LIBDIR;g" \
-e "s;@LIBEXECDIR@;$LIBEXECDIR;g" \
-e "s;@MANDIR@;$MANDIR;g" \
-e "s;@PWD@;$PWD;g" \
-e "s;@RPATH@;$RPATH;g" \
-e "s;@SBINDIR@;$SBINDIR;g" \
-e "s;@SYSCONFDIR@;$SYSCONFDIR;g" \
-- "$source" > "$target"
if [ $? -ne 0 ]; then
$RM -- "$target" 2> "$DEVNULL"
return 2
fi
done
return 0
}
#debug
_debug()
{
@ -66,7 +163,7 @@ _usage()
clean=0
install=0
uninstall=0
while getopts "ciuP:" name; do
while getopts "ciuO:P:" name; do
case $name in
c)
clean=1
@ -79,6 +176,9 @@ while getopts "ciuP:" name; do
install=0
uninstall=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
P)
PREFIX="$OPTARG"
;;
@ -89,72 +189,10 @@ while getopts "ciuP:" name; do
esac
done
shift $(($OPTIND - 1))
if [ $# -eq 0 ]; then
if [ $# -lt 1 ]; then
_usage
exit $?
fi
#check the variables
if [ -z "$PACKAGE" ]; then
_error "The PACKAGE variable needs to be set"
exit $?
fi
if [ -z "$VERSION" ]; then
_error "The VERSION variable needs to be set"
exit $?
fi
PKGCONFIG="$PREFIX/lib/pkgconfig"
exec 3>&1
while [ $# -gt 0 ]; do
target="$1"
shift
#clean
[ "$clean" -ne 0 ] && continue
#uninstall
if [ "$uninstall" -eq 1 ]; then
$DEBUG $RM -- "$PKGCONFIG/$target" || exit 2
continue
fi
#install
if [ "$install" -eq 1 ]; then
source="${target#$OBJDIR}"
$DEBUG $MKDIR -- "$PKGCONFIG" || exit 2
basename="$source"
if [ "${source##*/}" != "$source" ]; then
basename="${source##*/}"
fi
$DEBUG $INSTALL "$target" "$PKGCONFIG/$basename"|| exit 2
continue
fi
#portability
RPATH=
if [ "$PREFIX" != "/usr" ]; then
RPATH="-Wl,-rpath-link,\${libdir} -Wl,-rpath,\${libdir}"
case $(uname -s) in
Darwin)
RPATH="-Wl,-rpath,\${libdir}"
;;
SunOS)
RPATH="-Wl,-R\${libdir}"
;;
esac
fi
#create
source="${target#$OBJDIR}"
source="${source}.in"
$DEBUG $SED -e "s;@PACKAGE@;$PACKAGE;" \
-e "s;@VERSION@;$VERSION;" \
-e "s;@PREFIX@;$PREFIX;" \
-e "s;@RPATH@;$RPATH;" \
-- "$source" > "$target"
if [ $? -ne 0 ]; then
$DEBUG $RM -- "$target"
exit 2
fi
done
_pkgconfig "$@"

5
doc/.gitignore vendored Normal file
View File

@ -0,0 +1,5 @@
/gtkdoc/html
/gtkdoc/html.stamp
/gtkdoc/CPP.types
/gtkdoc/tmpl.stamp
/gtkdoc/xml.stamp

View File

@ -1,6 +1,6 @@
#!/bin/sh
#$Id$
#Copyright (c) 2012-2015 Pierre Pronchery <khorben@defora.org>
#Copyright (c) 2012-2020 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
@ -25,6 +25,7 @@
#variables
CONFIGSH="${0%/gtkdoc.sh}/../config.sh"
PREFIX="/usr/local"
PROGNAME="gtkdoc.sh"
#executables
@ -38,9 +39,10 @@ GTKDOC_SCAN="gtkdoc-scan"
INSTALL="install -m 0644"
MKDIR="mkdir -m 0755 -p"
RM="rm -f"
RMDIR="rmdir"
TOUCH="touch"
[ -f "../config.sh" ] && . "../config.sh"
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
#functions
@ -60,6 +62,77 @@ _error()
}
#gtkdoc_fixxref
_gtkdoc_fixxref()
{
module="$1"
moduledir="$2"
htmldir="$3"
outputdir="$4"
(cd "$outputdir" &&
$DEBUG $GTKDOC_FIXXREF \
--module="$module" \
--module-dir="$moduledir" \
--html-dir="$htmldir") || exit 2
}
#gtkdoc_mkdb
_gtkdoc_mkdb()
{
module="$1"
sourcedir="$2"
outputdir="$3"
(cd "$sourcedir" &&
$DEBUG $GTKDOC_MKDB --module="$module" \
--output-dir="$outputdir" \
--output-format="xml" --tmpl-dir="tmpl")
}
#gtkdoc_mkhtml
_gtkdoc_mkhtml()
{
module="$1"
path="$2"
driver="$3"
outputdir="$4"
(cd "$outputdir" &&
$DEBUG $GTKDOC_MKHTML --path "$path" "$module" "$driver")
}
#gtkdoc_mktmpl
_gtkdoc_mktmpl()
{
module="$1"
sourcedir="$2"
outputdir="$3"
(cd "$sourcedir" &&
$DEBUG $GTKDOC_MKTMPL --module="$module" \
--output-dir="$outputdir")
}
#gtkdoc_scan
_gtkdoc_scan()
{
module="$1"
sourcedir="$2"
outputdir="$3"
(cd ".." &&
$DEBUG $GTKDOC_SCAN --module="$module" \
--source-dir="$sourcedir" \
--output-dir="$outputdir")
# --rebuild-types
}
#usage
_usage()
{
@ -72,7 +145,7 @@ _usage()
clean=0
install=0
uninstall=0
while getopts "ciuP:" name; do
while getopts "ciO:uP:" name; do
case "$name" in
c)
clean=1
@ -81,6 +154,9 @@ while getopts "ciuP:" name; do
uninstall=0
install=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
u)
install=0
uninstall=1
@ -95,7 +171,7 @@ while getopts "ciuP:" name; do
esac
done
shift $((OPTIND - 1))
if [ $# -eq 0 ]; then
if [ $# -lt 1 ]; then
_usage
exit $?
fi
@ -126,23 +202,28 @@ while [ $# -gt 0 ]; do
file="${i##*/}"
$DEBUG $RM -- "$instdir/$MODULE/$file" || exit 2
done
if [ -d "$instdir/$MODULE" ]; then
$DEBUG $RMDIR -- "$instdir/$MODULE" || exit 2
fi
continue
fi
#create
case "$target" in
gtkdoc/html.stamp)
driver="../$MODULE-docs.xml"
if [ -n "$OBJDIR" ]; then
driver="gtkdoc/$MODULE-docs.xml"
$DEBUG $CP -- "$driver" "${OBJDIR}gtkdoc" \
|| exit 2
fi
output="${OBJDIR}gtkdoc/html"
$DEBUG $MKDIR -- "$output" || exit 2
(cd "$output" &&
$DEBUG $GTKDOC_MKHTML "$MODULE" \
"${OBJDIR}$driver")
driver="$MODULE-docs.xml"
oldpath="$PWD"
[ -n "$OBJDIR" ] && for file in \
"gtkdoc/$driver" \
"gtkdoc/xml/gtkdocentities.ent"; do
[ -f "$file" ] || continue
$DEBUG $CP -- "$file" \
"${OBJDIR}$file" || exit 2
done
_gtkdoc_mkhtml "$MODULE" "${oldpath%/*}" "../$driver" \
"$output"
#detect when gtk-doc is not available
res=$?
if [ $res -eq 127 ]; then
@ -153,24 +234,7 @@ while [ $# -gt 0 ]; do
exit 2
fi
output="${OBJDIR}gtkdoc"
(cd "$output" &&
$DEBUG $GTKDOC_FIXXREF \
--module="$MODULE" \
--module-dir="html" \
--html-dir="$instdir") || exit 2
;;
gtkdoc/sgml.stamp)
output="xml"
if [ -n "$OBJDIR" ]; then
output="${OBJDIR}gtkdoc/xml"
$DEBUG $MKDIR -- "$output" || exit 2
fi
(cd "${OBJDIR}gtkdoc" &&
$DEBUG $GTKDOC_MKDB \
--module="$MODULE" \
--output-dir="$output" \
--output-format="xml" \
--tmpl-dir="tmpl")
_gtkdoc_fixxref "$MODULE" "html" "$instdir" "$output"
;;
gtkdoc/tmpl.stamp)
output="tmpl"
@ -178,22 +242,28 @@ while [ $# -gt 0 ]; do
output="${OBJDIR}gtkdoc/tmpl"
$DEBUG $MKDIR -- "$output" || exit 2
fi
(cd "${OBJDIR}gtkdoc" &&
$DEBUG $GTKDOC_MKTMPL \
--module="$MODULE" \
--output-dir="$output")
_gtkdoc_mktmpl "$MODULE" "${OBJDIR}gtkdoc" "$output"
;;
gtkdoc/xml.stamp)
output="xml"
if [ -n "$OBJDIR" ]; then
output="${OBJDIR}gtkdoc"
sections="gtkdoc/$MODULE-sections.txt"
$DEBUG $MKDIR -- "$output/xml" || exit 2
$DEBUG $CP -- "$sections" "$output" \
|| exit 2
_gtkdoc_scan "$MODULE" "include" "$output"
output="${OBJDIR}gtkdoc/xml"
fi
_gtkdoc_mkdb "$MODULE" "${OBJDIR}gtkdoc" "$output"
;;
gtkdoc/*.types)
output="doc/gtkdoc" || exit 2
output="$PWD/gtkdoc" || exit 2
if [ -n "$OBJDIR" ]; then
output="${OBJDIR}gtkdoc"
$DEBUG $MKDIR -- "$output" || exit 2
fi
(cd ".." &&
$DEBUG $GTKDOC_SCAN \
--module="$MODULE" \
--source-dir="include" \
--output-dir="$output")
_gtkdoc_scan "$MODULE" "include" "$output"
;;
*)
_error "$target: Unknown type"
@ -205,7 +275,7 @@ while [ $# -gt 0 ]; do
_error "$target: Could not create documentation"
install=0
fi
$TOUCH "$target"
$TOUCH "${OBJDIR}$target"
#install
if [ "$install" -eq 1 ]; then

View File

@ -3,25 +3,32 @@
"http://www.oasis-open.org/docbook/xml/4.3/docbookx.dtd"
[
<!ENTITY % local.common.attrib "xmlns:xi CDATA #FIXED 'http://www.w3.org/2003/XInclude'">
<!ENTITY server "www.defora.org/doc/gtk-doc/html">
<!ENTITY title "DeforaOS CPP">
<!ENTITY version "0.0.1">
<!ENTITY % gtkdocentities SYSTEM "xml/gtkdocentities.ent">
%gtkdocentities;
<!ENTITY % configentities SYSTEM "config.ent">
%configentities;
]>
<book id="index">
<book id="index" xmlns:xi="http://www.w3.org/2003/XInclude">
<bookinfo>
<title>CPP Reference Manual</title>
<title>&vendor; &package; &title;</title>
<releaseinfo>
for CPP &version;.
for &vendor; &package; &version;.
The latest version of this documentation can be found on-line at
<ulink role="online-location" url="http://&server;/CPP/index.html">http://&server;/CPP/</ulink>.
<ulink role="online-location" url="https://&server;/&package;/">https://&server;/&package;/</ulink>.
</releaseinfo>
</bookinfo>
<chapter>
<title>&title;</title>
<title>&vendor; &package;</title>
<xi:include href="xml/CPP.xml"/>
</chapter>
<!-- enable this when you use gobject types
<chapter id="object-tree">
<title>Object Hierarchy</title>
<xi:include href="xml/tree_index.sgml"/>
</chapter>
-->
<index id="api-index-full">
<title>API Index</title>
<xi:include href="xml/api-index-full.xml"><xi:fallback /></xi:include>
@ -30,6 +37,7 @@
<title>Index of deprecated API</title>
<xi:include href="xml/api-index-deprecated.xml"><xi:fallback /></xi:include>
</index>
<!-- enable this when you use gobject introspection annotations
<xi:include href="xml/annotation-glossary.xml"><xi:fallback /></xi:include>
-->
</book>

View File

@ -0,0 +1,21 @@
<SECTION>
<FILE>CPP</FILE>
CPP_CODE_COUNT
CPP_CODE_LAST
CPP_CODE_META_FIRST
CPP_CODE_META_LAST
Cpp
CppCode
CppFilter
CppOption
cpp_define_add
cpp_define_get
cpp_define_remove
cpp_delete
cpp_get_filename
cpp_new
cpp_new_string
cpp_path_add
cpp_scan
</SECTION>

View File

@ -1,2 +1,2 @@
subdirs=tmpl
dist=Makefile,CPP-docs.xml
dist=Makefile,CPP-docs.xml,CPP-sections.txt,xml/gtkdocentities.ent

View File

@ -0,0 +1,2 @@
<!ENTITY server "www.defora.org/doc/gtk-doc/html">
<!ENTITY title "Reference Manual">

View File

@ -1,23 +1,25 @@
subdirs=gtkdoc
targets=gtkdoc/CPP.types,gtkdoc/tmpl.stamp,gtkdoc/sgml.stamp,gtkdoc/html.stamp
targets=gtkdoc/CPP.types,gtkdoc/html.stamp,gtkdoc/tmpl.stamp,gtkdoc/xml.stamp
dist=Makefile,gtkdoc.sh
#targets
[gtkdoc/CPP.types]
type=script
script=./gtkdoc.sh
[gtkdoc/tmpl.stamp]
type=script
script=./gtkdoc.sh
depends=$(OBJDIR)gtkdoc/CPP.types,gtkdoc/tmpl/cpp.sgml
[gtkdoc/sgml.stamp]
type=script
script=./gtkdoc.sh
depends=$(OBJDIR)gtkdoc/tmpl.stamp
depends=gtkdoc.sh
[gtkdoc/html.stamp]
type=script
script=./gtkdoc.sh
depends=gtkdoc/CPP-docs.xml,$(OBJDIR)gtkdoc/sgml.stamp
depends=gtkdoc/CPP-docs.xml,$(OBJDIR)gtkdoc/xml.stamp,gtkdoc/xml/gtkdocentities.ent,gtkdoc.sh,../config.ent,../config.sh
install=
[gtkdoc/tmpl.stamp]
type=script
script=./gtkdoc.sh
depends=$(OBJDIR)gtkdoc/CPP.types,gtkdoc.sh,../config.sh
[gtkdoc/xml.stamp]
type=script
script=./gtkdoc.sh
depends=$(OBJDIR)gtkdoc/tmpl.stamp,gtkdoc.sh

View File

@ -1,6 +1,30 @@
package=CPP
version=0.0.3
config=h,sh
version=0.0.6
vendor=Devel
config=ent,h,sh
subdirs=data,doc,include,src,tests
dist=Makefile,COPYING,config.h,config.sh
targets=tests
dist=Makefile,COPYING,README.md,config.ent,config.h,config.sh
#modes
[mode::debug]
title=Debug
[mode::release]
title=Release
#targets
[tests]
type=command
command=cd tests && (if [ -n "$(OBJDIR)" ]; then $(MAKE) OBJDIR="$(OBJDIR)tests/" "$(OBJDIR)tests/clint.log" "$(OBJDIR)tests/distcheck.log" "$(OBJDIR)tests/fixme.log"; else $(MAKE) clint.log distcheck.log fixme.log; fi)
depends=all
enabled=0
phony=1
#dist
[COPYING]
install=$(PREFIX)/share/doc/$(PACKAGE)
[README.md]
install=$(PREFIX)/share/doc/$(PACKAGE)

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2006-2015 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2006-2022 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Devel cpp */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU Lesser General Public License as published by
@ -75,7 +75,7 @@ Cpp * cpp_new(CppPrefs * prefs)
/* cpp_new_string */
Cpp * cpp_new_string(CppPrefs * prefs, char const * string)
{
/* FIXME really implement (and refactor) */
/* FIXME really implement */
Cpp * cpp;
String * p;
int r = 0;

View File

@ -850,6 +850,7 @@ static int _cpp_callback_unknown(Parser * parser, Token * token, int c,
CppParser * cppparser_new(Cpp * cpp, CppParser * parent, char const * filename,
int filters)
{
/* FIXME factor code */
CppParser * cp;
if((cp = object_new(sizeof(*cp))) == NULL)
@ -905,7 +906,6 @@ CppParser * cppparser_new(Cpp * cpp, CppParser * parent, char const * filename,
CppParser * cppparser_new_string(Cpp * cpp, CppParser * parent,
char const * string, int filters)
{
/* FIXME refactor */
CppParser * cp;
if((cp = object_new(sizeof(*cp))) == NULL)

31
src/lib/project.conf Normal file
View File

@ -0,0 +1,31 @@
targets=libcpp
cppflags_force=-I../../include
cppflags=
cflags_force=`pkg-config --cflags libSystem` -fPIC
cflags=-W -Wall -g -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libSystem`
ldflags=
dist=Makefile,common.h,parser.h
#modes
[mode::debug]
[mode::release]
cppflags_force=-I../../include -DNDEBUG
cflags=-W -Wall -O2 -D_FORTIFY_SOURCE=2 -fstack-protector
#targets
[libcpp]
type=library
sources=cpp.c,parser.c,scanner.c
install=$(LIBDIR)
#sources
[cpp.c]
depends=common.h,../../include/CPP.h
[parser.c]
depends=parser.h,../../include/CPP.h
[scanner.c]
depends=common.h,../../include/CPP.h

View File

@ -1,5 +1,5 @@
/* $Id$ */
/* Copyright (c) 2007-2013 Pierre Pronchery <khorben@defora.org> */
/* Copyright (c) 2007-2022 Pierre Pronchery <khorben@defora.org> */
/* This file is part of DeforaOS Devel cpp */
/* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -24,6 +24,10 @@
#include <errno.h>
#include "CPP.h"
#ifndef PROGNAME_CPP
# define PROGNAME_CPP "cpp"
#endif
/* cpp */
/* private */
@ -62,13 +66,13 @@ static int _cpp(Prefs * prefs, int filec, char * filev[])
if(prefs->outfile == NULL)
fp = stdout;
else if((fp = fopen(prefs->outfile, "w")) == NULL)
return error_set_print("cpp", 1, "%s: %s", prefs->outfile,
strerror(errno));
return error_set_print(PROGNAME_CPP, 1, "%s: %s",
prefs->outfile, strerror(errno));
for(i = 0; i < filec; i++)
ret |= _cpp_do(prefs, fp, filev[i]);
if(fclose(fp) != 0)
return error_set_print("cpp", 1, "%s: %s", prefs->outfile,
strerror(errno));
return error_set_print(PROGNAME_CPP, 1, "%s: %s",
prefs->outfile, strerror(errno));
return ret;
}
@ -143,7 +147,7 @@ static void _do_print_token(FILE * fp, Token * token)
/* cpp_error */
static int _cpp_error(void)
{
return error_print("cpp");
return error_print(PROGNAME_CPP);
}
@ -151,7 +155,7 @@ static int _cpp_error(void)
/* FIXME -E prints metadata? */
static int _usage(void)
{
fputs("Usage: cpp [-D name[=value]]...[-I directory][-o file][-t][-U name]... input...\n"
fputs("Usage: " PROGNAME_CPP " [-D name[=value]]...[-I directory][-o file][-t][-U name]... input...\n"
" -D Add a substitution\n"
" -I Add a directory to the search path\n"
" -o Write output to a file\n"
@ -218,7 +222,7 @@ static int _main_add_define(Prefs * prefs, char * define)
value = strtok(define, "=");
if((p = realloc(prefs->defines, sizeof(*p) * (prefs->defines_cnt + 1)))
== NULL)
return error_set_print("cpp", 1, "%s", strerror(errno));
return error_set_print(PROGNAME_CPP, 1, "%s", strerror(errno));
prefs->defines = p;
prefs->defines[prefs->defines_cnt++] = define;
return 0;
@ -230,7 +234,7 @@ static int _main_add_path(Prefs * prefs, char const * path)
if((p = realloc(prefs->paths, sizeof(*p) * (prefs->paths_cnt + 1)))
== NULL)
return error_set_print("cpp", 1, "%s", strerror(errno));
return error_set_print(PROGNAME_CPP, 1, "%s", strerror(errno));
prefs->paths = p;
prefs->paths[prefs->paths_cnt++] = path;
return 0;
@ -244,7 +248,7 @@ static int _main_add_undefine(Prefs * prefs, char const * undefine)
return 1;
if((p = realloc(prefs->undefines, sizeof(*p)
* (prefs->undefines_cnt + 1))) == NULL)
return error_set_print("cpp", 1, "%s", strerror(errno));
return error_set_print(PROGNAME_CPP, 1, "%s", strerror(errno));
prefs->undefines = p;
prefs->undefines[prefs->undefines_cnt++] = undefine;
return 0;

View File

@ -1,34 +1,30 @@
targets=libcpp,cpp
subdirs=lib
targets=cpp
cppflags_force=-I ../include
cppflags=
cflags_force=`pkg-config --cflags libSystem`
cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector-all
cflags_force=`pkg-config --cflags libSystem` -fPIE
cflags=-W -Wall -g -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector
ldflags_force=`pkg-config --libs libSystem`
ldflags=
dist=Makefile,common.h,parser.h
ldflags=-pie -Wl,-z,relro -Wl,-z,now
dist=Makefile
[libcpp]
type=library
sources=cpp.c,parser.c,scanner.c
cflags=-fPIC
install=$(LIBDIR)
#modes
[mode::debug]
[cpp.c]
depends=common.h,../include/CPP.h
[parser.c]
depends=parser.h,../include/CPP.h
[scanner.c]
depends=common.h,../include/CPP.h
[mode::release]
cppflags_force=-I ../include -DNDEBUG
cflags=-W -Wall -O2 -pedantic -D_FORTIFY_SOURCE=2 -fstack-protector
#targets
[cpp]
type=binary
sources=main.c
depends=$(OBJDIR)libcpp.so
cflags=-fPIE
ldflags=-L$(OBJDIR). -L$(LIBDIR) -Wl,-rpath,$(LIBDIR) -lcpp
#XXX should really use this (race condition with "make -k")
depends=$(OBJDIR)lib/libcpp$(SOEXT)
depends=$(OBJDIR)lib/libcpp.a
ldflags=-L$(OBJDIR)lib -L$(LIBDIR) -Wl,-rpath,$(LIBDIR) -lcpp
install=$(BINDIR)
#sources
[main.c]
depends=../include/CPP.h

3
tests/.gitignore vendored Normal file
View File

@ -0,0 +1,3 @@
/clint.log
/distcheck.log
/fixme.log

192
tests/clint.sh Executable file
View File

@ -0,0 +1,192 @@
#!/bin/sh
#$Id$
#Copyright (c) 2016-2021 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#variables
CONFIGSH="${0%/clint.sh}/../config.sh"
CFLAGS=
CPPFLAGS=
PROGNAME="clint.sh"
PROJECTCONF="../project.conf"
#executables
DATE="date"
DEBUG="_debug"
ECHO="/bin/echo"
FIND="find"
GREP="grep"
LINT="lint -g"
MKDIR="mkdir -p"
SORT="sort -n"
TR="tr"
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
#functions
#clint
_clint()
{
res=0
subdirs=
$DATE
while read line; do
case "$line" in
"["*)
break
;;
"subdirs="*)
subdirs=${line#subdirs=}
subdirs=$(echo "$subdirs" | $TR ',' ' ')
;;
esac
done < "$PROJECTCONF"
if [ ! -n "$subdirs" ]; then
_error "Could not locate directories to analyze"
return $?
fi
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
while read filename; do
[ -n "$filename" ] || continue
r=0
case "$filename" in
*.c)
echo
_clint_lint "$filename" || r=$?
_clint_rtrim "$filename"|| r=$?
;;
*.h)
echo
echo "$filename:"
_clint_rtrim "$filename"|| r=$?
;;
*)
continue
;;
esac
if [ $r -eq 0 ]; then
echo " OK"
echo "$PROGNAME: $filename: OK" 1>&2
else
echo "FAIL"
echo "$PROGNAME: $filename: FAIL" 1>&2
res=2
fi
done << EOF
$($FIND "../$subdir" -type f | $SORT)
EOF
done
return $res
}
_clint_lint()
{(
filename="$1"
$ECHO -n "${filename%/*}/"
$DEBUG $LINT $CPPFLAGS $CFLAGS "$filename" 2>&1
ret=$?
if [ $ret -eq 127 ]; then
#XXX ignore errors when $LINT is not available
ret=0
fi
return $ret
)}
_clint_rtrim()
{
filename="$1"
regex="[ ]\\+\$"
$DEBUG $GREP -vq "$regex" "$filename" 2>&1
}
#debug
_debug()
{
echo "$@" 1>&3
"$@"
}
#error
_error()
{
echo "$PROGNAME: $@" 1>&2
return 2
}
#usage
_usage()
{
echo "Usage: $PROGNAME [-c] target..." 1>&2
return 1
}
#main
clean=0
while getopts "cO:P:" name; do
case "$name" in
c)
clean=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
P)
CPPFLAGS="$CPPFLAGS -I$OPTARG/include"
;;
?)
_usage
exit $?
;;
esac
done
shift $((OPTIND - 1))
if [ $# -lt 1 ]; then
_usage
exit $?
fi
#clean
[ $clean -ne 0 ] && exit 0
exec 3>&1
ret=0
while [ $# -gt 0 ]; do
target="$1"
dirname="${target%/*}"
shift
if [ -n "$dirname" -a "$dirname" != "$target" ]; then
$MKDIR -- "$dirname" || ret=$?
fi
_clint > "$target" || ret=$?
done
exit $ret

View File

@ -1,6 +1,6 @@
#!/bin/sh
#$Id$
#Copyright (c) 2013-2014 Pierre Pronchery <khorben@defora.org>
#Copyright (c) 2013-2022 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
@ -27,8 +27,7 @@
#variables
PROGNAME="cpp.sh"
#executables
CPP="../src/cpp"
[ -n "$OBJDIR" ] && CPP="${OBJDIR}../src/cpp"
CPP="$OBJDIR../src/cpp"
#functions
@ -64,14 +63,14 @@ fi
if [ $# -eq 1 -a -n "$output" ]; then
target="$1"
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
LD_LIBRARY_PATH="$OBJDIR../src/lib" $CPP "$target" > "$output"
elif [ $# -ge 1 -a -z "$output" ]; then
while [ $# -gt 0 ]; do
target="$1"
output="${target%.cpp}.o"
shift
LD_LIBRARY_PATH="../src" $CPP "$target" > "$output"
LD_LIBRARY_PATH="$OBJDIR../src/lib" $CPP "$target" > "$output"
done
else
_usage

102
tests/distcheck.sh Executable file
View File

@ -0,0 +1,102 @@
#!/bin/sh
#$Id$
#Copyright (c) 2020 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#variables
CONFIGSH="${0%/distcheck.sh}/../config.sh"
CFLAGS=
LDFLAGS=
PROGNAME="distcheck.sh"
TARGET="tests.log"
#executables
DATE="date"
[ -n "$MAKE" ] || MAKE="make"
MKDIR="mkdir -p"
MKTEMP="mktemp"
RM="rm -f"
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
#distcheck
_distcheck()
{
(cd .. && $MAKE distcheck)
}
#date
_date()
{
if [ -n "$SOURCE_DATE_EPOCH" ]; then
TZ=UTC $DATE -d "@$SOURCE_DATE_EPOCH" '+%a %b %d %T %Z %Y'
else
$DATE
fi
}
#usage
_usage()
{
echo "Usage: $PROGNAME [-c] target..." 1>&2
return 1
}
#main
clean=0
while getopts "cO:P:" name; do
case "$name" in
c)
clean=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
P)
#XXX ignored
;;
?)
_usage
exit $?
;;
esac
done
shift $((OPTIND - 1))
if [ $# -eq 0 ]; then
_usage
exit $?
fi
while [ $# -ne 0 ]; do
target="$1"
shift
[ "$clean" -eq 0 ] || break
(_date; echo; _distcheck) > "$target" || exit 2
done
exit 0

261
tests/fixme.sh Executable file
View File

@ -0,0 +1,261 @@
#!/bin/sh
#$Id$
#Copyright (c) 2017-2022 Pierre Pronchery <khorben@defora.org>
#
#Redistribution and use in source and binary forms, with or without
#modification, are permitted provided that the following conditions are met:
#
# * Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# * Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
#
#THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
#AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
#IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
#DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
#FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
#DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
#SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
#CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
#OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
#OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#variables
CONFIGSH="${0%/fixme.sh}/../config.sh"
PROGNAME="fixme.sh"
PROJECTCONF="../project.conf"
REGEXP_ERROR="FIXME"
REGEXP_WARNING="\\(TODO\|XXX\\)"
#executables
DATE="date"
DEBUG="_debug"
FIND="find"
GREP="grep"
HEAD="head"
MKDIR="mkdir -p"
SORT="sort -n"
TR="tr"
[ -f "$CONFIGSH" ] && . "$CONFIGSH"
#functions
#fixme
_fixme()
{
res=0
subdirs=
$DATE
echo
while read line; do
case "$line" in
"["*)
break
;;
"subdirs="*)
subdirs=${line#subdirs=}
subdirs=$(echo "$subdirs" | $TR ',' ' ')
;;
esac
done < "$PROJECTCONF"
if [ ! -n "$subdirs" ]; then
_error "Could not locate directories to analyze"
return $?
fi
for subdir in $subdirs; do
[ -d "../$subdir" ] || continue
for filename in $($FIND "../$subdir" -type f | $SORT); do
callback=$(_fixme_callback "$filename")
[ -n "$callback" ] || continue
($callback "$filename") 2>&1
if [ $? -ne 0 ]; then
echo "$PROGNAME: $filename: FAIL" 1>&2
res=2
fi
done
done
return $res
}
_fixme_callback()
{
filename="$1"
ext=${filename##*/}
ext=${ext%.in}
ext=${ext##*.}
callback=
case "$ext" in
asm|S)
echo "_fixme_callback_asm"
return 0
;;
c|cc|cpp|cxx|go|h|js|v)
echo "_fixme_callback_c"
return 0
;;
conf|sh)
echo "_fixme_callback_sh"
return 0
;;
py)
echo "_fixme_callback_python"
return 0
;;
htm|html|xml|xsl)
echo "_fixme_callback_xml"
return 0
;;
esac
case $($HEAD -n 1 "$filename") in
"#!/bin/sh"*|"#! /bin/sh"*|\
"#!/usr/bin/env bash"*|"#! /usr/bin/env bash"*)
echo "_fixme_callback_sh"
return 0
;;
"#!/usr/bin/env python"*|"#! /usr/bin/env python"*)
echo "_fixme_callback_python"
return 0
;;
"<!DOCTYPE"*|"<!doctype"*|"<HTML"*|"<html"*|"<?xml"*)
echo "_fixme_callback_xml"
return 0
;;
esac
return 2
}
_fixme_callback_asm()
{
res=0
filename="$1"
#warnings
$GREP -nH "/\\*.*$REGEXP_WARNING" "$filename"
#failures
$GREP -nH "/\\*.*$REGEXP_ERROR" "$filename" && res=2
return $res
}
_fixme_callback_c()
{
res=0
filename="$1"
#warnings
$GREP -nH "/\\(/\\|\\*\\).*$REGEXP_WARNING" "$filename"
#failures
$GREP -nH "/\\(/\\|\\*\\).*$REGEXP_ERROR" "$filename" && res=2
return $res
}
_fixme_callback_python()
{
res=0
filename="$1"
comment="#"
#warnings
$GREP -nH "$comment.*$REGEXP_WARNING" "$filename"
#failures
$GREP -nH "$comment.*$REGEXP_ERROR" "$filename" && res=2
return $res
}
_fixme_callback_sh()
{
res=0
filename="$1"
comment="#"
#warnings
$GREP -nH "$comment.*$REGEXP_WARNING" "$filename"
#failures
$GREP -nH "$comment.*$REGEXP_ERROR" "$filename" && res=2
return $res
}
_fixme_callback_xml()
{
res=0
filename="$1"
#XXX limited to a single line
#warnings
$GREP -nH "<!--.*$REGEXP_WARNING" "$filename"
#failures
$GREP -nH "<!--.*$REGEXP_ERROR" "$filename" && res=2
return $res
}
#debug
_debug()
{
echo "$@" 1>&3
"$@"
}
#error
_error()
{
echo "$PROGNAME: $@" 1>&2
return 2
}
#usage
_usage()
{
echo "Usage: $PROGNAME [-c] target..." 1>&2
return 1
}
#main
clean=0
while getopts "cO:P:" name; do
case "$name" in
c)
clean=1
;;
O)
export "${OPTARG%%=*}"="${OPTARG#*=}"
;;
P)
#XXX ignored for compatibility
;;
?)
_usage
exit $?
;;
esac
done
shift $((OPTIND - 1))
if [ $# -lt 1 ]; then
_usage
exit $?
fi
#clean
[ $clean -ne 0 ] && exit 0
exec 3>&1
ret=0
while [ $# -gt 0 ]; do
target="$1"
dirname="${target%/*}"
shift
if [ -n "$dirname" -a "$dirname" != "$target" ]; then
$MKDIR -- "$dirname" || ret=$?
fi
_fixme > "$target" || ret=$?
done
exit $ret

View File

@ -1,28 +1,49 @@
targets=define.o,if.o,include.o
targets=clint.log,define.o,distcheck.log,fixme.log,if.o,include.o
cxx=./cpp.sh
cxxflags=
dist=Makefile,cpp.sh,include-define.cpp
dist=Makefile,clint.sh,cpp.sh,distcheck.sh,fixme.sh,include-define.cpp
#targets
[clint.log]
type=script
script=./clint.sh
flags=-O CPPFLAGS="-I../include"
depends=clint.sh
enabled=0
[define.o]
type=object
sources=define.cpp
depends=../src/cpp
[define.cpp]
depends=cpp.sh
[distcheck.log]
type=script
script=./distcheck.sh
depends=distcheck.sh
enabled=0
[fixme.log]
type=script
script=./fixme.sh
depends=fixme.sh
enabled=0
[if.o]
type=object
sources=if.cpp
depends=../src/cpp
[if.cpp]
depends=cpp.sh
[include.o]
type=object
sources=include.cpp
depends=../src/cpp
#sources
[define.cpp]
depends=cpp.sh
[if.cpp]
depends=cpp.sh
[include.cpp]
depends=cpp.sh