Skip to content

Commit

Permalink
Merge pull request uniconproject#482 from Jafaral/cp-fix
Browse files Browse the repository at this point in the history
Makefile: use CP variable instead of cp where possible
  • Loading branch information
Don-Ward authored Oct 1, 2024
2 parents 15b6ce2 + f2bd34d commit 660c039
Show file tree
Hide file tree
Showing 11 changed files with 15 additions and 15 deletions.
2 changes: 1 addition & 1 deletion ipl/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ include ../Makedefs.uni

Ilib: ../bin/libcfunc.so
../bin/libcfunc.so: ../bin/$(UNICONT)
cp incl/*.icn gincl/*.icn cfuncs/icall.h ../lib
$(CP) incl/*.icn gincl/*.icn cfuncs/icall.h ../lib
$(MAKE) -C procs
$(MAKE) -C gprocs
$(MAKE) -C mprocs
Expand Down
2 changes: 1 addition & 1 deletion ipl/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ all:

Cfun:
cd ../cfuncs; LPATH= $(MAKE) ICONT=../../bin/$(UNICONT)
-cd ../cfuncs; cp cfunc.u ../lib
-cd ../cfuncs; $(CP) cfunc.u ../lib
-cd ../cfuncs; cp libcfunc.so ../../bin

clean Clean Pure:
Expand Down
2 changes: 1 addition & 1 deletion ipl/mprocs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ IC=../../bin/$(UNICONT)
UFLAGS= -usc

all:$(TARGETS)
@cp *.u ../lib/
@$(CP) *.u ../lib/

%.u: %.icn
@echo $<
Expand Down
2 changes: 1 addition & 1 deletion ipl/procs/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ IC=../../bin/$(UNICONT)
UFLAGS= -usc

all:$(TARGETS)
@cp *.u ../lib/
@$(CP) *.u ../lib/

%.u: %.icn
@echo $<
Expand Down
2 changes: 1 addition & 1 deletion plugins/src/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ $(PMOS): $(LIBD)/uso.u

# Unicon interface
$(LIBD)/%.u: %.icn $(CSRC)
cp $< $(LIBD)/
$(CP) $< $(LIBD)/
cd $(LIBD); $(UC) $(UFLAGS) $<
rm $(LIBD)/$<

Expand Down
4 changes: 2 additions & 2 deletions src/gdbm/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ CP_HEADERS:gdbm.h ndbm.h

gdbm.h: gdbm.proto gdbmerrno.h gdbm.proto2
$(RM) gdbm.h
cp $(srcdir)/gdbm.proto gdbm.h
$(CP) $(srcdir)/gdbm.proto gdbm.h
-chmod +w gdbm.h
grep _ $(srcdir)/gdbmerrno.h >> gdbm.h
cat $(srcdir)/gdbm.proto2 >> gdbm.h
Expand All @@ -103,7 +103,7 @@ testndbm: testndbm.o libgdbm.a
$(CC) $(LDFLAGS) -o testndbm testndbm.o libgdbm.a

tndbm.o: testndbm.c
cp $(srcdir)/testndbm.c ./tndbm.c
$(CP) $(srcdir)/testndbm.c ./tndbm.c
$(CC) -c -I. -I$(srcdir) $(CFLAGS) $(DEFS) ./tndbm.c
rm -f ./tndbm.c

Expand Down
2 changes: 1 addition & 1 deletion src/lib/audio/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ staticlib: $(ARCHIVE)
$(ARCHIVE): $(OBJECTS)
rm -f $(ARCHIVE)
ar $(ARFLAGS) $(ARCHIVE) $(OBJECTS)
cp $(ARCHIVE) ../../../bin
$(CP) $(ARCHIVE) ../../../bin
rm *.o

al.o : al.c base.h config.h
Expand Down
8 changes: 4 additions & 4 deletions src/runtime/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -64,19 +64,19 @@ interp_all: update_rev
# NTCONDEP is set to NTCON on windows only to add a dependency that sets NTCONSOLE
$(UNICONX) $(ICONXEXE): $(NTCONDEP) $(OBJS) ../../rt/lib/libucommon.a ../../rt/lib/libuconsole.a ../../rt/lib/libgdbm.a ../../rt/lib/libtp.a
$(CC) $(LDFLAGS) $(WSUBSYS) $(WSTKLDFLAG) $(RLINK) -o $(UNICONX) $(OBJS) $(XLIBS) $(RLIBS) $(XL) $(LIBSTDCPP) $(WGLIBS) -luconsole
cp $(UNICONX)$(EXE) ../../bin
$(CP) $(UNICONX)$(EXE) ../../bin
$(STRIP) ../../bin/$(UNICONX)$(EXE);

# on windows, always add WNTCON dependency to set NTCONSOLE accordingly
$(UNICONWX) $(WICONEXE): WNTCON $(OBJS) ../../rt/lib/libucommon.a ../../rt/lib/libwuconsole.a ../../rt/lib/libgdbm.a ../../rt/lib/libtp.a
$(CC) $(LDFLAGS) -Wl,--subsystem,windows $(WSTKLDFLAG) $(RLINK) -o $(UNICONWX) $(OBJS) $(XLIBS) $(RLIBS) $(XL) $(LIBSTDCPP) $(WGLIBS) -lwuconsole
cp $(UNICONWX)$(EXE) ../../bin
$(CP) $(UNICONWX)$(EXE) ../../bin
$(STRIP) ../../bin/$(UNICONWX)$(EXE);

# prepare the icon for the executables
icon.$(O):
cp -u ../../config/win32/gcc/icon.rc .
cp -u ../../config/win32/gcc/unicon.ico .
$(CP) -u ../../config/win32/gcc/icon.rc .
$(CP) -u ../../config/win32/gcc/unicon.ico .
windres $(RCFLAGS) icon.rc icon.$(O)

#
Expand Down
2 changes: 1 addition & 1 deletion uni/udb/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ tools:

udb: $(UFILES) $(LIBRARY) $(DTA_UFILES)
$(UC) $(ldflags) $(LIBRARY) $(DTA_UFILES) $(UFILES) -o udb
cp udb$(EXE) ../../bin
$(CP) udb$(EXE) ../../bin

udb.u: udb.icn console.u
$(UC) $(cflags) udb
Expand Down
2 changes: 1 addition & 1 deletion uni/udb/lib/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ lib: $(UFILES)


tools: listener.u $(Tools)
cp $(Tools) ../../../bin
$(CP) $(Tools) ../../../bin

$(Tools): $%
$(UC) $(UFLAGS) $(STANDALONE) $(LDFLAGS) $@
Expand Down
2 changes: 1 addition & 1 deletion uni/uflex/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ all: $(PROGRAM)

$(PROGRAM): flexgram.u main.u uflex-lex.u ulexskel.u automata.u tree.u convert.u automatadfa.u uflexskel.u
$(UNICON) -s -o uflex flexgram.u main.u uflex-lex.u ulexskel.u uflexskel.u automata.u tree.u convert.u automatadfa.u ulpp.icn
@cp $(PROGRAM) ../../bin/
@$(CP) $(PROGRAM) ../../bin/
@cd test; $(MAKE)

flexgram.icn flexgram_tab.icn: flexgram.y
Expand Down

0 comments on commit 660c039

Please sign in to comment.