Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

OT: Github

509 views
Skip to first unread message

woodb...@gmail.com

unread,
Nov 9, 2016, 1:41:11 PM11/9/16
to
Several months ago a friend encouraged me to put my
open source software on Github.

http://webEbenezer.net/build_integration.html

I brushed the suggestion off at the time, but have been
thinking about it some more recently. I don't have many
users so didn't feel like I needed it. On the other hand,
I hope to have a lot of users so maybe it would be a good
idea. What do you think? Thanks in advance.

And I have an offer here to help me find some users:
http://webEbenezer.net/about.html


Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net

Rick C. Hodgin

unread,
Nov 9, 2016, 2:23:40 PM11/9/16
to
On Wednesday, November 9, 2016 at 1:41:11 PM UTC-5, woodb...@gmail.com wrote:
> Several months ago a friend encouraged me to put my
> open source software on Github.
>
> http://webEbenezer.net/build_integration.html
>
> I brushed the suggestion off at the time, but have been
> thinking about it some more recently. I don't have many
> users so didn't feel like I needed it. On the other hand,
> I hope to have a lot of users so maybe it would be a good
> idea. What do you think? Thanks in advance.
>
> And I have an offer here to help me find some users:
> http://webEbenezer.net/about.html

It is the best tool available for publicly hosting your source code. It
has an excellent interface and fully supports Git repositories, able to
sync with a constant online or sporadic online / offline connection. It
has issue tracking, annotation on code. It's free for all public
repositories, and is fee-based for private ones.

Another private/proprietary system which exists which is similar to GitHub.
For a small user base (5 users or less) it's free and it can be hosted
privately on your own server. For up to $10 it's $10/month and above that
it's an extra $1 per user in fixed N-user blocks:

https://www.atlassian.com/software/bitbucket

It's a little slower than GitHub, but it does most everything GitHub does,
and I'm able to host it on my $20/month server from www.linode.com with
zero effort after the initial setup. It was the best combination I found.

Best regards,
Rick C. Hodgin

Jorgen Grahn

unread,
Nov 11, 2016, 11:14:31 AM11/11/16
to
On Wed, 2016-11-09, woodb...@gmail.com wrote:
> Several months ago a friend encouraged me to put my
> open source software on Github.
>
> http://webEbenezer.net/build_integration.html
>
> I brushed the suggestion off at the time, but have been
> thinking about it some more recently. I don't have many
> users so didn't feel like I needed it. On the other hand,
> I hope to have a lot of users so maybe it would be a good
> idea. What do you think? Thanks in advance.

It's a good idea. Even if you just do the bare minimum: set
up a copy of your repository there and do 'git push github'
once in a while.

You don't have to focus your work around it if you don't want to.

/Jorgen

--
// Jorgen Grahn <grahn@ Oo o. . .
\X/ snipabacken.se> O o .

woodb...@gmail.com

unread,
Nov 11, 2016, 2:44:35 PM11/11/16
to
On Friday, November 11, 2016 at 10:14:31 AM UTC-6, Jorgen Grahn wrote:
> On Wed, 2016-11-09, woodb...@gmail.com wrote:
> > Several months ago a friend encouraged me to put my
> > open source software on Github.
> >
> > http://webEbenezer.net/build_integration.html
> >
> > I brushed the suggestion off at the time, but have been
> > thinking about it some more recently. I don't have many
> > users so didn't feel like I needed it. On the other hand,
> > I hope to have a lot of users so maybe it would be a good
> > idea. What do you think? Thanks in advance.
>
> It's a good idea. Even if you just do the bare minimum: set
> up a copy of your repository there and do 'git push github'
> once in a while.
>

I'm going to try Atlassian as Rick suggested. I'll probably
try their command line option before their GUI as you hint at here.

> You don't have to focus your work around it if you don't want to.
>

Good point.


Brian
Ebenezer Enterprises - "I want you to know how hard I am working
for you and for those at Laodicea, and for all who have not met me
personally." Colossians 2:1

http://webEbenezer.net

woodb...@gmail.com

unread,
Dec 11, 2016, 11:49:08 PM12/11/16
to
On Friday, November 11, 2016 at 1:44:35 PM UTC-6, woodb...@gmail.com wrote:
> On Friday, November 11, 2016 at 10:14:31 AM UTC-6, Jorgen Grahn wrote:
> > On Wed, 2016-11-09, woodb...@gmail.com wrote:
> > > Several months ago a friend encouraged me to put my
> > > open source software on Github.
> > >
> > > http://webEbenezer.net/build_integration.html
> > >
> > > I brushed the suggestion off at the time, but have been
> > > thinking about it some more recently. I don't have many
> > > users so didn't feel like I needed it. On the other hand,
> > > I hope to have a lot of users so maybe it would be a good
> > > idea. What do you think? Thanks in advance.
> >
> > It's a good idea. Even if you just do the bare minimum: set
> > up a copy of your repository there and do 'git push github'
> > once in a while.
> >
>
> I'm going to try Atlassian as Rick suggested. I'll probably
> try their command line option before their GUI as you hint at here.
>
> > You don't have to focus your work around it if you don't want to.
> >
>
> Good point.
>

Does this look OK:

https://bitbucket.org/woodbrian/onwards

? The code that's out there is more recent than the version
that's on my website. I plan to use a BSD license, but
haven't gotten to that yet.


Brian
Ebenezer Enterprises - Making programming fun again.
http://webEbenezer.net

Christian Gollwitzer

unread,
Dec 12, 2016, 3:51:45 AM12/12/16
to
Hi Brian,

Am 12.12.2016 um 05:48 schrieb woodb...@gmail.com:
> Does this look OK:
>
> https://bitbucket.org/woodbrian/onwards
>

I've had a quick look at this site. I think you should work on the
description. Consider somebody not familiar with the CMW (or even with
serialization) to stumble upon this page. What will be the most
interesting for him?

I'd start with a one-sentence description of what this does, for
instance "The CMW is a serialization framework for the C++ programming
language. It offers..." then list a few highlights - what makes it
special/different, especially compared to strong competitors like boost?
Maybe put a very short code fragment on usage (of possible).
The licensing stuff should go last. You can put a single word in the
first line, like "the CMW is a .... under the BSD license".

I don't know if you can use Markdown on bitbucket, but if you can, this
will also greatly enhance the readability, and you can include
links/images/formatted code.
For instance, this is one of my projects. The folder list is
github-generated. Below you find my description of what the package does.

https://github.com/auriocus/VecTcl


HTH,

Christian

woodb...@gmail.com

unread,
Dec 12, 2016, 9:12:08 PM12/12/16
to
I'm so far unable to figure out how to add/change anything
around the "overview" section. And when I click on the "downloads"
page there are no stats about how many times it has been downloaded.

Unfortunately, the software that's out on Atlassian requires
a C++2017 compiler. I'd like to ask compiler vendors to
make make_unique and string_view available with their C++
2011 compilers. That way users could get by with a C++2011
compiler.


Brian
Ebenezer Enterprises - In G-d we trust.
http://webEbenezer.net
https://bitbucket.org/woodbrian/onwards/

woodb...@gmail.com

unread,
Dec 14, 2016, 1:36:31 PM12/14/16
to
I'm trying out bitbucket. It took me a while to find the
"settings". But now I have managed to set a few things.
There's a "Description" text box under the "settings" page
that I tried adding a few sentences to and then saving my
work. But after that I don't see the sentences that I
entered anywhere. I'm also not getting any stats for
downloads here -
https://bitbucket.org/woodbrian/onwards/downloads?tab=downloads

And on the documentation page
https://confluence.atlassian.com/bitbucket/bitbucket-cloud-documentation-home-221448814.html

I get a "server not found" error when I click on either link.

Do you have any ideas on these things? Thanks in advance.

Brian
Ebenezer Enterprises
http://webEbenezer.net

Scott Lurndal

unread,
Dec 14, 2016, 1:43:40 PM12/14/16
to
woodb...@gmail.com writes:


>I get a "server not found" error when I click on either link.
>
>Do you have any ideas on these things? Thanks in advance.

Yes, I have an idea. Contact Atlassian. This is a C++ forum.

woodb...@gmail.com

unread,
Dec 14, 2016, 3:21:02 PM12/14/16
to
I contacted them an hour or two before I posted about the
problems here. They haven't gotten back to me yet. They have
4 levels of severity and I picked level 4 when I asked this
question. So they may take their time in getting back to me.
Rick sounds like he is one of their users so maybe he has figured
out some of these things already.

Rick C. Hodgin

unread,
Dec 14, 2016, 3:25:22 PM12/14/16
to
I have never done anything with their settings. I have been on their
forums before, and they do take a while to respond, typically about
a whole day IIRC.

I used their product completely stock out of the box, save the
necessary custom settings to the database, etc.

woodb...@gmail.com

unread,
Dec 14, 2016, 4:05:15 PM12/14/16
to
On your "Downloads" page do you get some statistics about
how many downloads there have been? On my version of that
page there are blanks. No zeros or numbers, just blanks.

Rick C. Hodgin

unread,
Dec 14, 2016, 4:07:57 PM12/14/16
to
On Wednesday, December 14, 2016 at 4:05:15 PM UTC-5, woodb...@gmail.com wrote:
> On Wednesday, December 14, 2016 at 2:25:22 PM UTC-6, Rick C. Hodgin wrote:
> > On Wednesday, December 14, 2016 at 3:21:02 PM UTC-5, woodb...@gmail.com wrote:
> > > On Wednesday, December 14, 2016 at 12:43:40 PM UTC-6, Scott Lurndal wrote:
> > > > woodb...@gmail.com writes:
> > > >
> > > >
> > > > >I get a "server not found" error when I click on either link.
> > > > >
> > > > >Do you have any ideas on these things? Thanks in advance.
> > > >
> > > > Yes, I have an idea. Contact Atlassian. This is a C++ forum.
> > >
> > > I contacted them an hour or two before I posted about the
> > > problems here. They haven't gotten back to me yet. They have
> > > 4 levels of severity and I picked level 4 when I asked this
> > > question. So they may take their time in getting back to me.
> > > Rick sounds like he is one of their users so maybe he has figured
> > > out some of these things already.
> >
> > I have never done anything with their settings. I have been on their
> > forums before, and they do take a while to respond, typically about
> > a whole day IIRC.
> >
> > I used their product completely stock out of the box, save the
> > necessary custom settings to the database, etc.
>
>
> On your "Downloads" page do you get some statistics about
> how many downloads there have been? On my version of that
> page there are blanks. No zeros or numbers, just blanks.

I've never used it. I've had it exposed to the public in the past,
but there were hack attacks on my server at one point. I didn't
know what the weakness was so I started disabling everything to
the public, only to later found out it was a hole in ssh. I then
tightened security around that hole and haven't had an issue
since. I just also never put my Atlassian software back facing
toward the public, so I've never looked at anything other than
the commit pages which show the diffs, and the files listings.

woodb...@gmail.com

unread,
Dec 26, 2016, 12:46:45 PM12/26/16
to
On Wednesday, November 9, 2016 at 1:23:40 PM UTC-6, Rick C. Hodgin wrote:
> On Wednesday, November 9, 2016 at 1:41:11 PM UTC-5, woodb...@gmail.com wrote:
> > Several months ago a friend encouraged me to put my
> > open source software on Github.
> >
> > http://webEbenezer.net/build_integration.html
> >
> > I brushed the suggestion off at the time, but have been
> > thinking about it some more recently. I don't have many
> > users so didn't feel like I needed it. On the other hand,
> > I hope to have a lot of users so maybe it would be a good
> > idea. What do you think? Thanks in advance.
> >
> > And I have an offer here to help me find some users:
> > http://webEbenezer.net/about.html
>
> It is the best tool available for publicly hosting your source code. It
> has an excellent interface and fully supports Git repositories, able to
> sync with a constant online or sporadic online / offline connection. It
> has issue tracking, annotation on code. It's free for all public
> repositories, and is fee-based for private ones.
>

Now I've created a repo on Github also:
https://github.com/woodbrian/onwards

One thing I like about Github is they make it easy to add
a license to your project. I chose the BSD 2-clause license.
I haven't really decided though whether to stick to bitbucket
or swith to github. My website is still pointing at the
bitbucket repo.

Rick C. Hodgin

unread,
Feb 17, 2017, 12:24:37 AM2/17/17
to
I upgraded to Bitbucket 4.x this evening. It was a completely painless
experience. The new version was $10 to download one-time fee. I used
postgresql and was up and running, importing my existing repositories
(all of them) from GitHub within 30 minutes. It has support for 10
users.

It took me longer to figure out how to setup postgresql and to generate
an api token on GitHub than it did to setup everything in BitBucket.

I've been impressed with Atlassian since I first found them 2015. I
continue to be impressed with each new release. (Note: I have no
affiliation with Atlassian, except that I used Stash and Bitbucket).

https://www.atlassian.com/software/bitbucket

Thank you,
Rick C. Hodgin

woodb...@gmail.com

unread,
Feb 28, 2017, 11:46:45 AM2/28/17
to
Thanks. Looks interesting. In retrospect, I wish
someone would have suggested Atlassian or Github to
me years ago. I'm enjoying using them.

Until recently I had one directory where I built both
a library and two executables (tiers). Now I've added
a new directory called "tiers" and moved the code for
the tiers there. I think this will help people who
are interested in learning to use my software.

The downside to this is I'm specifying CXX and CXXFLAGS
(and maybe a few other things like that) in multiple
makefiles. I figured out a way where I could pass those
from the higher level makefile to the lower level --
something like:

$(MAKE) -C tiers CXX=$(CXX) CXXFLAGS=$(CXXFLAGS)

. But then I realized that would only work from the
top level directory. If I ran make from the tiers
subdirectory, it wouldn't work. So I did the obligatory
search for alternatives to make. Then I got a little
discouraged, and decided to stick with make.


This is my top level makefile
https://github.com/Ebenezer-group/onwards/blob/master/makefile

And this is a lower level makefile
https://github.com/Ebenezer-group/onwards/blob/master/tiers/makefile

Thanks in advance for suggestions on how to improve those files.


Brian
Ebenezer Enterprises - So far G-d has helped us.
http://webEbenezer.net

Scott Lurndal

unread,
Feb 28, 2017, 12:11:16 PM2/28/17
to
woodb...@gmail.com writes:

>Until recently I had one directory where I built both
>a library and two executables (tiers). Now I've added
>a new directory called "tiers" and moved the code for
>the tiers there. I think this will help people who
>are interested in learning to use my software.
>
>The downside to this is I'm specifying CXX and CXXFLAGS
>(and maybe a few other things like that) in multiple
>makefiles. I figured out a way where I could pass those
>from the higher level makefile to the lower level --
>something like:
>
>$(MAKE) -C tiers CXX=$(CXX) CXXFLAGS=$(CXXFLAGS)

A common solution for this is to encapsulate your
definitions in a file at the top level called
Makefile.defs.

Encapsulate your rules in a top-level file called Makefile.rules.
e.g:

Makefile.defs:
--------------
CINCLUDES = -I$(TOP)/include
CINCLUDES += -I$(TOP)

DEBUGFLAGS = -g

GXXFLAGS = -mno-red-zone
GXXFLAGS += -fno-strict-aliasing
GXXFLAGS += -fno-stack-protector
GXXFLAGS += -fno-exceptions
GXXFLAGS += -Wall
GXXFLAGS += -mtune=native
GXXFLAGS += -O2

CXXFLAGS = $(DEBUGFLAGS) $(CINCLUDES) $(strip $(GXXFLAGS))

LDFLAGS += -Wl,-E
SOLDFLAGS += -Wl,-E -shared -lpthread -nostartfiles -nodefaultlibs -nostdlib
LIB = $(TOP)/lib

LIBCOMMON = $(LIB)/libcommon.a
LIBPROCESSOR = $(LIB)/libprocessor.a
LIBMP = $(LIB)/libmp.a
LIBDIRECTIVE = $(LIB)/libdirective.a
LIBOP = $(LIB)/libop.a
SIM_LIBS = $(LIBMP)
SIM_LIBS += $(LIBPROCESSOR)
SIM_LIBS += $(LIBCOMMON)
SIM_LIBS += $(LIBFETCH)

Makefile.rules:
---------------
#
# Common Makefile Rules
#
%.o: %.c
@echo " COMPILE $<"
$(HUSHCOMPILE)$(CC) $(CFLAGS) -MMD -o $@ -c $<

%.o: %.cpp
@echo " COMPILE $<"
$(HUSHCOMPILE)$(COMPILE.cpp) -MMD -o $@ $<

%.s: %.cpp
@echo " COMPILE-TO-ASM $<"
$(HUSHCOMPILE)$(COMPILE.cpp) -MMD -S $<

%.so: %.o
@echo " BUILDSO $@"
$(HUSHCOMPILE)$(LD) -o $@ $(SOLDFLAGS)

%.icm5: %.sprasm
@echo " SPRASM $<"
$(HUSHCOMPILE)$(SPRASM) $(SPRASM_FLAGS) -o $@ $<

buildsubs:: $(DIRS) subdirs

clean:: subdirs
.PHONY: subdirs clean $(SUBDIRS)
clobber:: clean subdirs

subdirs: $(SUBDIRS)

$(SUBDIRS):
@ $(MAKE) -C $@ $(MAKECMDGOALS) $(MAKEARGS)

clean::
@-$(RM) -f $(CLEAN_FILES) $(OBJECTS)
@ if [ -n "$(CLEAN_DIRS)" ]; then \
$(RM) -rf $(CLEAN_DIRS); \
fi

Then the top-level makefile:

Makefile:
---------
TOP=.
include $(TOP)/Makefile.defs

TARGET = vsim

SUBDIRS += common
SUBDIRS += io/dlps
SUBDIRS += processor
SUBDIRS += mp
SUBDIRS += utilities

SOURCES = main.cpp
OBJECTS = $(SOURCES:.cpp=.o)

HOST_LIBS = -lreadline -lcurses -lpthread -lgmp -ldl

DIRS = lib

CLOBBER_FILES += $(TARGET) $(TARGET).csc $(TARGET).csc.in $(TARGET).csc.po
CLOBBER_FILES += include/built.h
CLOBBER_DIRS += $(DIRS)

all: $(TARGET)

main.cpp: vsim_built buildsubs

utilities: common

$(SIM_LIBS): $(SUBDIRS)

$(TARGET):: $(OBJECTS) $(SUBDIRS) $(SIM_LIBS)
$(CXX) $(DEBUGFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(SIM_LIBS) $(HOST_LIBS)
$(OBJCOPY) --only-keep-debug $@ $@.debuginfo
$(OBJCOPY) --strip-debug $@
$(OBJCOPY) --add-gnu-debuglink=$@.debuginfo $@

include $(TOP)/Makefile.rules
-include *.d

common/Makefile:
----------------
TOP=..
include $(TOP)/Makefile.defs

SOURCES = command_table.cpp
SOURCES += contention_protocol.cpp
SOURCES += dcp.cpp
SOURCES += dcp_header.cpp
SOURCES += disassembler.cpp
SOURCES += ebcdic.cpp
SOURCES += file_logger.cpp
SOURCES += mcs.cpp
SOURCES += mux_logger.cpp
SOURCES += netport.cpp
SOURCES += osdep.cpp
SOURCES += pollselect.cpp
SOURCES += pool.cpp
SOURCES += protocol.cpp
SOURCES += serialport.cpp
SOURCES += station.cpp
SOURCES += syslog_logger.cpp
SOURCES += thread.cpp
SOURCES += timer.cpp
SOURCES += timer_manager.cpp

CXXFLAGS += -fpic

OBJECTS = $(SOURCES:.cpp=.o)

all: $(LIBCOMMON)


$(LIBCOMMON): $(OBJECTS)
ar cr $@ $+

include $(TOP)/Makefile.rules

---------

This will automatically descend into any directory
listed in SUBDIRS at each level and
build the Makefile in that subdirectory using the
common definitions in $(TOP)/Makefile.defs and $(TOP)/Makefile.rules

Objects from each subdirectory are archived in a archive
library specific to each subdirectory (since when using
parallel make, the 'ar' command isn't "parallel make" safe.

Jorgen Grahn

unread,
Mar 1, 2017, 10:46:13 PM3/1/17
to
On Tue, 2017-02-28, woodb...@gmail.com wrote:
...
> Until recently I had one directory where I built both
> a library and two executables (tiers). Now I've added
> a new directory called "tiers" and moved the code for
> the tiers there. I think this will help people who
> are interested in learning to use my software.
>
> The downside to this is I'm specifying CXX and CXXFLAGS
> (and maybe a few other things like that) in multiple
> makefiles. I figured out a way where I could pass those
> from the higher level makefile to the lower level --
> something like:
>
> $(MAKE) -C tiers CXX=$(CXX) CXXFLAGS=$(CXXFLAGS)
>
> . But then I realized that would only work from the
> top level directory. If I ran make from the tiers
> subdirectory, it wouldn't work. So I did the obligatory
> search for alternatives to make. Then I got a little
> discouraged, and decided to stick with make.
>
>
> This is my top level makefile
> https://github.com/Ebenezer-group/onwards/blob/master/makefile
>
> And this is a lower level makefile
> https://github.com/Ebenezer-group/onwards/blob/master/tiers/makefile
>
> Thanks in advance for suggestions on how to improve those files.

I don't know your project, but if you don't /have/ to see it as
separate parts, I recommend having just /one/ Makefile (one invocation
of make, no $(MAKE)) covering all of the code.

Peter Miller's "Recursive Make Considered Harmful" covers this at
length: http://aegis.sourceforge.net/auug97.pdf .

Another thing that worries me with your second Makefile is that
dependencies on header files seem to be partly missing.

direct: direct.cc ../libhome.a
$(CXX) -o $@ $(CXXFLAGS) $< ../libhome.a
size $@

Doesn't direct.cc #include anything related to libhome?

Just for reference, here's how I tend to do it:

https://github.com/kjgrahn/tcp/blob/master/Makefile

The last twenty lines is boilerplate to get automatic dependency
generation working, along the lines of

* Paul D. Smith: Auto-Dependency Generation
http://make.mad-scientist.net/papers/advanced-auto-dependency-generation/
* The GNU Make Manual

woodb...@gmail.com

unread,
Mar 3, 2017, 1:24:43 PM3/3/17
to
On Wednesday, March 1, 2017 at 9:46:13 PM UTC-6, Jorgen Grahn wrote:
>
> I don't know your project, but if you don't /have/ to see it as
> separate parts, I recommend having just /one/ Makefile (one invocation
> of make, no $(MAKE)) covering all of the code.
>

I cloned your project on a TrueOS/FreeBSD system and tried
running make:

make: "/usr/home/brian/tcp/Makefile" line 73: Need an operator
make: "/usr/home/brian/tcp/Makefile" line 83: warning: duplicate script for target "%.o" ignored
make: "/usr/home/brian/tcp/Makefile" line 80: warning: using previous script for "%.o" defined here
make: "/usr/home/brian/tcp/Makefile" line 84: warning: duplicate script for target "%.o" ignored
make: "/usr/home/brian/tcp/Makefile" line 80: warning: using previous script for "%.o" defined here
make: Fatal errors encountered -- cannot continue
make: stopped in /usr/home/brian/tcp

------------------------------------------------------------

I want something that works on FreeBSD, Linux, Windows, etc.
I'm thinking about trying SCons. http://scons.org/

Jorgen Grahn

unread,
Mar 4, 2017, 6:09:20 PM3/4/17
to
On Fri, 2017-03-03, woodb...@gmail.com wrote:
> On Wednesday, March 1, 2017 at 9:46:13 PM UTC-6, Jorgen Grahn wrote:
>>
>> I don't know your project, but if you don't /have/ to see it as
>> separate parts, I recommend having just /one/ Makefile (one invocation
>> of make, no $(MAKE)) covering all of the code.
>>
>
> I cloned your project on a TrueOS/FreeBSD system and tried
> running make:
>
> make: "/usr/home/brian/tcp/Makefile" line 73: Need an operator
> make: "/usr/home/brian/tcp/Makefile" line 83: warning: duplicate script for target "%.o" ignored
> make: "/usr/home/brian/tcp/Makefile" line 80: warning: using previous script for "%.o" defined here
> make: "/usr/home/brian/tcp/Makefile" line 84: warning: duplicate script for target "%.o" ignored
> make: "/usr/home/brian/tcp/Makefile" line 80: warning: using previous script for "%.o" defined here
> make: Fatal errors encountered -- cannot continue
> make: stopped in /usr/home/brian/tcp

> I want something that works on FreeBSD, Linux, Windows, etc.

The Makefile is written for GNU Make. I don't think the lowest common
denominator of all build tools called "make"[0] is a good basis for a
build system, when GNU Make is universally available.

So on the BSDs I simply run gmake instead of make. (Except I never
tried building this particular project on BSD before, and the libpcap
stuff seems to be off, too.)

/Jorgen

[0] I haven't looked into the capabilities of BSD make. It may be powerful,
but to be blunt, I don't have a reason to care.

woodb...@gmail.com

unread,
Mar 27, 2017, 11:02:00 AM3/27/17
to
On Wednesday, March 1, 2017 at 9:46:13 PM UTC-6, Jorgen Grahn wrote:
Your use of the Os optimization flag inspired me to try that
flag again and I'm glad I have.

I've tried this approach now, but there are couple of things
about it that I'm not happy with. One is invoking make
from a subdirectory. First I trield making a symbolic
link to the makefile in the subdirectory. That didn't
work very well. What I've come up with is:

cd ..; make; cd -

That works, but was wondering if there's a better way.

The other thing is I have this line:

TIERS := tiers/cmwAmbassador tiers/genz

That line helps me with building those two executables
and with installing/copying them to an install directory.
It doesn't help though with uninstalling those files as
the subdirectory (tiers) is not part of where the files
were installed.

I think I'll go with this change as it helps to get
rid of a makefile and some duplication, but it's not
all easy street.

Also I switched back to bitbucket:
https://bitbucket.org/webenezer/onwards/overview



Brian
Ebenezer Enterprises - "You are the light of the world.
A city on a hill cannot be hidden." Matthew 5:14

http://webEbenezer.net

Scott Lurndal

unread,
Mar 27, 2017, 11:53:15 AM3/27/17
to
woodb...@gmail.com writes:

>> >
>> > The downside to this is I'm specifying CXX and CXXFLAGS
>> > (and maybe a few other things like that) in multiple
>> > makefiles. I figured out a way where I could pass those
>> > from the higher level makefile to the lower level --
>> > something like:

Just put all your definitions in the top-level file Makefile.defs,
and all the added rules in a top-level file Makefile.rules.

Then, every makefile in the directory heirarchy should start with:

TOP=..
include $(TOP)/Makefile.defs


... stuff

include $(TOP)/Makefile.rules

If you're two levels down, "TOP=../.." and so forth.

Then set up a subdirs rule to descend into the subdirectories
from the top-level makefile:

===== [Begin top level Makefile] =====
TOP=.
include $(TOP)/Makefile.defs

TARGET=xxx

SUBDIRS = common
SUBDIRS += io/dlps
SUBDIRS += processor

$(TARGET): $(OBJECTS) $(SUBDIRS) $(LIBRARIES)
$(CXX) $(DEBUGFLAGS) $(LDFLAGS) -o $@ $(OBJECTS) $(LIBRARIES) $(HOST_LIBS)

include $(TOP)/Makefile.rules
===== [End Top Level Makefile] =====

in Makefile.rules: add:

Jorgen Grahn

unread,
Mar 27, 2017, 4:42:38 PM3/27/17
to
On Mon, 2017-03-27, woodb...@gmail.com wrote:
> On Wednesday, March 1, 2017 at 9:46:13 PM UTC-6, Jorgen Grahn wrote:
...

>> https://github.com/kjgrahn/tcp/blob/master/Makefile
>
> Your use of the Os optimization flag inspired me to try that
> flag again and I'm glad I have.

I use it now and then, but nowadays I tend to use -O2 by default.

With the kind of programming I do, performance optimization at that
level is almost never important.

> I've tried this approach now, but there are couple of things
> about it that I'm not happy with. One is invoking make
> from a subdirectory. First I trield making a symbolic
> link to the makefile in the subdirectory. That didn't
> work very well. What I've come up with is:
>
> cd ..; make; cd -
>
> That works, but was wondering if there's a better way.

The approach to Makefiles I use does not, as far as I know, support
so-called out-of-tree builds. The Makefile says exactly where the
object files and executables must go.

My impression is trying to support that makes things a lot harder.

If you just want to stand in one directory and build in another, GNU
make (and BSD make, apparently) has the -C flag. What you write above
can be changed to:

% make -C..

Richard

unread,
Mar 27, 2017, 4:56:43 PM3/27/17
to
[Please do not mail me a copy of your followup]

Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
<slrnodiu9m.1j...@frailea.sa.invalid> thusly:

>The approach to Makefiles I use does not, as far as I know, support
>so-called out-of-tree builds. The Makefile says exactly where the
>object files and executables must go.
>
>My impression is trying to support that makes things a lot harder.

It's mind numbingly trivial if you use CMake :)
--
"The Direct3D Graphics Pipeline" free book <http://tinyurl.com/d3d-pipeline>
The Terminals Wiki <http://terminals-wiki.org>
The Computer Graphics Museum <http://computergraphicsmuseum.org>
Legalize Adulthood! (my blog) <http://legalizeadulthood.wordpress.com>

Rick C. Hodgin

unread,
Mar 27, 2017, 5:03:15 PM3/27/17
to
On Monday, March 27, 2017 at 4:56:43 PM UTC-4, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>
> >The approach to Makefiles I use does not, as far as I know, support
> >so-called out-of-tree builds. The Makefile says exactly where the
> >object files and executables must go.
> >
> >My impression is trying to support that makes things a lot harder.
>
> It's mind numbingly trivial if you use CMake :)

It's even easier if you switch to Visual Studio. It handles it all
for you. Just add files to projects, projects to solutions, and then
you can click one of the buttons (or use the hotkeys):

Rebuild all
Build all (only changed recompiled)
Rebuild project
Build project (only changes recompiled)
Compile file (recompiles the current source file)

Integrated error reporting. Integrated debugging. It is an amazingly
keen experience:

If you can't view the video, use VLC (http://videolan.org):
http://www.visual-freepro.org/videos/2014_02_13__demonstrate_x86_debugger.ogv

woodb...@gmail.com

unread,
Mar 27, 2017, 6:02:07 PM3/27/17
to
That does work with the FreeBSD make and is better than what
I was doing.

Jorgen Grahn

unread,
Mar 28, 2017, 4:06:33 PM3/28/17
to
On Mon, 2017-03-27, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>
>>The approach to Makefiles I use does not, as far as I know, support
>>so-called out-of-tree builds. The Makefile says exactly where the
>>object files and executables must go.
>>
>>My impression is trying to support that makes things a lot harder.
>
> It's mind numbingly trivial if you use CMake :)

Perhaps, but the cost of copying the source code to whereever you want
to build, and building it there, is very small today.

Richard

unread,
Mar 29, 2017, 12:01:30 PM3/29/17
to
[Please do not mail me a copy of your followup]

Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
<slrnodlghu.1j...@frailea.sa.invalid> thusly:

>On Mon, 2017-03-27, Richard wrote:
>> [Please do not mail me a copy of your followup]
>>
>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>>
>>>The approach to Makefiles I use does not, as far as I know, support
>>>so-called out-of-tree builds. The Makefile says exactly where the
>>>object files and executables must go.
>>>
>>>My impression is trying to support that makes things a lot harder.
>>
>> It's mind numbingly trivial if you use CMake :)
>
>Perhaps, but the cost of copying the source code to whereever you want
>to build, and building it there, is very small today.

That sounds to me like you haven't tried to do what you suggest with
any sizeable distribution or with any project that has a mildly
complex build.

In those situations where I've attempted to do what you suggest, it
was significantly more painful than just running CMake. CMake
supports this trivially out-of-the-box using the same source tree.

woodb...@gmail.com

unread,
Mar 29, 2017, 6:08:25 PM3/29/17
to
On Monday, March 27, 2017 at 4:03:15 PM UTC-5, Rick C. Hodgin wrote:
> On Monday, March 27, 2017 at 4:56:43 PM UTC-4, Richard wrote:
> > [Please do not mail me a copy of your followup]
> >
> > Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
> > <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
> >
> > >The approach to Makefiles I use does not, as far as I know, support
> > >so-called out-of-tree builds. The Makefile says exactly where the
> > >object files and executables must go.
> > >
> > >My impression is trying to support that makes things a lot harder.
> >
> > It's mind numbingly trivial if you use CMake :)
>
> It's even easier if you switch to Visual Studio. It handles it all
> for you. Just add files to projects, projects to solutions, and then
> you can click one of the buttons (or use the hotkeys):
>

I'm wondering if there are things with my Windows makefile
that could be improved on:

https://bitbucket.org/webenezer/onwards/src/7a925499bdaa2ce53df5401f255b2db9d6100bf0/makefile.windows?at=master&fileviewer=file-view-default

Let me know if that link doesn't work -- I'll post the file.

One of the rules there uses /link, but two of them don't.
It seems to work either way. I'm not sure about the libraries
I link to. They work on my Windows7 machine, but I don't have
anything with a newer version of Windows on it to work with.
I want to sell my laptop and buy a new one... then I'd
probably get a newer version of Windows. Thanks in advance.

Manfred

unread,
Mar 29, 2017, 6:24:10 PM3/29/17
to
On 03/30/2017 12:08 AM, woodb...@gmail.com wrote:
>
> I'm wondering if there are things with my Windows makefile
> that could be improved on:
>
> https://bitbucket.org/webenezer/onwards/src/7a925499bdaa2ce53df5401f255b2db9d6100bf0/makefile.windows?at=master&fileviewer=file-view-default
>

quicklz.obj: quicklz.h
$(CC) $(CFLAGS) -c quicklz.c

marshalling_integer.obj: marshalling_integer.hh
$(CC) $(CFLAGS) -c marshalling_integer.cc

The above should indicate the .c and .cc sources as dependencies

Jorgen Grahn

unread,
Mar 30, 2017, 3:08:41 PM3/30/17
to
On Wed, 2017-03-29, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
> <slrnodlghu.1j...@frailea.sa.invalid> thusly:
>
>>On Mon, 2017-03-27, Richard wrote:
>>> [Please do not mail me a copy of your followup]
>>>
>>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>>> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>>>
>>>>The approach to Makefiles I use does not, as far as I know, support
>>>>so-called out-of-tree builds. The Makefile says exactly where the
>>>>object files and executables must go.
>>>>
>>>>My impression is trying to support that makes things a lot harder.
>>>
>>> It's mind numbingly trivial if you use CMake :)
>>
>>Perhaps, but the cost of copying the source code to whereever you want
>>to build, and building it there, is very small today.
>
> That sounds to me like you haven't tried to do what you suggest

What do I suggest?

> with any sizeable distribution or with any project that has a mildly
> complex build.

For the size, Make scales really well. One more source file, one more
line in the Makefile. (If you write decent Makefiles, which I do.)

For complexity, almost no systems have a complex build these days --
except when the build system itself is the source of complexity.

> In those situations where I've attempted to do what you suggest, it
> was significantly more painful than just running CMake. CMake
> supports this trivially out-of-the-box using the same source tree.

I don't quite understand. For someone else's project, you build with
whatever they offer. If that project uses CMake, you build using
CMake. (For me, it's usually a .configure script.)

If it was my project, I'd probably choose a plain Makefile.

Granted, there /are/ exceptions. Like the Linux kernel, where extreme
configurability is a must. Plain Make would not work there -- there's
no fixed dependency graph. But I'm not Linus, and I don't run any
projects like that. I won't place that kind of cost on a project
which doesn't need it, just because some /other/ project does.

Richard

unread,
Mar 30, 2017, 7:20:38 PM3/30/17
to
[Please do not mail me a copy of your followup]

Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
<slrnodqlte.1j...@frailea.sa.invalid> thusly:

>On Wed, 2017-03-29, Richard wrote:
>> [Please do not mail me a copy of your followup]
>>
>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>> <slrnodlghu.1j...@frailea.sa.invalid> thusly:
>>
>>>On Mon, 2017-03-27, Richard wrote:
>>>> [Please do not mail me a copy of your followup]
>>>>
>>>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>>>> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>>>>
>>>>>The approach to Makefiles I use does not, as far as I know, support
>>>>>so-called out-of-tree builds. The Makefile says exactly where the
>>>>>object files and executables must go.
>>>>>
>>>>>My impression is trying to support that makes things a lot harder.
>>>>
>>>> It's mind numbingly trivial if you use CMake :)
>>>
>>>Perhaps, but the cost of copying the source code to whereever you want
>>>to build, and building it there, is very small today.
>>
>> That sounds to me like you haven't tried to do what you suggest
>
>What do I suggest?

Do you not even know what you posted or can't read it above?

>>>Perhaps, but the cost of copying the source code to whereever you want
>>>to build, and building it there, is very small today.


Jorgen Grahn

unread,
Mar 31, 2017, 2:33:02 PM3/31/17
to
On Thu, 2017-03-30, Richard wrote:
> [Please do not mail me a copy of your followup]
>
> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
> <slrnodqlte.1j...@frailea.sa.invalid> thusly:
>
>>On Wed, 2017-03-29, Richard wrote:
>>> [Please do not mail me a copy of your followup]
>>>
>>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>>> <slrnodlghu.1j...@frailea.sa.invalid> thusly:
>>>
>>>>On Mon, 2017-03-27, Richard wrote:
>>>>> [Please do not mail me a copy of your followup]
>>>>>
>>>>> Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>>>>> <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>>>>>
>>>>>>The approach to Makefiles I use does not, as far as I know, support
>>>>>>so-called out-of-tree builds. The Makefile says exactly where the
>>>>>>object files and executables must go.
>>>>>>
>>>>>>My impression is trying to support that makes things a lot harder.
>>>>>
>>>>> It's mind numbingly trivial if you use CMake :)
>>>>
>>>>Perhaps, but the cost of copying the source code to whereever you want
>>>>to build, and building it there, is very small today.
>>>
>>> That sounds to me like you haven't tried to do what you suggest
>>
>>What do I suggest?
>
> Do you not even know what you posted or can't read it above?

(I don't think you mean "copying the source code", since we have tools
like rsync to do that quickly these days.)

I suggested using a Makefile, but if you insinuate that I haven't
tried that, that's trivially false. Of course I have tried it; I use
make for all my projects. I've also used it to speed up and clarify
other projects' build processses, too. I remember speeding up one
build from 20 minutes to around twelve seconds.

I'm active looking for valid, technical reasons to use something else,
but haven't found any so far. Modulo the "I'm not Linus" bit;
projects like the Linux kernel definitely need something else.

woodb...@gmail.com

unread,
Mar 31, 2017, 6:52:21 PM3/31/17
to
Make works reasonably well for me now that I've put more
work into it. It's kind of a pain to have one makefile
for BSD/Linux/etc and another for Windows, but I've put
up with that for years.

My build takes around 14 seconds on my laptop and that's
doing a

make all example

I'm not sure if it would be better to include the example
target in all or leave it separate.

Jorgen Grahn

unread,
May 2, 2017, 2:39:36 PM5/2/17
to
On Fri, 2017-03-31, woodb...@gmail.com wrote:
...
> Make works reasonably well for me now that I've put more
> work into it. It's kind of a pain to have one makefile
> for BSD/Linux/etc and another for Windows, but I've put
> up with that for years.
>
> My build takes around 14 seconds on my laptop and that's
> doing a
>
> make all example
>
> I'm not sure if it would be better to include the example
> target in all or leave it separate.

It's a matter of taste, but I like 'all' to mean "build everything
that can conceivably be built" so that's a vote for a line which says:

all: example

Jorgen Grahn

unread,
May 2, 2017, 2:52:22 PM5/2/17
to
On Wed, 2017-03-29, woodb...@gmail.com wrote:
> On Monday, March 27, 2017 at 4:03:15 PM UTC-5, Rick C. Hodgin wrote:
>> On Monday, March 27, 2017 at 4:56:43 PM UTC-4, Richard wrote:
>> > [Please do not mail me a copy of your followup]
>> >
>> > Jorgen Grahn <grahn...@snipabacken.se> spake the secret code
>> > <slrnodiu9m.1j...@frailea.sa.invalid> thusly:
>> >
>> > >The approach to Makefiles I use does not, as far as I know, support
>> > >so-called out-of-tree builds. The Makefile says exactly where the
>> > >object files and executables must go.
>> > >
>> > >My impression is trying to support that makes things a lot harder.
>> >
>> > It's mind numbingly trivial if you use CMake :)
>>
>> It's even easier if you switch to Visual Studio. It handles it all
>> for you. Just add files to projects, projects to solutions, and then
>> you can click one of the buttons (or use the hotkeys):
>>
>
> I'm wondering if there are things with my Windows makefile
> that could be improved on:
>
> https://bitbucket.org/webenezer/onwards/src/7a925499bdaa2ce53df5401f255b2db9d6100bf0/makefile.windows?at=master&fileviewer=file-view-default
>
> Let me know if that link doesn't work -- I'll post the file.

I don't know Windows make (if that's what you're using), but this part:

.c.obj:
$(CC) $(CFLAGS) -c $*.c -o $*.obj

quicklz.obj: quicklz.h
$(CC) $(CFLAGS) -c quicklz.c

marshalling_integer.obj: marshalling_integer.hh
$(CC) $(CFLAGS) -c marshalling_integer.cc

- Are the dependencies on header files really that simple, just two of
them? If not, you risk broken builds, if you change a header and
expect an incremental build to work correctly.

- The .c.obj line tells what command produces foo.obj from foo.c, but
then you repeat that for quicklz.obj and marshalling_integer.obj. At
least with Gnu Make you can simplify that to:

.c.obj:
$(CC) $(CFLAGS) -c $*.c -o $*.obj

quicklz.obj: quicklz.h
marshalling_integer.obj: marshalling_integer.hh

> One of the rules there uses /link, but two of them don't.
> It seems to work either way.

That's

tiers\genz.exe: tiers\genz.cc .\libhome.lib
del tiers\string_join.hh tiers\udp_stuff.hh
$(CC) -Fe:$@ $(CFLAGS) -I. tiers\genz.cc /link ...

And that's because you both compile tiers\genz.cc and link, producing
the exe file.

I think I'd split that into two steps, and explicitly generate
tiers\genz.obj as a first pure compilation step.

[snip]

woodb...@gmail.com

unread,
May 28, 2017, 9:03:07 AM5/28/17
to
On Tuesday, May 2, 2017 at 1:52:22 PM UTC-5, Jorgen Grahn wrote:
>
> I don't know Windows make (if that's what you're using), but this part:
>
> .c.obj:
> $(CC) $(CFLAGS) -c $*.c -o $*.obj
>
> quicklz.obj: quicklz.h
> $(CC) $(CFLAGS) -c quicklz.c
>
> marshalling_integer.obj: marshalling_integer.hh
> $(CC) $(CFLAGS) -c marshalling_integer.cc
>
> - Are the dependencies on header files really that simple, just two of
> them? If not, you risk broken builds, if you change a header and
> expect an incremental build to work correctly.
>
> - The .c.obj line tells what command produces foo.obj from foo.c, but
> then you repeat that for quicklz.obj and marshalling_integer.obj. At
> least with Gnu Make you can simplify that to:
>
> .c.obj:
> $(CC) $(CFLAGS) -c $*.c -o $*.obj
>
> quicklz.obj: quicklz.h
> marshalling_integer.obj: marshalling_integer.hh
>

I've changed things now to where I'm no longer building a library:

https://github.com/Ebenezer-group/onwards/blob/master/makefile.windows

There's one .o (.obj) that gets built, but that's it.

The dependencies could be better, but a clean build takes 7 seconds
on my slowest machine.

Thanks for your comments.


Brian
Ebenezer Enterprises - "America isn't great because America is powerful.
America is powerful because America is great." Ben Shapiro at dailywire.com

http://webEbenezer.net

Jorgen Grahn

unread,
May 29, 2017, 1:23:35 PM5/29/17
to
On Sun, 2017-05-28, woodb...@gmail.com wrote:
> On Tuesday, May 2, 2017 at 1:52:22 PM UTC-5, Jorgen Grahn wrote:
>>
>> I don't know Windows make (if that's what you're using), but this part:
>>
>> .c.obj:
>> $(CC) $(CFLAGS) -c $*.c -o $*.obj
>>
>> quicklz.obj: quicklz.h
>> $(CC) $(CFLAGS) -c quicklz.c
>>
>> marshalling_integer.obj: marshalling_integer.hh
>> $(CC) $(CFLAGS) -c marshalling_integer.cc
>>
>> - Are the dependencies on header files really that simple, just two of
>> them? If not, you risk broken builds, if you change a header and
>> expect an incremental build to work correctly.
>>
>> - The .c.obj line tells what command produces foo.obj from foo.c, but
>> then you repeat that for quicklz.obj and marshalling_integer.obj. At
>> least with Gnu Make you can simplify that to:
>>
>> .c.obj:
>> $(CC) $(CFLAGS) -c $*.c -o $*.obj
>>
>> quicklz.obj: quicklz.h
>> marshalling_integer.obj: marshalling_integer.hh
>>
>
> I've changed things now to where I'm no longer building a library:
>
> https://github.com/Ebenezer-group/onwards/blob/master/makefile.windows
>
> There's one .o (.obj) that gets built, but that's it.
>
> The dependencies could be better, but a clean build takes 7 seconds
> on my slowest machine.

If your Makefile lists incorrect dependencies, clean builds is the
only way to avoid broken builds. And you lose most of the benefits of
using Make, compared to using e.g. a straight shell script. --- But
if it works for you, I cannot object.

woodb...@gmail.com

unread,
Jun 16, 2017, 9:58:46 PM6/16/17
to
With a new version of g++ and my efforts, a clean build now takes
less than 4 seconds on that same machine.

Now I'm trying to figure out a travis.yml file that would be helpful.


Brian
Ebenezer-group - The Name of The L-RD is a strong tower. The
righteous runs into it and is safe. Proverbs 18:10

woodb...@gmail.com

unread,
Aug 23, 2017, 1:32:10 PM8/23/17
to

Could someone tell me how to get the license to show up
in the line that has commits/releases/contributors?

https://github.com/Ebenezer-group/onwards

I guess there's more to it than having a file
called LICENSE. Thanks.

Rick C. Hodgin

unread,
Aug 23, 2017, 2:09:17 PM8/23/17
to
I went to Google and searched for: "stack overflow how to make
license appear github" and this was the first response:


https://stackoverflow.com/questions/31639059/how-to-add-license-to-an-existing-github-project

woodb...@gmail.com

unread,
Feb 3, 2018, 11:14:03 AM2/3/18
to
I think my makefile could be more concise, but am not
sure what to do to get there.

https://github.com/Ebenezer-group/onwards/blob/master/makefile

Thanks in advance.


Brian
Ebenezer Enterprises
http://webEbenezer.net

woodb...@gmail.com

unread,
Feb 6, 2018, 1:47:51 PM2/6/18
to
I would like to extract the code in my github repo as
it was at the first commit. I haven't used any releases so
guess that won't help. Is there a way to do it? The reason
I want to do it is to compare how long it used to take to
build against how long it takes now. Thanks in advance.

Rick C. Hodgin

unread,
Feb 6, 2018, 2:00:49 PM2/6/18
to
On Tuesday, February 6, 2018 at 1:47:51 PM UTC-5, woodb...@gmail.com wrote:
> I would like to extract the code in my github repo as
> it was at the first commit. I haven't used any releases so
> guess that won't help. Is there a way to do it? The reason
> I want to do it is to compare how long it used to take to
> build against how long it takes now. Thanks in advance.

c:\repository_name\> git reset --hard commit_identifier

The commit_identifier is the SHA-1 20-byte code for the commit you want to
go back to. You can also repeatedly use "git reset --hard HEAD~1" to step
back one commit at a time. If you want to leave your files on the hard
drive as they are today, and just move back in the git system, then use
"--soft" instead of "--hard".

In your repository here:

https://github.com/Ebenezer-group/onwards/commit/d920658cf679ac2ddd9aab580154ec44780b0978

The line would be:

c:\ebenezer-group\> git reset --hard d920658cf679ac2ddd9aab580154ec44780b0978

--
Rick C. Hodgin

Rick C. Hodgin

unread,
Feb 6, 2018, 2:08:14 PM2/6/18
to
Note: You should do this on a copy of your repository. Do not do it on your
remote repository. Or if you do, do not commit with the "--force" option
because that will cause your remote repository to sync with that commit
again and everything since will be lost.

--
Rick C. Hodgin

Chris Vine

unread,
Feb 6, 2018, 3:12:26 PM2/6/18
to
On Tue, 6 Feb 2018 10:47:37 -0800 (PST)
woodb...@gmail.com wrote:
> I would like to extract the code in my github repo as
> it was at the first commit. I haven't used any releases so
> guess that won't help. Is there a way to do it? The reason
> I want to do it is to compare how long it used to take to
> build against how long it takes now. Thanks in advance.

Don't listen to the advice you have been given and particularly don't
do a hard reset.

Do 'git log' and find your first commit at the very beginning. That
will give you a hash; then just do 'git checkout [hash]'. This will put
you in a detached state with your repository as it was at the time of
the first commit. If you want to work on it in that first state, do a
'git branch my-first-commit' to set up a new branch; if you just want to
tag it to go back to it later, use 'git tag'. It you just want to view
it, do nothing (except view it).

Chris

Chris Vine

unread,
Feb 6, 2018, 3:15:02 PM2/6/18
to
And of course, to then go back to your current master, do 'git checkout
master' (which will release your detached state and put you back
where you started, assuming you started on master branch).

woodb...@gmail.com

unread,
Feb 6, 2018, 8:36:08 PM2/6/18
to
On Tuesday, February 6, 2018 at 2:15:02 PM UTC-6, Chris Vine wrote:
> On Tue, 6 Feb 2018 20:12:09 +0000
> Chris Vine <chris@cvine--nospam--.freeserve.co.uk> wrote:
> > On Tue, 6 Feb 2018 10:47:37 -0800 (PST)> >
> > Don't listen to the advice you have been given and particularly don't
> > do a hard reset.

That looked kind of sketchy to me so I didn't do any reset.

> >
> > Do 'git log' and find your first commit at the very beginning. That
> > will give you a hash; then just do 'git checkout [hash]'. This will
> > put you in a detached state with your repository as it was at the
> > time of the first commit. If you want to work on it in that first
> > state, do a 'git branch my-first-commit' to set up a new branch; if
> > you just want to tag it to go back to it later, use 'git tag'. It
> > you just want to view it, do nothing (except view it).
>
> And of course, to then go back to your current master, do 'git checkout
> master' (which will release your detached state and put you back
> where you started, assuming you started on master branch).

Thanks, that worked.

Building the original version takes 6.4 seconds. The latest
version takes 2.2 seconds. That's using g++ 7.3 to build both
versions. Those are both without using the -j flag. The
times are both faster if I add -j2.

Jorgen Grahn's help in this thread with the makefiles was
important and Thiago Adams' help in another thread where
he suggested using an amalgamated approach was also
a big help in making progress over the past year.

Klaus Iglberger's talk at Cppcon about freeing your
functions has also been helpful.

woodb...@gmail.com

unread,
Jan 1, 2019, 10:55:26 PM1/1/19
to
On Tuesday, February 6, 2018 at 7:36:08 PM UTC-6, woodb...@gmail.com wrote:
> On Tuesday, February 6, 2018 at 2:15:02 PM UTC-6, Chris Vine wrote:
> > On Tue, 6 Feb 2018 20:12:09 +0000
> > Chris Vine <chris@cvine--nospam--.freeserve.co.uk> wrote:
> > > On Tue, 6 Feb 2018 10:47:37 -0800 (PST)> >
> > > Don't listen to the advice you have been given and particularly don't
> > > do a hard reset.
>
> That looked kind of sketchy to me so I didn't do any reset.
>
> > >
> > > Do 'git log' and find your first commit at the very beginning. That
> > > will give you a hash; then just do 'git checkout [hash]'. This will
> > > put you in a detached state with your repository as it was at the
> > > time of the first commit. If you want to work on it in that first
> > > state, do a 'git branch my-first-commit' to set up a new branch; if
> > > you just want to tag it to go back to it later, use 'git tag'. It
> > > you just want to view it, do nothing (except view it).
> >
> > And of course, to then go back to your current master, do 'git checkout
> > master' (which will release your detached state and put you back
> > where you started, assuming you started on master branch).
>
> Thanks, that worked.
>
> Building the original version takes 6.4 seconds. The latest
> version takes 2.2 seconds.

I'm trying to get something going as far as
continuous integration on github. A while back I
tried codeship or something like that. Now I'm
trying circleci. Does anyone have a config.yml file
that works for a C++ repo?

My config.yml is from their website:
version: 2
jobs:
build:
docker:
- image: circleci/ruby:2.4.1
steps:
- checkout
- run: echo "A first hello"

-------------
Or maybe there's another company that has better
C++ support? Thanks.

woodb...@gmail.com

unread,
Jan 12, 2019, 5:21:38 PM1/12/19
to
Now I'm trying Appveyor. It says:

The build phase is set to "MSBuild" mode (default), but no Visual Studio project or solution files were found in the root directory. If you are not building Visual Studio project switch build mode to "Script" and provide your custom build command.
-------------------------------------------------

I've changed the build mode to "Script" but haven't
figured out how to provide a custom build command.
I'm thinking my build command could be:

make -f makefile.vs

. I'm not sure if I'll need to check a file in or
just tell the Appveyor gui. Thanks in advance.

woodb...@gmail.com

unread,
Jan 12, 2019, 7:26:11 PM1/12/19
to
I figured out using the browser how to set the build
command. Now it says:

'make' is not recognized as an internal or external command,
operable program or batch file.

I'm wondering if the next problem after this will be that
it's building on Windows 10 and my makefile refers to Windows
7 libs. At least the Appveyor gui isn't totally lame.

woodb...@gmail.com

unread,
Feb 3, 2019, 11:31:24 PM2/3/19
to
I decided to use an appveyor.yml file rather than the gui.
My appveyor.yml is based on the one in Premake's repo:

os: Visual Studio 2017

platform:
- Win32
- x64

configuration:
- Debug
- Release

before_build:
- cmd: git clean -ffxd

build_script:
- cmd: call "%VS140COMNTOOLS%\..\..\VC\vcvarsall.bat"
- cmd: nmake -f makefile.vs MSDEV=vs2017 windows PLATFORM=%PLATFORM% CONFIG=%CONFIGURATION%

--------------------------------------------------------

But something about it or the makefile:
https://github.com/Ebenezer-group/onwards/blob/master/makefile.vs

isn't working right. And I'm not sure if I've run out of something
with my free Appveyor account, but previously I could get some
info about what was failing. After approximately 50 builds, I'm no
longer able to figure out how to get more info, but it still says
it failed. Anyway, I'm thankful for this yml file. It's not
as crazy as the other yml files I've seen. It's almost reasonable.
Tia.


Brian
Ebenezer Enterprises - “For G-d so loved the world, that He gave
His only Son, that whoever believes in Him should not perish but
have eternal life." John 3:16

http://webEbenezer.net

woodb...@gmail.com

unread,
Feb 7, 2019, 8:33:12 PM2/7/19
to

I've heard how ninja is awesome so recently I decided
to check it out through the lens of my project:
https://github.com/Ebenezer-group/onwards
. I have 4 executables that I build there. With just
one core, ninja runs a lot faster than make: approximately
4 seconds with ninja vs 7 seconds with make. But if I use
-j4 with both builds, now ninja is over 10% slower than make.
I'm using meson to create the ninja files so maybe there's
something that could be done to improve things for ninja,
but it looks to me like make still has some life in it.
Rather than replacing my makefiles with ninja files, I'm
going to keep both.



Brian
Ebenezer Enterprises - Enjoying programming again.
http://webEbenezer.net

Öö Tiib

unread,
Feb 8, 2019, 4:50:06 AM2/8/19
to
On Friday, 8 February 2019 03:33:12 UTC+2, woodb...@gmail.com wrote:
> I've heard how ninja is awesome so recently I decided
> to check it out through the lens of my project:
> https://github.com/Ebenezer-group/onwards
> . I have 4 executables that I build there. With just
> one core, ninja runs a lot faster than make: approximately
> 4 seconds with ninja vs 7 seconds with make. But if I use
> -j4 with both builds, now ninja is over 10% slower than make.
> I'm using meson to create the ninja files so maybe there's
> something that could be done to improve things for ninja,
> but it looks to me like make still has some life in it.
> Rather than replacing my makefiles with ninja files, I'm
> going to keep both.

Viable products that compile with less than half an hour
on single core are getting rare. Only simpler embedded
stuff is such and one won't use ninja for those. The unit
tests typically take somewhat longer to run than compiling.
Do you have unit tests?

If to target multiple platforms then CMake almost works
only platforms that will suck belong to Apple and that is
as expected ... who targets those should have double
bigger budgets too.

woodb...@gmail.com

unread,
Feb 8, 2019, 2:52:31 PM2/8/19
to
On Friday, February 8, 2019 at 3:50:06 AM UTC-6, Öö Tiib wrote:
> On Friday, 8 February 2019 03:33:12 UTC+2, woodb...@gmail.com wrote:
> > I've heard how ninja is awesome so recently I decided
> > to check it out through the lens of my project:
> > https://github.com/Ebenezer-group/onwards
> > . I have 4 executables that I build there. With just
> > one core, ninja runs a lot faster than make: approximately
> > 4 seconds with ninja vs 7 seconds with make. But if I use
> > -j4 with both builds, now ninja is over 10% slower than make.
> > I'm using meson to create the ninja files so maybe there's
> > something that could be done to improve things for ninja,
> > but it looks to me like make still has some life in it.
> > Rather than replacing my makefiles with ninja files, I'm
> > going to keep both.
>
> Viable products that compile with less than half an hour
> on single core are getting rare.

1. I'm working on a service and try to minimize the amount
of code that has to be downloaded/built/maintained.

2. The closed source part of my work is much larger than the
open source part.

3. If you aren't working on some closed source code, now
would be a good time to start.

> Only simpler embedded
> stuff is such and one won't use ninja for those. The unit
> tests typically take somewhat longer to run than compiling.
> Do you have unit tests?

Yes.

>
> If to target multiple platforms then CMake almost works
> only platforms that will suck belong to Apple and that is
> as expected ... who targets those should have double
> bigger budgets too.

I've only used Cmake and Meson a little, but so far I like
Meson more. I don't know yet if it can produce project files
on Windows like Cmake does.
0 new messages