Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
fb2aebdb
Commit
fb2aebdb
authored
Jun 03, 1998
by
Bruce Korb
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
This is a more workable makefile
From-SVN: r20208
parent
bc516719
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
26 additions
and
13 deletions
+26
-13
contrib/fixinc/Makefile
+26
-13
No files found.
contrib/fixinc/Makefile
View file @
fb2aebdb
...
@@ -16,21 +16,28 @@ AG_TEXT = $(SH_TARGET) fixincl.x \
...
@@ -16,21 +16,28 @@ AG_TEXT = $(SH_TARGET) fixincl.x \
inclhack.def inclhack.tpl hackshell.tpl fixincl.tpl
inclhack.def inclhack.tpl hackshell.tpl fixincl.tpl
TARGETS
=
$(SH_TARGET)
$(BIN_TARGET)
TARGETS
=
$(SH_TARGET)
$(BIN_TARGET)
default
:
fixincl.sh
default
:
gen
all
:
$(TARGETS)
all
:
$(TARGETS)
sh
:
$(SH_TARGET)
sh
:
$(SH_TARGET)
gen
:
$(SH_TARGET) fixincl.x
$(OBJ)
:
$(HDR)
$(OBJ)
:
$(HDR)
fixincl.o
:
fixincl.x
fixincl
:
$(OBJ)
fixincl
:
$(OBJ)
@
echo
$(CC)
-o
$@
$(OBJ)
$(LIB)
;
\
if
$(CC)
-o
$@
$(OBJ)
$(LIB)
;
then
:
;
else
\
if
$(CC)
-o
$@
$(OBJ)
$(LIB)
;
then
:
;
else
\
rm
-f
$@
;
(
echo
"#! /bin/sh"
;
echo exit
1
)
>
$@
;
\
rm
-f
$@
;
(
echo
"#! /bin/sh"
;
echo exit
1
)
>
$@
;
\
chmod 777
$@
;
fi
chmod 777
$@
;
fi
regex.o
:
regex.c
regex.o
:
regex.c
$(CC)
-g
-DSTDC_HEADERS
=
1
-c
regex.c
-
$(CC)
-g
-DSTDC_HEADERS
=
1
-c
regex.c
fixincl.o
:
fixincl.x fixincl.c
-
$(CC)
$(CFLAGS)
-o
$@
-c
fixincl.c
server.o
:
server.c server.h
-
$(CC)
$(CFLAGS)
-o
$@
-c
server.c
fixincl.x
:
fixincl.tpl inclhack.def
fixincl.x
:
fixincl.tpl inclhack.def
@
if
(
autogen
--help
>
/dev/null 2>&1
)
;
then
\
@
if
(
autogen
--help
>
/dev/null 2>&1
)
;
then
\
...
@@ -44,25 +51,31 @@ inclhack.sh: inclhack.def inclhack.tpl hackshell.tpl
...
@@ -44,25 +51,31 @@ inclhack.sh: inclhack.def inclhack.tpl hackshell.tpl
autogen inclhack.def
;
\
autogen inclhack.def
;
\
else
echo
You need to install autogen
;
touch
$@
;
fi
else
echo
You need to install autogen
;
touch
$@
;
fi
fixincl.sh
:
inclhack.def inclhack.tpl fixincl inclhack.sh
fixincl.sh
:
inclhack.def inclhack.tpl
@
if
(
./fixincl
-v
>
/dev/null 2>&1
)
;
then
\
@
if
(
autogen
--help
>
/dev/null 2>&1
)
;
then
\
if
(
autogen
--help
>
/dev/null 2>&1
)
;
then
\
echo
autogen
-DPROGRAM
=
1
-b
fixincl inclhack.def
;
\
echo
autogen
-DPROGRAM
=
1
-b
fixincl inclhack.def
;
\
autogen
-DPROGRAM
=
1
-b
fixincl inclhack.def
;
touch
$@
;
\
autogen
-DPROGRAM
=
1
-b
fixincl inclhack.def
;
touch
$@
;
\
else
echo
You need to install autogen
;
touch
$@
;
fi
;
\
else
echo
You need to install autogen
;
touch
$@
;
fi
;
\
else
cp inclhack.sh
$@
;
echo
cp inclhack.sh
$@
;
fi
clean
:
clean
:
rm
-f
*
.o
fixincl
rm
-f
*
.o
$(TARGETS)
fixincl.x
install
:
fixincl.sh
# Ensure all the targets are built. If the program "fixincl"
# failed to compile, link or load, then we install the
# "inclhack.sh" script. Otherwise, we install that program
# plus the wrapper script, "fixincl.sh".
#
install
:
$(TARGETS)
@
rm
-f
$(DESTDIR)
/fixinc.sh
;
\
@
rm
-f
$(DESTDIR)
/fixinc.sh
;
\
if
(
./fixincl
-v
>
/dev/null 2>&1
)
;
then
\
echo
cp fixincl.sh
$(DESTDIR)
/fixinc.sh
;
\
echo
cp fixincl.sh
$(DESTDIR)
/fixinc.sh
;
\
cp fixincl.sh
$(DESTDIR)
/fixinc.sh
;
\
cp fixincl.sh
$(DESTDIR)
/fixinc.sh
;
\
chmod 555
$(DESTDIR)
/fixinc.sh
chmod 555
$(DESTDIR)
/fixinc.sh
;
\
@
echo
check
for
fixincl copy...
@
if
(
./fixincl
-v
>
/dev/null 2>&1
)
;
then
\
rm
-f
$(DESTDIR)
/fixincl
;
\
rm
-f
$(DESTDIR)
/fixincl
;
\
echo
cp fixincl
$(DESTDIR)
;
\
echo
cp fixincl
$(DESTDIR)
;
\
cp fixincl
$(DESTDIR)
;
\
cp fixincl
$(DESTDIR)
;
\
chmod 555
$(DESTDIR)
/fixincl
;
fi
chmod 555
$(DESTDIR)
/fixincl
;
\
else
\
echo
cp inclhack.sh
$(DESTDIR)
/fixinc.sh
;
\
cp inclhack.sh
$(DESTDIR)
/fixinc.sh
;
\
fi
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment