Skip to content

Commit

Permalink
Makefile: remove duplicate src/longopt.o
Browse files Browse the repository at this point in the history
export longopt_get. This is used by all frontends.
Fixes GH #1121

Also remove GEN_CONFIGS, GEN_MAKEFILES from archclean.
  • Loading branch information
Reini Urban committed Nov 7, 2014
1 parent fd71ae9 commit 55fa37e
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 24 deletions.
1 change: 1 addition & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
+ Silence failing auto::inline probe #1118
+ Revert automatic regeneration of encoding tables, added with 6.9.0. #1119
+ Use labs() instead of abs() with 64-bit #1111
+ Avoid duplicate src/longopt.o, export longopt_get. #1121
- Documentation
+ Document .lex "name" limitations. Use .lex 'name' w/ single-quotes #1095
- Tests
Expand Down
2 changes: 1 addition & 1 deletion compilers/imcc/imcparser.c
Original file line number Diff line number Diff line change
Expand Up @@ -572,7 +572,7 @@ mk_pmc_const_named(ARGMOD(imc_info_t *imcc), ARGMOD(IMC_Unit *unit),
const_name = mem_sys_strdup(constant);
}

/* That that an empty name here, like .const '' $Pxx = "constant"
/* With an empty name here, like .const '' $Pxx = "constant"
can only be a Sub. name_length = 0 matches all */
if ((strncmp(unquoted_name, "Sub", name_length) == 0)
|| (strncmp(unquoted_name, "Coroutine", name_length) == 0)) {
Expand Down
31 changes: 11 additions & 20 deletions config/gen/makefiles/root.in
Original file line number Diff line number Diff line change
Expand Up @@ -932,17 +932,17 @@ $(FRPTWO_DIR)/prt0.pbc$(O) : $(FRPTWO_DIR)/prt0.pbc.c \
$(INC_DIR)/pbcversion.h

$(PARROTOLD) : $(FRP_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/parrot_config$(O) src/longopt$(O) $(MINIPARROT)
src/parrot_config$(O) $(MINIPARROT)
$(LINK) @ld_out@$@ \
$(FRP_DIR)/main$(O) src/parrot_config$(O) src/longopt$(O) \
$(FRP_DIR)/main$(O) src/parrot_config$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

$(PARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/parrot_config$(O) src/longopt$(O) \
src/parrot_config$(O) \
$(MINIPARROT) $(FRPTWO_DIR)/prt0.pbc$(O) $(GEN_PASM_INCLUDES)
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) src/longopt$(O) \
$(FRPTWO_DIR)/main$(O) $(FRPTWO_DIR)/prt0.pbc$(O) src/parrot_config$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS) $(LINK_DYNAMIC)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

Expand Down Expand Up @@ -976,17 +976,17 @@ $(PARROT_CONFIG) : $(DEV_TOOLS_DIR)/parrot-config.pir $(PARROT) $(PBC_TO_EXE)
$(PARROT) pbc_to_exe.pbc parrot_config.pbc

$(MINIPARROT) : $(FRP_DIR)/main$(O) $(INC_DIR)/api.h $(INC_DIR)/longopt.h $(LIBPARROT) \
src/null_config$(O) src/longopt$(O)
$(LINK) @ld_out@$@ $(FRP_DIR)/main$(O) src/null_config$(O) src/longopt$(O) \
src/null_config$(O)
$(LINK) @ld_out@$@ $(FRP_DIR)/main$(O) src/null_config$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

#IF(cygwin and optimize):$(INSTALLABLEPARROT) : LINK += -s
$(INSTALLABLEPARROT) : $(FRPTWO_DIR)/main$(O) $(GEN_HEADERS) $(LIBPARROT) \
src/install_config$(O) src/longopt$(O) \
src/install_config$(O) \
$(FRPTWO_DIR)/prt0.pbc$(O) $(PARROT)
$(LINK) @ld_out@$@ \
$(FRPTWO_DIR)/main$(O) src/install_config$(O) src/longopt$(O) \
$(FRPTWO_DIR)/main$(O) src/install_config$(O) \
$(FRPTWO_DIR)/prt0.pbc$(O) @rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(ADDGENERATED) "$@" "[main]" bin
Expand Down Expand Up @@ -1231,7 +1231,6 @@ $(FR_DIR)/pbc_disassemble/main$(O) : \
$(DIS) : $(FR_DIR)/pbc_disassemble/main$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_disassemble/main$(O) \
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

Expand All @@ -1240,7 +1239,6 @@ $(INSTALLABLEDIS) : $(FR_DIR)/pbc_disassemble/main$(O) \
src/install_config$(O) $(LIBPARROT)
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_disassemble/main$(O) \
src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(ADDGENERATED) "$@" "[main]" bin
Expand All @@ -1254,7 +1252,6 @@ $(FR_DIR)/pbc_dump/packdump$(O) : $(PARROT_H_HEADERS) $(INC_PMC_DIR)/pmc_sub.h \
$(PDUMP) : $(FR_DIR)/pbc_dump/main$(O) $(FR_DIR)/pbc_dump/packdump$(O) $(LIBPARROT) $(INC_DIR)/api.h
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_dump/main$(O) \
src/longopt$(O) \
$(FR_DIR)/pbc_dump/packdump$(O) $(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

Expand All @@ -1273,7 +1270,6 @@ $(INSTALLABLEPDUMP) : $(FR_DIR)/pbc_dump/main$(O) $(FR_DIR)/pbc_dump/packdump$(O
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_dump/main$(O) \
$(FR_DIR)/pbc_dump/packdump$(O) \
src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(ADDGENERATED) "$@" "[main]" bin
Expand All @@ -1286,7 +1282,6 @@ $(PBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) src/parrot_config$(O)
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_merge/main$(O) \
src/parrot_config$(O) \
src/longopt$(O) \
$(RPATH_BLIB) $(ALL_PARROT_LIBS) $(LINK_DYNAMIC) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1

Expand All @@ -1295,7 +1290,6 @@ $(INSTALLABLEPBC_MERGE) : $(FR_DIR)/pbc_merge/main$(O) $(LIBPARROT) $(INSTALLABL
$(LINK) @ld_out@$@ \
$(FR_DIR)/pbc_merge/main$(O) \
src/install_config$(O) \
src/longopt$(O) \
@rpath_lib@ $(ALL_PARROT_LIBS) $(LINKFLAGS)
#IF(win32 and has_mt): if exist $@.manifest mt.exe -nologo -manifest $@.manifest -outputresource:$@;1
$(ADDGENERATED) "$@" "[main]" bin
Expand Down Expand Up @@ -2584,8 +2578,6 @@ prog-clean :
archclean: dynext-clean
$(RM_F) \
$(O_FILES) \
$(GEN_CONFIGS) \
$(GEN_MAKEFILES) \
$(PARROT) \
$(MINIPARROT) \
$(INSTALLABLEPARROT) \
Expand All @@ -2600,13 +2592,12 @@ archclean: dynext-clean
$(PDB) $(FR_DIR)/parrot_debugger/main$(O) \
$(PBC_MERGE) $(FR_DIR)/pbc_merge/main$(O) \
$(DIS) $(FR_DIR)/pbc_disassemble/main$(O) \
$(PARROT_CONFIG) parrot_config$(O) parrot_config.c \
src/parrot_config$(O) parrot_config.pbc \
pbc_to_exe$(EXE) pbc_to_exe$(O) pbc_to_exe.pbc \
$(PARROT_CONFIG) parrot_config$(O) \
src/parrot_config$(O) \
pbc_to_exe$(EXE) pbc_to_exe$(O) \
src/null_config$(O) \
src/parrot_config$(O) \
src/install_config$(O) \
install_config.fpmc \
src/nci_test$(O) \
$(LIBNCI_TEST_SO) \
src/glut_callbacks$(O) \
Expand Down
3 changes: 2 additions & 1 deletion include/parrot/longopt.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* longopt.h
* Copyright (C) 2001-2012, Parrot Foundation.
* Copyright (C) 2001-2014, Parrot Foundation.
* Overview:
* Command line option parsing (for pre-initialized code)
*/
Expand Down Expand Up @@ -54,6 +54,7 @@ struct longopt_opt_info {
/* HEADERIZER BEGIN: src/longopt.c */
/* Don't modify between HEADERIZER BEGIN / HEADERIZER END. Your changes will be lost. */

PARROT_EXPORT
int longopt_get(
int argc,
ARGIN(const char* argv[]),
Expand Down
5 changes: 3 additions & 2 deletions src/longopt.c
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
/*
Copyright (C) 2001-2010, Parrot Foundation.
Copyright (C) 2001-2014, Parrot Foundation.
=head1 NAME
longopt.c - Command-line option parsing
=head1 DESCRIPTION
This is used by C<parrot>.
This is used by all frontends.
=head2 Functions
Expand Down Expand Up @@ -80,6 +80,7 @@ Any other value is a valid option identifier.
*/

PARROT_EXPORT
int
longopt_get(int argc, ARGIN(const char* argv[]),
ARGIN(const struct longopt_opt_decl options[]),
Expand Down

0 comments on commit 55fa37e

Please sign in to comment.